Use this when
Use NeMo Gym ingestion when your source data is either:- one parsed rollout dictionary already loaded in Python
- a JSONL export where each line is one NeMo Gym rollout object
Main helpers
convert_nemogym_rollout_to_agent_run(rollout)converts one parsed rollout object into oneAgentRun.convert_nemogym_jsonl_file_to_agent_runs(file_path)reads a JSONL file and converts each line into oneAgentRun.
Example
To convert a JSONL export:More on the conversion process
Each NeMo Gym rollout becomes one DocentAgentRun.
At a high level, the converter:
- turns the rollout input and output into a single Docent transcript
- maps
developermessages to Docentsystemmessages - converts NeMo Gym function calls into Docent tool calls and tool messages
- stores the rollout reward in
agent_run.metadata["scores"]["reward"] - preserves extra request and response data under
agent_run.metadata["source"]
responses_create_params.input, response.output, agent_ref.name, _ng_task_index, and _ng_rollout_index.
responses_create_params.input can be either:
- a string, which Docent converts into a single user message
- an array of structured input items
ConversionError instead of trying to approximate the data.
