MCPcopy Index your code
hub / github.com/IBM/AssetOpsBench / _load_one_trajectory

Function _load_one_trajectory

src/evaluation/loader.py:36–42  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

34
35
36def _load_one_trajectory(path: Path) -> PersistedTrajectory:
37 raw = json.loads(path.read_text(encoding="utf-8"))
38
39 if raw.get("scenario_id") is None:
40 raw["scenario_id"] = path.stem
41
42 return PersistedTrajectory.from_raw(raw)
43
44
45def load_scenarios(paths: Iterable[Path] | Path) -> list[Scenario]:

Callers 1

load_trajectoriesFunction · 0.85

Calls 2

getMethod · 0.45
from_rawMethod · 0.45

Tested by

no test coverage detected