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

Function build_worker_topology

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

Build a minimal Topology for a single worker from assigned layers.

(
    worker_name: &str,
    address: &str,
    layers: &[String],
)

Source from the content-addressed store, hash-verified

709
710/// Build a minimal Topology for a single worker from assigned layers.
711fn build_worker_topology(
712 worker_name: &str,
713 address: &str,
714 layers: &[String],
715) -> cake::Topology {
716 let mut topology = cake::Topology::new();
717 topology.insert(
718 worker_name.to_string(),
719 cake::Node {
720 host: address.to_string(),
721 description: None,
722 layers: layers.to_vec(),
723 vram_bytes: 0,
724 tflops: 0.0,
725 backend: String::new(),
726 hostname: String::new(),
727 os: String::new(),
728 },
729 );
730 topology
731}
732
733/// Return the base cache directory for zero-config model data.
734fn cache_base_dir() -> PathBuf {

Callers 1

run_as_workerFunction · 0.85

Calls 1

to_vecMethod · 0.80

Tested by

no test coverage detected