Skip to content

Commit

Permalink
check if seed is none
Browse files Browse the repository at this point in the history
  • Loading branch information
Manchewable committed Mar 6, 2024
1 parent bddbc24 commit 1e3bdcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def train(cfg: DictConfig) -> Tuple[Dict[str, Any], Dict[str, Any]]:
:return: A tuple with metrics and dict with all instantiated objects.
"""
# set seed for random number generators in pytorch, numpy and python.random
if cfg.get("seed"):
if cfg.get("seed") is not None:
L.seed_everything(cfg.seed, workers=True)

log.info(f"Instantiating datamodule <{cfg.data._target_}>")
Expand Down

0 comments on commit 1e3bdcf

Please sign in to comment.