Release/0.9 (#141)
* add flake8 and prettier to pre-commit-config * add setup.cfg * add workers=True to seed_everything() * update lightning badge logo * bump package versions * update README.md * add __init__.py files * add more logger configs parameters * add default Dockerfile * change .env.template to .env.example * move inference example to readme * remove img_dataset.py * simplify names of wandb callbacks * remove wandb test marker * format files with prettier
This commit is contained in:
1 parent
023d4bdecc
commit
70ab061f75
49 files changed
+473
-415
No files matched your search
+9
-5
@@ -1,11 +1,15 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pytorch_lightning import LightningModule, LightningDataModule, Callback, Trainer
|
||||
from pytorch_lightning.loggers import LightningLoggerBase
|
||||
from pytorch_lightning import seed_everything
|
||||
|
||||
import hydra
|
||||
from omegaconf import DictConfig
|
||||
from pytorch_lightning import (
|
||||
Callback,
|
||||
LightningDataModule,
|
||||
LightningModule,
|
||||
Trainer,
|
||||
seed_everything,
|
||||
)
|
||||
from pytorch_lightning.loggers import LightningLoggerBase
|
||||
|
||||
from src.utils import utils
|
||||
|
||||
@@ -25,7 +29,7 @@ def train(config: DictConfig) -> Optional[float]:
|
||||
|
||||
# Set seed for random number generators in pytorch, numpy and python.random
|
||||
if "seed" in config:
|
||||
seed_everything(config.seed)
|
||||
seed_everything(config.seed, workers=True)
|
||||
|
||||
# Init Lightning datamodule
|
||||
log.info(f"Instantiating datamodule <{config.datamodule._target_}>")
|
||||
|
||||
Reference in new issue
Block a user