MCPcopy Create free account
hub / github.com/evilsocket/cake / find_cached_model_not_present

Function find_cached_model_not_present

cake-core/src/utils/hf.rs:353–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352 #[test]
353 fn find_cached_model_not_present() {
354 let _lock = ENV_LOCK.lock().unwrap();
355 let tmp = tempfile::tempdir().unwrap();
356 let cache = tmp.path();
357 std::env::set_var("HF_HUB_CACHE", cache.to_str().unwrap());
358
359 let result = find_cached_model("nonexistent/model");
360 assert!(result.is_none());
361
362 std::env::remove_var("HF_HUB_CACHE");
363 }
364
365 #[test]
366 fn hf_cache_dir_returns_path_when_set() {

Callers

nothing calls this directly

Calls 1

find_cached_modelFunction · 0.85

Tested by

no test coverage detected