-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve to_torch/to_numpy converters #147
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
54d3dfb
Enable converting list/tuple back and forth from/to numpy/torch.
628733d
Add fallbacks.
85d13c1
Fix PEP8
d90bcee
Update unit tests.
a6e6c3f
Type annotation. Robust dtype check.
9965f6f
List of object are converted individually, as a single tensor otherwise.
5777408
Improve robustness of _to_array_with_correct_type
750dddd
Add unit tests.
61d4186
Do not catch exception at _to_array_with_correct_type level.
5b0e145
Use _parse_value
ca9ae18
Fix PEP8
1199310
Fix _parse_value list output type fallback.
fe6ad9a
Catch torch exception.
9d784f4
Do not convert torch tensor during fallback.
d6bea24
Improve unit tests.
bfe0a39
Add unit tests.
edaed5a
FIx missing import
da4bbc2
Remove support of numpy arrays of tensors for Batch value parser.
53ed48d
Forbid numpy arrays of tensors.
7b96800
Fix PEP8.
d91189e
Fix comment.
ca2dd9e
Reduce _parse_value branch number.
fb0f74e
Fix None value.
4c4357d
Forward error message for debugging purpose.
128a816
Fix _is_scalar.
26b739b
More specific try/catch blocks.
cca2c10
Fix exception chaining.
ffbd017
Fix PEP8.
7cef13d
Fix _is_scalar.
f793320
Fix missing corner case.
3f89363
Fix PEP8.
99c7f95
Allow Batch empty key.
a7e7779
Fix multi-dim array datatype check.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.