Skip to content

Conversation

@carmocca
Copy link
Contributor

@carmocca carmocca commented Feb 10, 2022

What does this PR do?

Moves min step checking logic into the loop that manages steps

Does your PR introduce any breaking changes? If yes, please list them.

None intended

Before submitting

  • [n/a] 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?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] 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 list all the breaking changes introduced by this pull request?
  • [n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

  • 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

cc @justusschock @awaelchli @akihironitta @rohitgr7 @carmocca @ananthsub @ninginthecloud

@carmocca carmocca added refactor loops Related to the Loop API labels Feb 10, 2022
@carmocca carmocca added this to the 1.6 milestone Feb 10, 2022
@carmocca carmocca requested a review from awaelchli February 10, 2022 17:31
@carmocca carmocca self-assigned this Feb 10, 2022
@carmocca carmocca marked this pull request as ready for review February 10, 2022 19:44
@awaelchli
Copy link
Contributor

Is this covered by test_min_steps_override_early_stopping_functionality?

Assuming trainer.should_stop=True, does the following hold true?

Trainer(limit_train_batches=5, min_steps=3, min_epochs=2)   # calls training_step 10 times
Trainer(limit_train_batches=5, min_steps=12, min_epochs=2)   # calls training_step 12 times

@carmocca
Copy link
Contributor Author

carmocca commented Feb 14, 2022

Is this covered by test_min_steps_override_early_stopping_functionality?

No, but it is after #11866

does the following hold true?

The second one will not.

If that requirement cannot change, we have two options:

  1. Revisit this after [WIP] Add Loop.stop() #8604 so that a parent loop would check the children's should_stop property.
  2. Just remove this TODO as it cannot be done given the current design.

In any case, I'll mark this as a draft. Tell me what do you think

@carmocca carmocca marked this pull request as draft February 14, 2022 16:55
@carmocca carmocca modified the milestones: 1.6, future Feb 14, 2022
@carmocca carmocca closed this Nov 8, 2022
@carmocca carmocca deleted the codeq/resolve-todo branch November 8, 2022 16:16
@carmocca carmocca removed this from the future milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loops Related to the Loop API refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants