-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Update ToDtype
to avoid unnecessary to()
calls and fixing types on Transform
#6773
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Vasilis!
Fun behaviour of defaultdict:
|
ToDtype
to avoid errors when a type is not defined.ToDtype
to avoid unnecessary to()
calls and fixing types on Transform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if CI is green. Not making this mistake again 😛
The failing test is unrelated (the flaky gaussian), we are good to go. |
…g types on `Transform` (#6773) Summary: * Fix `ToDtype` to avoid errors when a type is not defined. * Nit `(features.is_simple_tensor, features._Feature)` to `(Tensor,)` * Fixing linter * Adding comment. * Switch back to indexing. Python's default dict seems to have a nasty behaviour. Reviewed By: NicolasHug Differential Revision: D40427458 fbshipit-source-id: 8b104b0f29e717f216a95bae3aaa5a362b880d6e
As discussed offline this PR:
.to(None)
call_transformed_types
ofTransform
to avoid the superfluousfeatures.is_simple_tensor, features._Feature
idiom.