MCPcopy Create free account
hub / github.com/modelscope/modelscope / __get_cache_key

Method __get_cache_key

modelscope/hub/utils/caching.py:306–311  ·  view source on GitHub ↗
(self, model_file_info)

Source from the content-addressed store, hash-verified

304 return None
305
306 def __get_cache_key(self, model_file_info):
307 cache_key = {
308 'Path': model_file_info['Path'],
309 'Revision': model_file_info['Revision'], # commit id
310 }
311 return cache_key
312
313 def exists(self, model_file_info):
314 """Check the file is cached or not. Note existence check will also cover digest check

Callers 3

get_file_by_infoMethod · 0.95
existsMethod · 0.95
put_fileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected