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

[wip] Test removing hpc save/load #7537

Closed
wants to merge 5 commits into from

Conversation

ananthsub
Copy link
Contributor

@ananthsub ananthsub commented May 14, 2021

What does this PR do?

This is redundant with the existing model checkpoint save/load/resume functionality. we shouldn't have 2 paths in the codebase that do the same thing

sending out as a PR to see what breaks
Fixes #<issue_number>

Related issues: #6204, #5373

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

Comment on lines -345 to -346
# call hpc specific hook
model.on_hpc_load(checkpoint)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to deprecate these hooks in favor of on_save/load_checkpoint

@codecov
Copy link

codecov bot commented May 14, 2021

Codecov Report

Merging #7537 (5b9b77b) into master (233f252) will decrease coverage by 4%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #7537    +/-   ##
=======================================
- Coverage      92%     88%    -4%     
=======================================
  Files         196     195     -1     
  Lines       12835   12757    -78     
=======================================
- Hits        11832   11198   -634     
- Misses       1003    1559   +556     

@Borda Borda marked this pull request as draft May 14, 2021 08:19
log = logging.getLogger(__name__)


class SLURMConnector:
Copy link
Contributor

Choose a reason for hiding this comment

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

the signal handling is not tested, so no surprise there are no failing tests.
But as you can see in the code below, this handles automatic job resubmission, and if you remove it, Lightning will lose support for this feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it expected that lightning needs to natively handle automatic job resubmission? or does it make sense for this to be part of the application using Lightning to handle?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it is expected and a pretty important feature of the Lightning framework :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • would it make sense for this to be part of the SLURMEnvironment if users wanted to disable automatic resubmission?
  • should resubmission be opt-in instead of opt-out?

Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense for this to be part of the SLURMEnvironment if users wanted to disable automatic resubmission?

yes
#6303

@williamFalcon
Copy link
Contributor

@ananthsub yes... this is a very important feature and expected by lightning. let's keep this in the framework.

@stale
Copy link

stale bot commented Jun 4, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jun 4, 2021
@stale
Copy link

stale bot commented Jun 10, 2021

This pull request is going to be closed. Please feel free to reopen it create a new from the actual master.

@stale stale bot closed this Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
won't fix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants