plot_config_catalog
¶
What the plot-config agent needs to know to edit a plot config: a short list of its fields, a signal search, and a filter reference.
The whole JSON schema of the config is far heavier than the agent needs, since it lists every filter type in full. The field list here has one line per field, built from the models' own descriptions so it cannot drift from them. Filters are looked up on demand, since there are dozens and most edits touch none.
find_signals
¶
find_signals(
columns: Collection[str],
query: str,
limit: int = _MAX_SIGNAL_MATCHES,
metadata: Mapping[str, ColumnMetadata] | None = None,
) -> list[str]
The columns that match query, so a signal can be named exactly without listing every column.
A column matches when every word of the query (case is ignored, and spaces, /, :, _, . and - separate words) is in its name or, where metadata has some for it, is the start of a word of its description, quantity or unit. That way box1 angular velocity finds Bodies/box1/xvelr:y, and veloc finds a velocity, while y does not find every description with a y somewhere in it. The columns with the most of the words in their name come first, then the shortest. When nothing matches, the closest spellings of the name are returned instead.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/plot_config_catalog.py
plot_config_catalog
¶
plot_config_catalog() -> str
One line per editable field of the plot config, its x-axis and each signal, for the plot agent's prompt.
Source code in src/mujoco_mojo/utils/layers/dojo/sensai/plot_config_catalog.py
filter_catalog
¶
The filter types a signal or the x-axis can be given, from the filter schema the filter editor uses.
Without type_name it is one line per type (name and what it does). With one, it is that type's parameters, how to write the filter entry, and nothing else.