Skip to content

Commit

Permalink
Fail early when asked for num_workers > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
rejuvyesh committed Feb 20, 2023
1 parent f715633 commit dfc9426
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/climax/global_forecast/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def __init__(
pin_memory: bool = False,
):
super().__init__()
if num_workers > 1:
raise NotImplementedError(
"num_workers > 1 is not supported yet. Performance will likely degrage too with larger num_workers."
)

# this line allows to access init params with 'self.hparams' attribute
self.save_hyperparameters(logger=False)
Expand Down
5 changes: 4 additions & 1 deletion src/climax/pretrain/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def __init__(
pin_memory: bool = False,
):
super().__init__()

if num_workers > 1:
raise NotImplementedError(
"num_workers > 1 is not supported yet. Performance will likely degrage too with larger num_workers."
)
# this line allows to access init params with 'self.hparams' attribute
self.save_hyperparameters(logger=False)

Expand Down

0 comments on commit dfc9426

Please sign in to comment.