factor_agent.web.run_view.Health#

class Health(phase, round, max_rounds, process, crashed, last_call, stalled, calls, time_left, tokens, round_tokens)[source]#

Bases: object

What a run is doing now, as its events file and its process tell.

phase is "planning" (a round is written, or the run was just opened, and no call of the next round has been sent), "asking" (the LLM is being asked for the round in progress) or "evaluating" (the Evaluator scores the round’s candidates); None when the run has stopped or crashed, or has no events file. round is the round in progress and max_rounds the round limit, None when the run has stopped or the limit is unknown. process is "running" or "gone" when the campaign’s process is checked on this host, and "unknown" when the campaign ran on another host or the run has no events file; crashed is true when the process is gone and the run recorded no stop. last_call is when the latest LLM call came back (UTC). stalled is true when the run looks stuck: no call was sent or came back for STALL_ASKING while asking. An evaluation never looks stuck: its length follows the data (an intraday round’s takes hours), so no limit tells a slow one from a stuck one. calls counts the calls of the round in progress by role, since the run was last opened; a run without an events file has only these counts, from its call files. tokens are the tokens of every call of the run, a round a resume dropped included, and round_tokens the same by round; None and empty without an events file. time_left estimates the seconds until the round or trial limit stops the run, from the mean length of its last RECENT_ROUNDS rounds; None while no round was timed, and once the run has stopped or crashed.

Attributes#

Health.phase#
Health.round#
Health.max_rounds#
Health.process#
Health.crashed#
Health.last_call#
Health.stalled#
Health.calls#
Health.time_left#
Health.tokens#
Health.round_tokens#