File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def prepare(self):
185185 self .prepare_engine ()
186186 if self .use_cache :
187187 from diskcache import Cache
188- self ._cache = Cache (get_settings () .inference_engine_cache_path + self .__class__ .__name__ )
188+ self ._cache = Cache (settings .inference_engine_cache_path + self .__class__ .__name__ )
189189
190190 def __call__ (
191191 self ,
@@ -201,6 +201,7 @@ def get_instance_cache_key(self, instance):
201201 def _get_cache_key (self , instance : Dict [str , Any ]) -> str :
202202 """Generate a unique cache key for each input."""
203203 record = self .get_instance_cache_key (instance )
204+ record ["version" ] = constants .version
204205 record .update (self .to_dict ())
205206 instance_str = json .dumps (record , sort_keys = True )
206207 return hashlib .md5 (instance_str .encode ()).hexdigest ()
You can’t perform that action at this time.
0 commit comments