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

LR Scheduler: added iteration granularity, exp0 and epoch0-only options #946

Merged
merged 2 commits into from Mar 24, 2022

Conversation

lrzpellegrini
Copy link
Collaborator

This PR introduces the following options to the LRSchedulerPlugin:

  • granularity: how often the scheduler's step() method is called. Valid values are 'epoch' (default) and 'iteration'
  • first_epoch_only: if True, the step() method will be called only on the first epoch of each experience
  • first_exp_only: if True, the step() method will be called only on the first training experience

In addition, first_epoch_only and first_exp_only can be True at the same time.

This also adds a lot of unit tests to validate the behavior with the new options.

@ContinualAI-bot
Copy link
Collaborator

Oh no! It seems there are some PEP8 errors! 😕
Don't worry, you can fix them! 💪
Here's a report about the errors and where you can find them:

tests/training/test_plugins.py:436:13: E122 continuation line missing indentation or outdented
tests/training/test_plugins.py:437:13: E122 continuation line missing indentation or outdented
tests/training/test_plugins.py:437:13: E125 continuation line with same indent as next logical line
tests/training/test_plugins.py:555:13: E122 continuation line missing indentation or outdented
tests/training/test_plugins.py:556:13: E122 continuation line missing indentation or outdented
tests/training/test_plugins.py:556:13: E125 continuation line with same indent as next logical line
4       E122 continuation line missing indentation or outdented
2       E125 continuation line with same indent as next logical line

@lrzpellegrini lrzpellegrini merged commit 65f5c08 into ContinualAI:master Mar 24, 2022
@lrzpellegrini lrzpellegrini deleted the granular_lr_scheduler branch March 24, 2022 15:20
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