feat(rollout): default prompt_config from agent dataset catalog#1097
Draft
gwarmstrong wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
Draft
feat(rollout): default prompt_config from agent dataset catalog#1097gwarmstrong wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
gwarmstrong wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
Conversation
ng_collect_rollouts previously required users to pass +prompt_config=<path> on every invocation, even when the agent YAML already declared the prompt_config for the dataset. This change looks up the matching dataset entry (by jsonl_fpath) in the agent's catalog and uses its prompt_config when the user hasn't explicitly overridden. Explicit +prompt_config= still takes priority. Falls back to None (previous behavior) when no catalog match, so rows with pre-rendered responses_create_params.input keep working. Signed-off-by: gwarmstrong <gwarmstrong@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ng_collect_rolloutspreviously required users to pass+prompt_config=<path>on every invocation, even when the agent's YAML already declared theprompt_configfor that dataset. Since agents'datasets: [...]catalogs (BenchmarkDatasetConfig) already contain{jsonl_fpath, prompt_config}pairs, we can look up the match automatically.When
+prompt_configis not explicitly set AND+agent_nameis, this change looks up the matching dataset entry in the agent's catalog (byjsonl_fpath) and uses its declaredprompt_config. Explicit user overrides still win; no match still falls back to previous behavior.Why
Without this, a migration author running a benchmark with raw JSONL fields (e.g.
{question, expected_answer}) hitsKeyError: 'responses_create_params'inside_preprocess_rows_from_config, even though the agent's YAML was already wired up with the right prompt for that exact JSONL. Now the intent declared in YAML is honored automatically.Before / after usage
Before (AIME25 rollouts):
ng_collect_rollouts \ +agent_name=aime25_math_with_judge_simple_agent \ +input_jsonl_fpath=benchmarks/aime25/data/aime25_benchmark.jsonl \ +output_jsonl_fpath=aime25_rollouts.jsonl \ +prompt_config=benchmarks/aime25/prompts/default.yaml # <-- required, even though it's in the agent YAMLAfter:
ng_collect_rollouts \ +agent_name=aime25_math_with_judge_simple_agent \ +input_jsonl_fpath=benchmarks/aime25/data/aime25_benchmark.jsonl \ +output_jsonl_fpath=aime25_rollouts.jsonl # prompt_config is inferred from the agent's dataset catalogPassing
+prompt_config=<path>explicitly still works and takes precedence.Behavior
+prompt_config=X, catalog hasYXused (explicit wins)+prompt_config, catalog has entry matching input'sjsonl_fpathprompt_configused+prompt_config, no matching catalog entryprompt_cfgstaysNone; rows must have pre-renderedresponses_create_params.input(previous behavior)+prompt_config, no+agent_name(row-levelagent_ref)Test plan
Unit tests added in
tests/unit_tests/test_rollout_collection.py::TestPromptConfigFromCatalog:test_explicit_prompt_config_wins_over_catalog- explicit+prompt_configoverrides catalogtest_catalog_fallback_used_when_input_matches- matchingjsonl_fpathuses catalogprompt_configtest_no_match_leaves_prompt_cfg_none- no match keepsprompt_cfgasNone(legacy pre-rendered rows keep working)test_no_agent_name_leaves_prompt_cfg_none- withoutagent_name, fallback is skippedtest_multiple_catalog_entries_picks_matching- correct entry is selected among multiple datasetspytest tests/unit_tests/- full unit test suite (203 tests passing)ruff check+ruff format --checkon changed files