accelmo.runlog.reader¶
Reading run logs, including those of fits that are still running.
- accelmo.runlog.reader.find_stages(root)[source]¶
Every stage logged anywhere below
root(orrootitself), oldest first.rootmay be several directories, e.g. the run logs of runs that sit side by side.- Return type:
list[StageLog]- Parameters:
root (Path | Sequence[Path])
- class accelmo.runlog.reader.StageLog(directory)[source]¶
Bases:
objectRead access to one stage directory written by
RunLog.Nothing is cached: every call reads the files again, so a stage that is still running shows its newest steps. Use
version()to tell whether anything changed since the last read.- Parameters:
directory (Path)
- directory: Path¶
- property info: dict[str, Any]¶
The contents of
stage.json.
- property name: str¶
Stage name.
- property started: float¶
Start time, seconds since the epoch.
- property knob_names: list[str]¶
Fitted knob names.
- property metadata: dict[str, Any]¶
Stage metadata given by the fitter.
- property result: dict[str, Any] | None¶
How the fit ended, or
Nonewhile it is still running (or was killed).
- property uncertainty: dict[str, Any] | None¶
The uncertainty stage’s state (fitted knobs, progress, timing), or
Nonebefore it starts.
- property label: str¶
nameplus the run’s ownlabel(metadata) and the directory, to tell repeated stages apart.
- version()[source]¶
Sizes of the growing files: changes whenever a step is logged.
- Return type:
tuple[int,int]