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

Force use of Tangents for pushforward, pullback and hvp #452

Closed
gdalle opened this issue Sep 6, 2024 · 0 comments · Fixed by #455
Closed

Force use of Tangents for pushforward, pullback and hvp #452

gdalle opened this issue Sep 6, 2024 · 0 comments · Fixed by #455
Labels
core Related to the core utilities of the package
Milestone

Comments

@gdalle
Copy link
Owner

gdalle commented Sep 6, 2024

Currently, users can write

pushforward(f, backend, x, dx)

and I want to force

pushforward(f, backend, x, Tangents(dx))  # single mode
pushforward(f, backend, x, Tangents(dx1, dx2))  # batch mode

Benefits:

  • simplify the chain of fallbacks (removing this file)
  • reduce the risk of method ambiguities
  • make it clear to users that they can use single or batch mode
  • coherence with the future typing of additional Constant or Cache arguments (Multiple arguments / activities? #311).
@gdalle gdalle added the core Related to the core utilities of the package label Sep 6, 2024
@gdalle gdalle added this to the v0.6 milestone Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to the core utilities of the package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant