Skip to content

fix convert.py not working with int filename_stem #3028

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 2 commits into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def persistent_load(self, pid: Any) -> Any:
assert isinstance(pid[1], LazyStorageKind)
data_type = pid[1].data_type
filename_stem = pid[2]
filename = self.data_base_path + '/' + filename_stem
filename = f'{self.data_base_path}/{filename_stem}'
info = self.zip_file.getinfo(filename)

def load(offset: int, elm_count: int) -> NDArray:
Expand All @@ -689,7 +689,6 @@ def load(offset: int, elm_count: int) -> NDArray:

@staticmethod
def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any,
# pyright: ignore[reportSelfClsParameterName]
requires_grad: Any, backward_hooks: Any, metadata: Any = None) -> LazyTensor:
assert isinstance(storage, LazyStorage)

Expand Down