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

Refactored scheduler callbacks (epoch-based/step-based warmup) #568

Merged
merged 44 commits into from
Jan 20, 2023

Conversation

BloodAxe
Copy link
Collaborator

@BloodAxe BloodAxe commented Dec 13, 2022

Changes:

warmup_mode: linear_step will emit deprecation warning. But will continue to work without any changes.

Two new modes with explicit meaning:

  • warmup_mode: linear_batch_step
  • warmup_mode: linear_epoch_step

Per-batch warmup:

warmup_mode: linear_batch_step
num_warmup_steps: 100

Old Per-epoch warmup:

warmup_mode: linear_batch_step
num_warmup_epochs: 4

…iles to respect new config names (Keep the old name for BC as well but emit a warning when used).
@dagshub
Copy link

dagshub bot commented Dec 13, 2022

Copy link
Collaborator

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

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

Nice work (:
There are some comments inline., mostly discussing some edge cases and mildly (possible) inaccuracies.

Its important IMO we add unit tests for scheduling. Please see the different use cases I had in tests/unit_tests/lr_warmup_test.py.

# Conflicts:
#	src/super_gradients/training/utils/callbacks/callbacks.py
#	tests/unit_tests/lr_warmup_test.py
@BloodAxe BloodAxe marked this pull request as ready for review January 16, 2023 13:27
Copy link
Collaborator

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

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

Looks awesome!
I just have one final suggestion for the unit test, see my comment there.
Please also update the docs in Trainer.train() (we have there the long list of training params docs), and shortly in default_training_hyperparams.yaml.

tests/unit_tests/lr_warmup_test.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

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

LGTM

@BloodAxe BloodAxe merged commit 4016831 into master Jan 20, 2023
@BloodAxe BloodAxe deleted the feature/SG-525-step-based-warmup branch January 20, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants