fix: make scale_by_distance_over_gradients a deprecated wrapper aroun…#1606
fix: make scale_by_distance_over_gradients a deprecated wrapper aroun…#1606Mahajan-Sachin wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hey, thanks for the contribution attempt! The formatting/diff tool you're using to make changes appears confused about the indentation width in our files (please use indent-width=2). It'll be much easier to pass the CI if you try to make the diff as small as possible. You can also run much of the CI locally, by installing pre-commit and running |
5baaba0 to
2ad0ed3
Compare
|
All checks are passing now. Please let me know if any changes are needed. Happy to update further. Thanks! |
|
We probably want to keep the verbose name "distance_over_gradients" and alias "dog" to it rather than the other way around. |
|
I’ve applied the suggested changes and kept distance_over_gradients as the canonical name. |
|
Please don't import contrib in the core package, retain the implementation from the core package if you want to do the refactor. |
e0f99f8 to
ec4e53f
Compare
ec4e53f to
e8ee1ad
Compare
|
All CI checks passed (lint, pre-commit, pytype, doctests, pytest matrix across versions). |
|
Hi @rdyro, thanks again for the feedback! Just to make sure we're aligned on #1509's original intent:
I you can check the thread directly: This PR implements exactly that approach:
All checks green, backward compatible (identical state fields). If the project now prefers no wrapper / full duplication without deprecation, or any other direction, just let me know – happy to adjust, revert the wrapper, or close the PR accordingly. No problem at all. Thanks for your time and guidance! 🙏 |
fix: make scale_by_distance_over_gradients a deprecated wrapper around scale_by_l_dog (#1509)
Fixes #1509
Refactor scale_by_distance_over_gradients to delegate to
contrib.scale_by_l_dog, removing duplicate implementation.Changes:
Note:
The returned state type changes from
ScaleByDistanceOverGradientsStateto LDoGState(fields are identical).
All tests pass locally (580 passed).