trial_log
¶
Reading a trial's log file: the Dojo's log route and SensAI's job agent both read it the same way.
DEFAULT_LOG_ENTRY
module-attribute
¶
Python
DEFAULT_LOG_ENTRY: dict[str, Any] = {
"timestamp": 0,
"level": "Invalid Level",
"pathname": "",
"lineno": None,
"message": "",
}
What an entry has when its line leaves a field out.
find_log_file
¶
The trial's log: mojo.log if it has one, else the first *.log file by name, else None.
Source code in src/mujoco_mojo/utils/layers/dojo/trial_log.py
parse_log_file
¶
Parses a mojo.log file of newline-delimited JSON log entries.
Lines that aren't valid JSON (e.g. output from a library that doesn't use our JSON formatter) are appended to the message of the preceding entry. Entries missing fields are filled in with defaults.