accelmo.monitor.source¶
What the machine side supplies to the monitor.
- class accelmo.monitor.source.OpticsSource(*args, **kwargs)[source]¶
Bases:
ProtocolTurns knobs into optics for one model.
The monitor builds one per distinct stage metadata (and per worker thread) and calls it from a background thread, so it may hold a live MAD process. Every method returns plain data; the monitor caches it on disk, so the same knobs are never computed twice.
- references()[source]¶
Tables that do not depend on the knobs: the measurement, design, …
- Return type:
dict[str,DataFrame]
- class accelmo.monitor.source.MonitorSpec(make_source=None, panels=list(), version='1')[source]¶
Bases:
objectHow to monitor one kind of fit: its optics source and its panels.
make_sourcebuilds anOpticsSourcefrom a stage’s metadata (theOutputConfig.run_metadatathe fit was given).panelsare(title, function)pairs shown before the generic ones. Bumpversionwhenever the source would give different optics for the same knobs, so old cached results are not reused.- Parameters:
make_source (Callable[[Mapping[str, Any]], OpticsSource] | None)
panels (Sequence[tuple[str, Callable[[MonitorView], Model]]])
version (str)
- make_source: Callable[[Mapping[str, Any]], OpticsSource] | None = None¶
- panels: Sequence[tuple[str, Callable[[MonitorView], Model]]]¶
- version: str = '1'¶