Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Migrate to Pytorch Lightning #323

Merged
merged 214 commits into from
Jan 28, 2021
Merged

Migrate to Pytorch Lightning #323

merged 214 commits into from
Jan 28, 2021

Conversation

ant0nsc
Copy link
Contributor

@ant0nsc ant0nsc commented Nov 19, 2020

This PR swaps out all of the previously hand-written training routines, and switches them to PyTorch Lightning.

InnerEye/Azure/azure_config.py Outdated Show resolved Hide resolved
InnerEye/ML/common.py Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
InnerEye/ML/dataset/scalar_sample.py Outdated Show resolved Hide resolved
TestsOutsidePackage/test_register_model.py Outdated Show resolved Hide resolved
InnerEye/ML/deep_learning_config.py Outdated Show resolved Hide resolved
InnerEye/ML/lightning_models.py Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@@ -61,7 +60,6 @@ def __init__(self,
encoder_dimensionality_reduction_factor: float = 0.8,
aggregation_type: AggregationType = AggregationType.Average,
scan_size: Optional[TupleInt3] = None,
use_mixed_precision: bool = True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we remove use_mixed_precision only for this model?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the mixed precision magic is now wrapped into PL, it should not be done explicitly anymore

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like use_mixed_precision is still used in MultiSegmentationEncoder and (trivially) in the tests here.

InnerEye/ML/run_ml.py Outdated Show resolved Hide resolved
InnerEye/ML/run_ml.py Show resolved Hide resolved
InnerEye/ML/run_ml.py Outdated Show resolved Hide resolved
InnerEye/ML/run_ml.py Outdated Show resolved Hide resolved
InnerEye/ML/run_ml.py Show resolved Hide resolved
Shruthi42
Shruthi42 previously approved these changes Jan 28, 2021
Tests/ML/test_download_upload.py Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor training code using pytorch_lightning Distributed data parallel
6 participants