MCPcopy Create free account
hub / github.com/MinishLab/vicinity / load

Method load

vicinity/backends/base.py:27–32  ·  view source on GitHub ↗

Load the arguments from a file.

(cls: type[ArgType], file: Path)

Source from the content-addressed store, hash-verified

25
26 @classmethod
27 def load(cls: type[ArgType], file: Path) -> ArgType:
28 """Load the arguments from a file."""
29 with open(file) as f:
30 data = json.load(f)
31 data["metric"] = Metric.from_string(data["metric"])
32 return cls(**data)
33
34 def dict(self) -> dict[str, Any]:
35 """Dump the arguments to a dict."""

Callers 1

load_from_hubFunction · 0.45

Calls 1

from_stringMethod · 0.80

Tested by

no test coverage detected