summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Scholz <Green-Sky@users.noreply.github.com>2023-09-05 19:41:00 +0200
committerGitHub <noreply@github.com>2023-09-05 19:41:00 +0200
commitc9c3220c485c7bea740a07cda7343677fb3beaae (patch)
treefd29d800066a83eadffd67ca3cbf615903e706e8
parentd59bd97065cd7ded6c4ecab54b1d5e0b1b11e318 (diff)
convert: fix convert.py not working with int filename_stem (#3028)
* fix implicit int to string conversion * convert : remove an obsolete pyright comment --------- Co-authored-by: Cebtenzzre <cebtenzzre@gmail.com>
-rwxr-xr-xconvert.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/convert.py b/convert.py
index 5a7483b4..59d75141 100755
--- a/convert.py
+++ b/convert.py
@@ -673,7 +673,7 @@ class LazyUnpickler(pickle.Unpickler):
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:
@@ -689,7 +689,6 @@ class LazyUnpickler(pickle.Unpickler):
@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)