Skip to main content

read_record

read_record(path)

A record back off disk. Plain data; from_dict(record["specification"]) runs it.

Parameters

Name Type Description Default
path str | Path The run.json to read. required

Returns

Name Type Description
dict[str, Any] The record as plain data: specification, pyplatypus, history, derived if
dict[str, Any] the run had any, and the run-level facts beside the history - weights_epoch, the
dict[str, Any] epoch the surviving weights came from or None when they are not any one epoch’s,
dict[str, Any] and stop_reason. Nothing is reconstructed into objects, because the record is a
dict[str, Any] description of what happened and not a live thing.

import json, pathlib, tempfile path = pathlib.Path(tempfile.mkdtemp()) / “run.json” _ = path.write_text(json.dumps({“pyplatypus”: “0.7.0a1”, “history”: []})) read_record(path)[“pyplatypus”] ‘0.7.0a1’