Skip to content

Commit a90e96b

Browse files
Convert.py @staticmethod (#1327)
* Line 698 has one #staticmethod and should not otherwise throw error at unpickle.load() as not callable * Update convert.py --------- Co-authored-by: Ivan Stepanov <[email protected]>
1 parent 94c5652 commit a90e96b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def load(offset: int, elm_count: int) -> NDArray:
695695
description = f'storage data_type={data_type} path-in-zip={filename} path={self.zip_file.filename}'
696696
return LazyStorage(load=load, kind=pid[1], description=description)
697697

698-
@staticmethod
698+
# @staticmethod
699699
def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any, # pyright: ignore[reportSelfClsParameterName]
700700
requires_grad: Any, backward_hooks: Any, metadata: Any = None) -> LazyTensor:
701701
assert isinstance(storage, LazyStorage)
@@ -706,7 +706,7 @@ def load() -> UnquantizedTensor:
706706
description = f'pickled storage_offset={storage_offset} in {storage.description}'
707707
return LazyTensor(load, list(size), storage.kind.data_type, description)
708708

709-
@staticmethod
709+
# @staticmethod
710710
def rebuild_from_type_v2(func, new_type, args, state):
711711
return func(*args)
712712

0 commit comments

Comments
 (0)