-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Train End Error Handling Fix #6864
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
Merged
carmocca
merged 52 commits into
Lightning-AI:master
from
shuyingsunshine21:train_end_try_catch
Apr 14, 2021
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
89f284d
Fix some test errors
80cfbff
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
536c132
checkpoint consolidation
f172101
Update ddp_spawn.py
shuyingsunshine21 bf70e43
Update test_metric_result_integration.py
shuyingsunshine21 ea74906
Update test_results.py
shuyingsunshine21 a9aae99
Update utils.py
shuyingsunshine21 70fe5da
Update utils.py
shuyingsunshine21 0d23d75
Update test_all_gather_grad.py
shuyingsunshine21 ca6f98b
Update test_all_gather_grad.py
shuyingsunshine21 c5053da
Merge pull request #1 from shuyingsunshine21/shuyingsunshine21-checkp…
shuyingsunshine21 9d4a2b8
Update test_results.py
shuyingsunshine21 7635b4f
Revert "Update test_results.py"
shuyingsunshine21 d64f90c
Revert "Merge pull request #1 from shuyingsunshine21/shuyingsunshine2…
shuyingsunshine21 dcdcd29
Revert "Update test_all_gather_grad.py"
shuyingsunshine21 8651d54
Revert "Update utils.py"
shuyingsunshine21 15f4b9e
Revert "Update utils.py"
shuyingsunshine21 250d0aa
Revert "Update test_results.py"
shuyingsunshine21 6c095b2
Revert "Update test_metric_result_integration.py"
shuyingsunshine21 8222dc9
Revert "Update ddp_spawn.py"
shuyingsunshine21 3a9fde9
Revert "checkpoint consolidation"
shuyingsunshine21 7a369f4
Revert "Revert "checkpoint consolidation""
shuyingsunshine21 b4a0b9e
Revert "Revert "Revert "checkpoint consolidation"""
shuyingsunshine21 5cf1db1
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
0ce7e05
Revert "Revert "Update ddp_spawn.py""
shuyingsunshine21 fe9736d
Revert "Revert "Update test_metric_result_integration.py""
shuyingsunshine21 c314ef6
Revert "Revert "Update test_results.py""
shuyingsunshine21 c3feda0
Revert "Revert "Update utils.py""
shuyingsunshine21 c759477
Revert "Revert "Update test_all_gather_grad.py""
shuyingsunshine21 7a8e540
Merge branch 'master' of https://github.com/shuyingsunshine21/pytorch…
ab8b849
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
4e67db2
modify distributed environment to make test pass
67b6188
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
56864d9
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
cb39c74
remove fragile error handling
1f12018
draft fix v1
c3119ac
pull upstream master
834aa53
remove test related env flags
46be491
comments
0aff9a3
add changelog
7ddb196
fix
ba50f5d
formatting issue
2644953
modify trainer doc
b8f877a
Update CHANGELOG
carmocca 6403717
Merge branch 'master' into train_end_try_catch
carmocca d9f45e3
Merge branch 'master' into train_end_try_catch
carmocca b11bd93
Fix test
carmocca 8c1153f
Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-…
2bb6c99
fix test for test_training_loop
0986f37
Merge branch 'train_end_try_catch' of https://github.com/shuyingsunsh…
c8c8b08
formatting
d8ca310
Fix broken test
ethanwharris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we also remove this from
train_loop.on_train_end? https://github.com/PyTorchLightning/pytorch-lightning/blob/b7a22ba046ba57072a71b12d16caff000e66f798/pytorch_lightning/trainer/training_loop.py#L114-L118as this is one of the possible sources of bugs with the attempt at graceful shutdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I have a PR in progress for this. Need to finish it. This is part of what causes #6470
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ananthsub , for this case, train does not have error (just early stopping), should we run
train_loop.on_train_endto perform checkpointing?@camruta , for why here I use
train_loop.on_train_end, but for the case exception, I useaccelerator.on_train_end, is because trying to avoid checkpointing when there is error for some ranks but not all (hence hang in broadcast).To avoid divergence (normal end vs. error end), do you think we actually should remove the problematic checkpointing logic in
training_loop.on_train_end. But there is also risk of adding logics intraining_loop.on_train_endwhich could potentially need all ranks to be involved. How do we enforce that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open to discussion