Skip to content

Update docstring on return type of jvp and vjp#51035

Closed
niklasschmitz wants to merge 1 commit intopytorch:masterfrom
niklasschmitz:patch-1
Closed

Update docstring on return type of jvp and vjp#51035
niklasschmitz wants to merge 1 commit intopytorch:masterfrom
niklasschmitz:patch-1

Conversation

@niklasschmitz
Copy link
Copy Markdown
Contributor

Updates the docstrings, that jvp and vjp both return the primal func_output first as part of the return tuple,
in line with the docstrings of hvp and vhp.

Adds the information that `jvp` and `vjp` both return the primal `func_output` first as part of the return tuple,
in line with the docstrings of `hvp` and `vjp`.
@niklasschmitz niklasschmitz requested a review from albanD as a code owner January 25, 2021 14:16
Copy link
Copy Markdown
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Nice catch!

Thanks a lot for the fix!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 25, 2021

💊 CI failures summary and remediations

As of commit c620572 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 25, 2021

Codecov Report

Merging #51035 (c620572) into master (8690819) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #51035      +/-   ##
==========================================
- Coverage   80.91%   80.91%   -0.01%     
==========================================
  Files        1926     1926              
  Lines      210014   210014              
==========================================
- Hits       169943   169941       -2     
- Misses      40071    40073       +2     

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@albanD merged this pull request in 95a0a1a.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Updates the docstrings, that `jvp` and `vjp` both return the primal `func_output` first as part of the return tuple,
in line with the docstrings of [hvp](https://github.com/niklasschmitz/pytorch/blob/c620572a3477143df33128318dc0d7d10fab811d/torch/autograd/functional.py#L671) and [vhp](https://github.com/niklasschmitz/pytorch/blob/c620572a3477143df33128318dc0d7d10fab811d/torch/autograd/functional.py#L583).

Pull Request resolved: pytorch#51035

Reviewed By: bdhirsh

Differential Revision: D26047693

Pulled By: albanD

fbshipit-source-id: 5f2957a858826b4c1884590b6be7a8bed0791efd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants