mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	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 <ivanstepanovftw@gmail.com>
This commit is contained in:
		 Benjamin Lecaillon
					Benjamin Lecaillon
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							94c5652fc0
						
					
				
				
					commit
					a90e96b266
				
			| @@ -695,7 +695,7 @@ class LazyUnpickler(pickle.Unpickler): | |||||||
|         description = f'storage data_type={data_type} path-in-zip={filename} path={self.zip_file.filename}' |         description = f'storage data_type={data_type} path-in-zip={filename} path={self.zip_file.filename}' | ||||||
|         return LazyStorage(load=load, kind=pid[1], description=description) |         return LazyStorage(load=load, kind=pid[1], description=description) | ||||||
|  |  | ||||||
|     @staticmethod |    # @staticmethod | ||||||
|     def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any,  # pyright: ignore[reportSelfClsParameterName] |     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) | ||||||
| @@ -706,7 +706,7 @@ class LazyUnpickler(pickle.Unpickler): | |||||||
|         description = f'pickled storage_offset={storage_offset} in {storage.description}' |         description = f'pickled storage_offset={storage_offset} in {storage.description}' | ||||||
|         return LazyTensor(load, list(size), storage.kind.data_type, description) |         return LazyTensor(load, list(size), storage.kind.data_type, description) | ||||||
|  |  | ||||||
|     @staticmethod |     # @staticmethod | ||||||
|     def rebuild_from_type_v2(func, new_type, args, state): |     def rebuild_from_type_v2(func, new_type, args, state): | ||||||
|         return func(*args) |         return func(*args) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user