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

Add ACProp optimizer. #966

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlosgmartin
Copy link
Contributor

@carlosgmartin carlosgmartin mentioned this pull request May 15, 2024
@carlosgmartin carlosgmartin force-pushed the acprop branch 5 times, most recently from 21935bd to 364914d Compare May 15, 2024 23:39
@carlosgmartin
Copy link
Contributor Author

carlosgmartin commented May 23, 2024

@fabianp @vroulet This PR is getting the same error as #962. Looks like there's a problem with optax/monte_carlo/control_variates_test.py > ConsistencyWithStandardEstimators.testWeightedLinearFunction > _score_function_jacobians & control_delta_method.

@vroulet
Copy link
Collaborator

vroulet commented May 23, 2024

Yep, we know. This bug does not show up internally, neither on a mac, just on linux (which I don't have).
It's related to the new jax release. We are working on it.

@fabianp
Copy link
Member

fabianp commented May 23, 2024

@carlosgmartin : we could also use some help if you have cycles to look into this ...

@vroulet
Copy link
Collaborator

vroulet commented May 23, 2024

It's been fixed in #972. Should be merged tomorrow.

Copy link
Collaborator

@vroulet vroulet left a comment

Choose a reason for hiding this comment

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

Thanks one more time for this contribution @carlosgmartin
This looks very good.
One additional comment: since this paper is cited only 6 times, we will place it in the contrib folder for now, see https://optax.readthedocs.io/en/latest/development.html#inclusion-criteria
(that's a policy implemented only recently)

optax/_src/alias.py Outdated Show resolved Hide resolved
optax/_src/alias.py Outdated Show resolved Hide resolved
optax/_src/alias.py Outdated Show resolved Hide resolved
@carlosgmartin carlosgmartin force-pushed the acprop branch 4 times, most recently from 2baaf60 to 9d66bf0 Compare May 24, 2024 22:06
@carlosgmartin
Copy link
Contributor Author

@vroulet Done.

@vroulet
Copy link
Collaborator

vroulet commented May 24, 2024

Thanks! Can you add it to the list of common tests of the contrib folder?

@carlosgmartin carlosgmartin force-pushed the acprop branch 4 times, most recently from d84989a to e2bda4a Compare May 25, 2024 01:24
@carlosgmartin
Copy link
Contributor Author

@vroulet Done.

Copy link
Collaborator

@vroulet vroulet left a comment

Choose a reason for hiding this comment

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

Perfect, thank you again @carlosgmartin.

  • The scale_by_sophia can be added to the doc.
  • You may format the reference in scale_by_sophia.
  • The copyright should be 2024.

I can take it from here if you don't have time.
We sincerely appreciate the dedication in your PRs.

@carlosgmartin
Copy link
Contributor Author

@vroulet Did you mean adding scale_by_acprop to docs/api/contrib.rst in your first bullet point?

@vroulet
Copy link
Collaborator

vroulet commented May 27, 2024

Yes. People may want to combine this scale function with e.g. a clipping, so the documentation helps.
This is just a nitpick to finalize the contrib.

@vroulet
Copy link
Collaborator

vroulet commented May 27, 2024

Perfect, I'll take it from here (I need to make some internal changes to add this optimizer to our builds).
Thanks again

copybara-service bot pushed a commit that referenced this pull request May 29, 2024
--
e2bda4a by carlosgmartin <cgmartin@andrew.cmu.edu>:

Add ACProp optimizer.

COPYBARA_INTEGRATE_REVIEW=#966 from carlosgmartin:acprop e2bda4a
PiperOrigin-RevId: 638310199
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

3 participants