-
Notifications
You must be signed in to change notification settings - Fork 176
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
inject_hyperparams starts with step_count=1 when using schedules #415
Labels
bug
Something isn't working
Comments
copybara-service bot
pushed a commit
that referenced
this issue
Sep 13, 2022
This fixes issue #415. Previously, `inject_hyperparams` started with `step_count=1` in the first update when using schedules (it incremented before passing it to the schedule) whereas `scale_by_schedule` started with `step_count=0`. To make this consistent, this PR changes `inject_hyperparams` to also start at 0, i.e. increment the count only after passing it to the schedule. The PR comes with a test that breaks without the change. Furthermore, the step counts in the existing tests of `inject_hyperparams` had to be decremented by one in order for the tests to pass. PiperOrigin-RevId: 474015093
copybara-service bot
pushed a commit
that referenced
this issue
Sep 13, 2022
This fixes issue #415. Previously, `inject_hyperparams` started with `step_count=1` in the first update when using schedules (it incremented before passing it to the schedule) whereas `scale_by_schedule` started with `step_count=0`. To make this consistent, this PR changes `inject_hyperparams` to also start at 0, i.e. increment the count only after passing it to the schedule. The PR comes with a test that breaks without the change. Furthermore, the step counts in the existing tests of `inject_hyperparams` had to be decremented by one in order for the tests to pass. PiperOrigin-RevId: 474015093
copybara-service bot
pushed a commit
that referenced
this issue
Oct 7, 2022
This fixes issue #415. Previously, `inject_hyperparams` started with `step_count=1` in the first update when using schedules (it incremented before passing it to the schedule) whereas `scale_by_schedule` started with `step_count=0`. To make this consistent, this PR changes `inject_hyperparams` to also start at 0, i.e. increment the count only after passing it to the schedule. The PR comes with a test that breaks without the change. Furthermore, the step counts in the existing tests of `inject_hyperparams` had to be decremented by one in order for the tests to pass. PiperOrigin-RevId: 474015093
copybara-service bot
pushed a commit
that referenced
this issue
Oct 7, 2022
This fixes issue #415. Previously, `inject_hyperparams` started with `step_count=1` in the first update when using schedules (it incremented before passing it to the schedule) whereas `scale_by_schedule` started with `step_count=0`. To make this consistent, this PR changes `inject_hyperparams` to also start at 0, i.e. increment the count only after passing it to the schedule. The PR comes with a test that breaks without the change. Furthermore, the step counts in the existing tests of `inject_hyperparams` had to be decremented by one in order for the tests to pass. PiperOrigin-RevId: 474015093
copybara-service bot
pushed a commit
that referenced
this issue
Oct 7, 2022
This fixes issue #415. Previously, `inject_hyperparams` started with `step_count=1` in the first update when using schedules (it incremented before passing it to the schedule) whereas `scale_by_schedule` started with `step_count=0`. To make this consistent, this PR changes `inject_hyperparams` to also start at 0, i.e. increment the count only after passing it to the schedule. The PR comes with a test that breaks without the change. Furthermore, the step counts in the existing tests of `inject_hyperparams` had to be decremented by one in order for the tests to pass. PiperOrigin-RevId: 479553657
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is inconsistent with e.g.
scale_by_schedule
which starts withstep_count = 0
in the first update.To reproduce:
Leads to:
AssertionError: updates=DeviceArray([1.], dtype=float32) not equal to updates1=DeviceArray([0.], dtype=float32)
The text was updated successfully, but these errors were encountered: