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

Function resolve_model_path

cake-cli/src/main.rs:699–708  ·  view source on GitHub ↗

Resolve a model path, downloading from HuggingFace if it looks like a repo ID.

(model: &str)

Source from the content-addressed store, hash-verified

697
698/// Resolve a model path, downloading from HuggingFace if it looks like a repo ID.
699fn resolve_model_path(model: &str) -> Result<PathBuf> {
700 let path = PathBuf::from(model);
701 if path.exists() {
702 Ok(path)
703 } else if utils::hf::looks_like_hf_repo(model) {
704 utils::hf::ensure_model_downloaded(model)
705 } else {
706 anyhow::bail!("model path does not exist: {}", path.display())
707 }
708}
709
710/// Build a minimal Topology for a single worker from assigned layers.
711fn build_worker_topology(

Callers 1

run_as_masterFunction · 0.85

Calls 2

looks_like_hf_repoFunction · 0.85
ensure_model_downloadedFunction · 0.85

Tested by

no test coverage detected