-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove hard file offset reset in load() #3695
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
Conversation
|
@pytorchbot test this please |
|
Build finished. |
1 similar comment
|
Build finished. |
torch/serialization.py
Outdated
| raise RuntimeError("Unknown saved id type: %s" % saved_id[0]) | ||
|
|
||
| # try the legacy loader first, which only works if f is a tarfile | ||
| # on windows this can return invalid values |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
colesbury
left a comment
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
|
@pytorchbot test this please |
|
@apaszke didn't you want to comment on this PR, you said something was missing? |
|
@pytorchbot test this please |
|
thank you @plang85 ! |
* improved file offset logic * load offset test * whitespace * needless exception handling * test integer in binary
Slight improvement in file offset handling to be consistent with save() and pickle API, enables loading from arbitrary offsets.
#3694