Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strategy instead of plugins for DDP #187

Merged
merged 8 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-dev/docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mike
mkdocs>=1.2.2
mkdocs-material>=7.3.4
mkdocstrings>=0.15.2
mkdocstrings[python]>=0.19.0
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ install_requires =
openpyxl
pandas>1.2.0
pandas_path
protobuf==3.20.1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, see this github action error and protocol buffers update

pydantic
python-dotenv
pytorch-lightning>=1.6.0
Expand Down
2 changes: 1 addition & 1 deletion zamba/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def validate_filepaths_and_labels(cls, values):

elif values["split_proportions"] is not None:
logger.warning(
"Labels contains split column yet split_proprtions are also provided. Split column in labels takes precendece."
"Labels contains split column yet split_proportions are also provided. Split column in labels takes precedence."
)
# set to None for clarity in final configuration.yaml
values["split_proportions"] = None
Expand Down
3 changes: 1 addition & 2 deletions zamba/models/model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ def train_model(
logger=tensorboard_logger,
callbacks=callbacks,
fast_dev_run=train_config.dry_run,
accelerator="ddp" if data_module.multiprocessing_context is not None else None,
plugins=DDPPlugin(find_unused_parameters=False)
strategy=DDPPlugin(find_unused_parameters=False)
if data_module.multiprocessing_context is not None
else None,
)
Expand Down