pyfebiopt.monitoring.runstate
Represent optimization runs and iteration histories for the monitor.
Classes
Record metrics for a single optimizer iteration. |
|
Track the lifecycle and metadata of an optimization run. |
Module Contents
- class pyfebiopt.monitoring.runstate.IterationRecord
Record metrics for a single optimizer iteration.
- index: int
- cost: float
- theta: dict[str, float]
- metrics: dict[str, Any]
- timestamp: float
- series: dict[str, dict[str, list[float]]] | None = None
- to_dict() dict[str, Any]
Serialize the iteration record into JSON-friendly form.
- Returns:
JSON-ready payload.
- Return type:
dict[str, Any]
- class pyfebiopt.monitoring.runstate.OptimizationRun
Track the lifecycle and metadata of an optimization run.
- run_id: str
- label: str
- status: str = 'created'
- created_at: float
- updated_at: float
- parameters: dict[str, Any]
- meta: dict[str, Any]
- iterations: list[IterationRecord] = []
- to_dict() dict[str, Any]
Serialize the run along with its metadata.
- Returns:
JSON-ready run payload.
- Return type:
dict[str, Any]
- classmethod from_dict(payload: dict[str, Any]) OptimizationRun
Rebuild a run snapshot from the persisted dictionary.
- Returns:
Reconstructed run snapshot.
- Return type:
- apply_event(event: str, payload: dict[str, Any], ts: float) None
Update the run metadata based on the incoming event.