mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 05:48:47 +01:00
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>
This commit is contained in:
parent
d59bd97065
commit
c9c3220c48
@ -673,7 +673,7 @@ class LazyUnpickler(pickle.Unpickler):
|
|||||||
assert isinstance(pid[1], LazyStorageKind)
|
assert isinstance(pid[1], LazyStorageKind)
|
||||||
data_type = pid[1].data_type
|
data_type = pid[1].data_type
|
||||||
filename_stem = pid[2]
|
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)
|
info = self.zip_file.getinfo(filename)
|
||||||
|
|
||||||
def load(offset: int, elm_count: int) -> NDArray:
|
def load(offset: int, elm_count: int) -> NDArray:
|
||||||
@ -689,7 +689,6 @@ class LazyUnpickler(pickle.Unpickler):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any,
|
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:
|
requires_grad: Any, backward_hooks: Any, metadata: Any = None) -> LazyTensor:
|
||||||
assert isinstance(storage, LazyStorage)
|
assert isinstance(storage, LazyStorage)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user