job_status_agent
¶
SensAI domain agent for job status: read-only, and it answers in words from what its tools worked out.
get_job_summary
async
¶
get_job_summary(ctx: RunContext[SensAIDeps]) -> str
Returns a high-level summary of the current job's status and progress: counts, how many trials are running and waiting, timing and the estimate of what is left.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_running_trials
async
¶
get_running_trials(ctx: RunContext[SensAIDeps]) -> str
Returns the trials running right now, each with the step it is in, how long it has been in that step and how long it has been running in all, the longest running first.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_trials_by_duration
async
¶
get_trials_by_duration(
ctx: RunContext[SensAIDeps],
count: int = 5,
longest: bool = True,
outcome: Outcome = "completed",
) -> str
Ranks the finished trials by how long each took, so one call answers which trial was slowest or fastest. Use this instead of looking at trials one at a time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
count
|
int
|
How many trials to list, such as 5 (at most 20). |
5
|
longest
|
bool
|
True to list the trials that took the longest first, False for the ones that took the shortest first. |
True
|
outcome
|
Outcome
|
Which trials to rank. "completed" (the default) is the successes and the ones that missed a requirement, as the job's own average is taken over. "success", "failure" (missed a requirement) or "error" (crashed) ranks only those, such as outcome="failure" for the slowest trial that failed. "any" ranks every finished trial, errored ones too. |
'completed'
|
Returns:
| Type | Description |
|---|---|
str
|
The trials in order, each with its total time and how it ended, and how many finished trials were ranked. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_duration_statistics
async
¶
get_duration_statistics(ctx: RunContext[SensAIDeps]) -> str
Returns how long the completed trials took as a spread (fastest, median, mean, 90th percentile, slowest), by how they ended, the time in each step (generating and solving) and how many trials finish per minute.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_requirement_results
async
¶
get_requirement_results(
ctx: RunContext[SensAIDeps], requirement: str = ""
) -> str
Returns how each requirement did across the trials, most failures first. With a requirement named, also the trials that missed it and the reasons they gave.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
requirement
|
str
|
Leave it out for every requirement. To look into one, its name or part of it, such as "touchdown_speed". |
''
|
Returns:
| Type | Description |
|---|---|
str
|
Pass and fail counts and rates, and for a named requirement the failing trial numbers and the messages. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_errored_trials
async
¶
get_errored_trials(ctx: RunContext[SensAIDeps]) -> str
Returns the trials that errored (crashed with an exception, as opposed to missing a requirement), grouped by what each trial's log says went wrong (the exception), with the step each was in when it broke.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_trial_breakdown
async
¶
get_trial_breakdown(ctx: RunContext[SensAIDeps]) -> str
Returns the trial numbers in each state: succeeded, failed requirements, errored, running and waiting to start.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_trial_details
async
¶
get_trial_details(
ctx: RunContext[SensAIDeps], trial_num: int
) -> str
Returns one trial's details: how it ended, the time of each step, how long it has run so far if it is running, and the result of each requirement with its message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
trial_num
|
int
|
The number of the trial, such as 12. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The trial's steps, total time and requirement results, and for an errored one what its log says went wrong. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_job_configuration
async
¶
get_job_configuration(ctx: RunContext[SensAIDeps]) -> str
Returns how the job was started: its type, who started it and when, the execution mode, the number of processes, the seed, the working folder, the generator and runtime, and the --arg and --kwarg values it ran with.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_recent_trials
async
¶
get_recent_trials(
ctx: RunContext[SensAIDeps],
count: int = 5,
outcome: Outcome = "any",
) -> str
Lists the trials that finished most recently, newest first, each with how long ago it finished and how long it took, and for a failure the requirements it missed or for an error what its log says.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
count
|
int
|
How many trials to list, such as 5 (at most 20). |
5
|
outcome
|
Outcome
|
Which trials to list. "any" (the default) is every finished trial. "success", "failure" (missed a requirement) or "error" (crashed) lists only those, such as outcome="error" for the latest errors. "completed" is the successes and the failures together. |
'any'
|
Returns:
| Type | Description |
|---|---|
str
|
The trials, newest first, and how many finished in all. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_completion_timeline
async
¶
get_completion_timeline(ctx: RunContext[SensAIDeps]) -> str
Returns when trials finished: the job's life so far in equal time slices, each with how many trials finished, how they ended and their mean time, so a slowdown, a stall, or the time errors began can be seen.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_trial_log
async
¶
get_trial_log(
ctx: RunContext[SensAIDeps],
trial_num: int,
count: int = 20,
level: LogLevel = "any",
) -> str
Returns the end of one trial's log: each entry's time, level and message, with a long traceback cut to its first and last lines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
trial_num
|
int
|
The number of the trial, such as 12. |
required |
count
|
int
|
How many of the last entries to show, such as 20 (at most 30). |
20
|
level
|
LogLevel
|
Which entries to show. "any" (the default) is all of them, "warning" is warnings and worse, "error" is errors only, such as level="error" to find what went wrong. |
'any'
|
Returns:
| Type | Description |
|---|---|
str
|
The last entries of the trial's log, oldest first, or that the trial has no log. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
compare_trials
async
¶
compare_trials(
ctx: RunContext[SensAIDeps], trial_nums: list[int]
) -> str
Compares trials side by side: how each ended, its time in each step, which requirements differ between them, and for an errored one what its log says.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
trial_nums
|
list[int]
|
The numbers of the trials to compare, two to six, such as [3, 7]. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The trials compared line by line, with how much longer the slowest took than the fastest. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_input_distributions
async
¶
get_input_distributions(ctx: RunContext[SensAIDeps]) -> str
Returns the input distributions the job's trials were sampled from: each one's name, type, category, unit, nominal value and parameters (which give its range or spread, such as low and high for a uniform or mu and sigma for a normal), and any display name, source and comment.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_trial_inputs
async
¶
get_trial_inputs(
ctx: RunContext[SensAIDeps], trial_num: int
) -> str
Returns what one trial drew for each input, in the unit the input was declared in, with how many standard deviations from the mean the draw is and its percentile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
trial_num
|
int
|
The number of the trial, such as 12. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Each input with the value (or label) the trial drew, or that the trial saved nothing. |
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/job_status_agent.py
get_input_outliers
async
¶
get_input_outliers(
ctx: RunContext[SensAIDeps],
distribution: str,
min_sigma: float = 2.0,
count: int = 15,
) -> str
Returns the trials that drew one input at least some number of standard deviations from its mean, most extreme first, with each draw.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
RunContext[SensAIDeps]
|
The run context holding the dashboard state; it is not something you send. |
required |
distribution
|
str
|
The input's name or part of it, such as "wind_speed". Use get_input_distributions to see the names. |
required |
min_sigma
|
float
|
How many standard deviations from the mean a draw has to be, such as 2 (the default) or 3. |
2.0
|
count
|
int
|
How many trials to list, such as 15 (at most 30). Every trial number is given at the end whatever this is. |
15
|
Returns:
| Type | Description |
|---|---|
str
|
How many trials drew it that far out, the most extreme of them with their values, and all their numbers. |