Command Palette

Search for a command to run...

Назад к скиллам
скилл № 54869

nemo-gym-reward-profiling

Use when deciding which NeMo Gym tasks to train on with RL: collecting repeated rollouts with gym eval run, profiling their rewards with gym eval profile…

БесплатноЗапускает вложенные скрипты
NVIDIAот NVIDIA★ 4 269 звёзд на GitHub

Установить nemo-gym-reward-profiling в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

NeMo Gym Reward Profiling

Purpose

Before RL training, run every task several times and look at how its reward changes between repeats. Group-based RL such as GRPO learns from the differences between repeats of the same task, so a task that gets the same reward every time, whether always solved or never solved, teaches the model nothing. This skill turns gym eval profile output into that decision and keeps every number honest when some rollouts are missing.

When to Use This Skill

  • "Which tasks should I keep for RL?", "filter my dataset by difficulty", "is this environment ready to train on?"
  • Per-task pass rates, reward spread or variance across repeats, tasks that never or always pass.
  • Running gym eval profile, reading its output files, or fixing its errors.
  • Deciding whether the numbers from a partial or interrupted run can be trusted.

Hand off when the main job is different:

  • Running, resuming or monitoring an evaluation job, or producing a benchmark score: the evaluation-running skill (run-and-babysit-eval in the Gym repo).
  • Comparing two runs, or explaining why a score differs from a published number: the results-analysis skill (nemo-gym-score-triage in the Gym repo).
  • Choosing repeat counts to measure a benchmark score precisely: nemo-gym-repeat-planning in the Gym repo.
  • A crash, a stack trace, or servers that never start: nemo-gym-debugging in the Gym repo.

Prerequisites

  • NeMo Gym (pip install "nemo-gym>=0.7") for gym env start, gym eval run and gym eval profile.
  • uv on the PATH (pip install uv) to start servers: gym env start builds each server's environment with it.
  • A model endpoint and its API key, only when rollouts still have to be collected.
  • Python for the bundled script. It needs no packages and no Gym checkout.

Instructions

1. Collect repeated rollouts

Skip this step if the user already has a rollouts file and the <stem>_materialized_inputs.jsonl written next to it.

Put the model endpoint in env.yaml in the working directory. If the file already exists, add or update these keys rather than replacing the file:

policy_base_url: https://integrate.api.nvidia.com/v1
policy_api_key: <your key>
policy_model_name: <model id>

Then start the servers, wait until every server shows ✓, and collect:

# Terminal 1 (or run it in the background). Use --resources-server <name> for an environment shipped with
# nemo-gym, or --config <file> for your own. vllm_model talks to any OpenAI-compatible chat endpoint
# (vLLM, NVIDIA API); openai_model needs the OpenAI Responses API.
gym env start --resources-server <name> --model-type vllm_model

# Terminal 2. --agent takes the first name on the agent's line in gym env status, such as mcqa_simple_agent.
gym env status
gym eval run --no-serve --agent <agent> \
    --input tasks.jsonl --output results/rollouts.jsonl \
    --num-repeats 8 --concurrency 16

gym eval run writes results/rollouts.jsonl (one line per saved rollout) and results/rollouts_materialized_inputs.jsonl (one line per planned rollout, that is every task times every repeat, with _ng_task_index and _ng_rollout_index). Without --no-serve, gym eval run starts the servers itself but only runs the environment's prepared data; it rejects --input. For long runs, cluster jobs and resuming, use the evaluation-running skill.

Use enough repeats. A task with pass rate p gets the same reward on all n repeats with probability pⁿ + (1 − p)ⁿ, so hard tasks look unsolvable when n is small:

True pass rate Looks constant at 4 repeats at 8 at 16
5% 81% 66% 44%
10% 66% 43% 19%
25% 32% 10% 1%
50% 13% 1% <1%

Use at least 8 repeats when choosing training tasks, and more when the environment has many hard tasks.

2. Profile

gym eval profile \
    --inputs results/rollouts_materialized_inputs.jsonl \
    --rollouts results/rollouts.jsonl

It writes three files next to the rollouts: rollouts_reward_profiling.jsonl (one row per task), rollouts_agent_metrics.json (one entry per agent) and rollouts_repeat_level_metrics.json (one entry per repeat). See references/output-format.md for every field.

If some planned rollouts were never saved, it stops with Materialized input rows and rollout results do not have matching rollout keys. Missing rollout results for N materialized input rows. Then either:

  • finish the run: rerun the same gym eval run command with --resume. It runs the planned rollouts that have no saved result; which recorded failures it retries depends on the version and the kind of failure; or
  • profile what was saved: add ++allow_partial_rollouts=True, and report the gap as in step 3.

3. Check coverage before reading any reward

Run the bundled script from this skill's folder on the profile. It needs only Python and the files, so it also works where gym is not installed:

python3 <skill fo
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • BENCHMARK.md
  • agents/openai.yaml
  • evals/EVAL.md
  • evals/evals.json
  • evals/files/code_run/code_rollouts.jsonl
  • evals/files/code_run/code_rollouts_agent_metrics.json
  • evals/files/code_run/code_rollouts_materialized_inputs.jsonl
  • evals/files/code_run/code_rollouts_repeat_level_metrics.json
  • evals/files/code_run/code_rollouts_reward_profiling.jsonl
  • evals/files/if_run/if_rollouts.jsonl
  • evals/files/if_run/if_rollouts_agent_metrics.json
  • evals/files/if_run/if_rollouts_materialized_inputs.jsonl
  • evals/files/if_run/if_rollouts_repeat_level_metrics.json
  • evals/files/if_run/if_rollouts_reward_profiling.jsonl
  • evals/files/math_run/math_rollouts.jsonl
  • evals/files/math_run/math_rollouts_agent_metrics.json
  • evals/files/math_run/math_rollouts_materialized_inputs.jsonl
  • evals/files/math_run/math_rollouts_repeat_level_metrics.json
  • evals/files/math_run/math_rollouts_reward_profiling.jsonl
  • evals/files/tool_run/tool_rollouts.jsonl
  • evals/files/tool_run/tool_rollouts_agent_metrics.json
  • evals/files/tool_run/tool_rollouts_materialized_inputs.jsonl
  • evals/files/tool_run/tool_rollouts_repeat_level_metrics.json
  • evals/files/tool_run/tool_rollouts_reward_profiling.jsonl
  • references/output-format.md
  • scripts/summarize_profile.py
  • skill-card.md
  • skill.oms.sig

FAQ

Что делает скилл nemo-gym-reward-profiling?

Use when deciding which NeMo Gym tasks to train on with RL: collecting repeated rollouts with gym eval run, profiling their rewards with gym eval profile, reading per-task pass rates and reward spread, finding tasks that never or always pass, and reporting coverage honestly for partial runs. Not for benchmark scoring runs, comparing runs or explaining score gaps, planning benchmark repeats, or debugging crashed runs.

Как установить скилл nemo-gym-reward-profiling?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл nemo-gym-reward-profiling запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить nemo-gym-reward-profiling с