Skip to content

Conversation

Gouvernathor
Copy link
Contributor

To have a more clearer message than TypeError: tensor or list of tensors expected, got <class 'list'>, when having (for example) a list of numpy arrays.
Even better would be to parse the list and return the type of the first non-tensor. If you don't mind the code difference, I'll program that.

@facebook-github-bot
Copy link
Contributor

Hi @Gouvernathor!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @Gouvernathor , LGTM. I'll merge when CI is green

@NicolasHug
Copy link
Member

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@Gouvernathor
Copy link
Contributor Author

Yeah, I need to wrap the type() in a repr() so it shuts up (even though the f-string formatting does it by itself).

so that the type-check stfu
@Gouvernathor
Copy link
Contributor Author

Please consider 5447 before this one, I find it better.

@datumbox
Copy link
Contributor

superseded by #5997

@datumbox datumbox closed this May 12, 2022
@Gouvernathor Gouvernathor deleted the patch-1 branch May 12, 2022 08:41
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