Skip to content

Add support for single tensor in inputs argument for backward #53827

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

Closed
wants to merge 2 commits into from

Conversation

soulitzer
Copy link
Contributor

@soulitzer soulitzer commented Mar 11, 2021

Also updates the doc such that the language matches the type. For example, previously the tensors argument is specified as (sequence of tensor), but has type annotation of _TensorOrTensors. Now its correctly updated to be Sequence[Tensor] or Tensor

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 11, 2021

💊 CI failures summary and remediations

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


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned 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.

@soulitzer soulitzer force-pushed the bw-nontensor-inputs branch from 730f9da to 3fa7523 Compare March 11, 2021 18:16
Copy link
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.

I think we should update the language for the other arguments as well in the doc :D It can be confusing otherwise because Tensors are actually sequences, but we do treat them as Tensors here, not sequences.

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #53827 (b47ab0c) into master (ec713c0) will decrease coverage by 0.37%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #53827      +/-   ##
==========================================
- Coverage   77.36%   76.98%   -0.38%     
==========================================
  Files        1882     1882              
  Lines      183452   183452              
==========================================
- Hits       141928   141238     -690     
- Misses      41524    42214     +690     

Copy link
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.

Looks good, thanks for the update!

Copy link
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.

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

@facebook-github-bot
Copy link
Contributor

@soulitzer merged this pull request in 7297556.

xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
…rch#53827)

Summary:
Also updates the doc such that the language matches the type. For example, previously the `tensors` argument is specified as `(sequence of tensor)`, but has type annotation of `_TensorOrTensors`. Now its correctly updated to be `Sequence[Tensor] or Tensor`

Pull Request resolved: pytorch#53827

Reviewed By: albanD

Differential Revision: D26997541

Pulled By: soulitzer

fbshipit-source-id: e1e609a4e9525139d0fe96f6157175481c90d6f8
@soulitzer soulitzer deleted the bw-nontensor-inputs branch April 14, 2021 20:37
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.

3 participants