Remove hard file offset reset in load()#3695
Merged
soumith merged 5 commits intopytorch:masterfrom Nov 17, 2017
philippslang:load_offset
Merged
Remove hard file offset reset in load()#3695soumith merged 5 commits intopytorch:masterfrom philippslang:load_offset
soumith merged 5 commits intopytorch:masterfrom
philippslang:load_offset
Conversation
Collaborator
|
@pytorchbot test this please |
Collaborator
|
Build finished. |
1 similar comment
Collaborator
|
Build finished. |
colesbury
reviewed
Nov 14, 2017
| 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.
Member
|
@pytorchbot test this please |
Collaborator
|
@apaszke didn't you want to comment on this PR, you said something was missing? |
apaszke
approved these changes
Nov 17, 2017
Collaborator
|
@pytorchbot test this please |
Collaborator
|
thank you @plang85 ! |
soumith
pushed a commit
that referenced
this pull request
Feb 7, 2018
* improved file offset logic * load offset test * whitespace * needless exception handling * test integer in binary
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
* improved file offset logic * load offset test * whitespace * needless exception handling * test integer in binary
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Slight improvement in file offset handling to be consistent with save() and pickle API, enables loading from arbitrary offsets.
#3694