Skip to content

Commit 46fc067

Browse files
committed
update
1 parent 8d4cdf6 commit 46fc067

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/wandb_run.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from typing import Any, Dict, Optional
1717

1818
import wandb as wb
19-
from lightning.pytorch import seed_everything
2019
from lightning.pytorch.callbacks import EarlyStopping
2120
from lightning.pytorch.loggers import WandbLogger
2221

@@ -64,7 +63,6 @@ def __init__(
6463
project_name: Optional[str] = None,
6564
wandb_dir: Optional[str] = conf.WANDBPATH,
6665
):
67-
seed_everything(conf.GLOBALSEED, workers=True)
6866
self._wb_run = wb.init(project=project_name, dir=wandb_dir)
6967
self.pipeline_work = PipelineWorker(LitDataModule)
7068
self.training_work = TrainerWorker(

lightning_pod/core/trainer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(
3131
logger: Optional[Logger] = None,
3232
profiler: Optional[Profiler] = None,
3333
callbacks: Optional[List] = [],
34+
set_seed: bool = True,
3435
**trainer_init_kwargs: Dict[str, Any]
3536
) -> None:
3637
super().__init__(
@@ -40,7 +41,8 @@ def __init__(
4041
**trainer_init_kwargs
4142
)
4243
# SET SEED
43-
seed_everything(conf.GLOBALSEED, workers=True)
44+
if set_seed:
45+
seed_everything(conf.GLOBALSEED, workers=True)
4446
# SET DATALOADER
4547
self.datamodule = LitDataModule()
4648
# SET MODEL

0 commit comments

Comments
 (0)