MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / _load_partial

Function _load_partial

benchmark/evaluation/run_benchmark.py:356–372  ·  view source on GitHub ↗

Load `dense.json.partial`-style file. Return (results, timing_accum) or None.

(partial_path, signature)

Source from the content-addressed store, hash-verified

354
355
356def _load_partial(partial_path, signature):
357 """Load `dense.json.partial`-style file. Return (results, timing_accum) or None."""
358 if not os.path.isfile(partial_path):
359 return None
360 try:
361 with open(partial_path, 'r') as f:
362 data = json.load(f)
363 except Exception as e:
364 print(f"[resume] failed to read {partial_path}: {e}; ignoring partial.")
365 return None
366 if data.get("signature") != signature:
367 print(f"[resume] signature mismatch in {partial_path}; ignoring partial "
368 f"(re-running from scratch).")
369 return None
370 results = data.get("all_results") or []
371 timing_accum = data.get("timing_accum") or {}
372 return results, timing_accum
373
374
375def _save_partial(partial_path, signature, all_results, timing_accum):

Callers 1

mainFunction · 0.85

Calls 2

loadMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected