Skip to main content

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.

v1.0.0New

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install skills-nemo-gym-reward-profiling
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/skills-nemo-gym-reward-profiling/SKILL.md

Setup guide →
0Save

Instructions

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 rateLooks constant at 4 repeatsat 8at 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 folder>/scripts/summarize_profile.py results/rollouts_reward_profiling.jsonl

It reads the materialized inputs and agent metrics beside the profile, prints coverage first (measured, never saved and masked rollouts), then sorts the tasks into groups (see Examples). It catches what the profile file alone hides:

  • Tasks with no measured rollout. nemo-gym 0.7.0 and earlier leave them out of _reward_profiling.jsonl entirely. Later versions (the main branch today) keep a row with num_rollouts: 0 and no reward fields, except for a task whose every planned rollout was saved and masked. The summary that gym eval profile prints says N without rollouts dropped from output either way. Count tasks from the materialized inputs, never from the profile file alone.
  • The headline mean. mean/reward in _agent_metrics.json averages measured rollouts only. Report it with its coverage, for example "0.51 over 41 of 48 planned rollouts; task 10 not measured", never as the environment's pass rate. When several agents ran the same tasks, each agent has its own mean. The _aggregate_metrics.json that gym eval run writes can count some failed or missing rollouts as 0, depending on the version and settings such as count_failure_classes_as_zero, so its mean can differ from the profile's.
  • Per-repeat counts. In _repeat_level_metrics.json, missing_count counts only tasks that were measured in another repeat. A task missing from every repeat is never counted there, so a repeat can cover fewer tasks than planned while its missing_count stays 0. Compare sample_count with the number of planned tasks.
  • Masked rollouts. An environment can mark a saved result as not a real measurement. gym eval profile leaves masked rollouts out of every per-task count and statistic, so a row's expected_num_rollouts is its planned count minus its masked rollouts. The printed completion line still counts them as saved, and _agent_metrics.json reports coverage/masked_rollouts. In 0.7.0 and earlier, --resume treats a masked result as saved and does not run it again; collect those tasks in a new run with its own --output.
  • Failed rollouts. A failed /run request stops the run unless +route_failures_to_sidecar=true is set (after 0.7.0 it is written to <stem>_failures.jsonl first); with the option, the failure goes to that file and the run continues. Failures that the agent or environment returns as a result go to that file too. Either way they are not in rollouts.jsonl, so the profile counts them as never saved. Read that file before rerunning: --resume skips failures recorded as final.

4. Choose the training tasks

What the profile showsWhat it meansWhat to do
Reward varies across repeatsThe model solves it some of the timeKeep: these carry the learning signal
Same top reward on every repeatAlready solvedDrop from RL training
Same zero reward on every repeatNever solvedCheck before dropping (below)
Same middle reward on every repeat, such as 0.5 each timeNo spread, even though the mean looks mediumNo signal; treat like a constant task
One measured rolloutSpread unknown; std/reward is 0 for any single valueCollect more repeats
Partial (fewer measured than planned)Statistics from fewer repeats: rollouts never saved or maskedKeep the decision tentative; collect the missing rollouts
No measured rolloutNot measuredRerun before deciding; never count it as 0 or 1

Judge spread with min/reward and max/reward (or std/reward with num_rollouts), not with mean/reward: two tasks with mean 0.5 can be 1, 0, 1, 0 (useful) or 0.5 every time (useless).

Before dropping a task that never passes, read two or three of its rollouts. Join rollout_infos in the profile row to full rows in rollouts.jsonl on _ng_task_index and _ng_rollout_index.

  • The model gives the same answer every time and it differs from the expected answer: check the label and the verifier first. A wrong label, or a verifier that rejects a correct answer in another format, looks exactly like a hard task.
  • Outputs are empty, cut off at the token limit, or never reach a final answer: the setup is wrong (limits, prompt, parser), not the task.
  • Answers are wrong in different ways: the task is probably too hard for this model now. It may become useful as the model improves.

5. Report

Lead with coverage, then the decision. Take every number from the files or the script output, and say when a number covers only part of the run. See Examples.

Examples

A math environment, 12 tasks with 4 planned repeats each; the job stopped early and was profiled with ++allow_partial_rollouts=True. The script prints:

Coverage: 41 of 48 planned rollouts measured (85.42%): 7 never saved, 0 masked.
Tasks: 12; 9 complete, 2 partial, 1 with no measured rollout.
  Not in the profile file (no saved rollout): 10
Mean reward over measured rollouts: 0.5122 (says nothing about tasks with none).
* = partial: fewer measured rollouts than planned.

Reward varies across repeats (learning signal): 5, 6, 7, 8, 9*
Same reward (0.0) on every repeat (no signal): 3, 4, 11*
Same reward (1.0) on every repeat (no signal): 0, 1, 2
No measured rollout (not measured): 10

Task 4's rollouts all answer 400 while its expected answer is 401. The report:

Coverage: 41 of 48 planned rollouts measured (85%). Task 10 has none; tasks 9 and 11 are partial.
Keep (reward varies): 5, 6, 7, 8, and 9 (only 2 of 4 repeats measured).
Drop, always solved: 0, 1, 2.
Never solved: 3, 4, 11 (3 of 4 measured). Task 4: the model answers 400 every time but the expected answer is 401; check the label before dropping it.
Not measured: 10. Rerun with --resume before deciding.
Mean reward 0.51 over the 41 measured rollouts only.

Available Scripts

ScriptPurposeArguments
scripts/summarize_profile.pyCoverage and task groups from gym eval profile output, every number read from the files<stem>_reward_profiling.jsonl, optional --inputs <stem>_materialized_inputs.jsonl (found automatically beside the profile), optional --json (lists every task; the text report lists up to 20 per group)

Troubleshooting

SymptomCauseFix
gym env start stops with model endpoint(s) never answered (after waiting up to 600 s by default)Nothing is listening at policy_base_url: wrong URL, or the server is down or still startingCheck the URL in env.yaml, and check that curl -i <policy_base_url>/models gets an HTTP answer. A hostname that does not resolve is reported as such instead
gym eval run saves no rollout: it fails with ClientResponseError: 500, message='Internal Server Error' on /run, or, when failures are recorded instead of stopping the run (+route_failures_to_sidecar=true, or by default for many environments after 0.7.0), ends with None of the N dispatched rollouts produced a resultThe model endpoint rejected the requests. The gym env start log shows [upstream_request_failed] ... status=401 or 403 for a bad or missing API keyFix policy_api_key, then rerun
The gym env start log shows status=404 for .../v1/responsesThe endpoint or model does not serve the Responses API (some NVIDIA API models serve only chat completions)Use --model-type vllm_model
Sandboxed environment: the run stops, or rollouts go missing, with sandbox or container errors in the logsThe sandbox was not ready or not reachable (Docker not running, provider unreachable, container still starting). After 0.7.0, recorded failures carry _ng_failure_class values that start with provider_Fix the sandbox provider, then rerun with --resume. Use nemo-gym-debugging in the Gym repo for the details
gym eval profile: do not have matching rollout keysPlanned rollouts were never savedRerun with --resume, or add ++allow_partial_rollouts=True and report coverage
gym eval profile: Rollout results contain rows with no matching materialized input rowsThe inputs file belongs to a different runUse the <stem>_materialized_inputs.jsonl written next to the same rollouts file
gym eval profile: Duplicate result row for rollout key (or Duplicate materialized input row)Two runs wrote into one file. Some versions after 0.7.0 also keep the superseded rows of retried masked resultsCollect each run into its own --output. gym eval profile cannot read a run with superseded rows yet; say so rather than editing the file
With ++allow_partial_rollouts=True: Reward profile completion: 0/N rollout rows and an empty profileNothing was savedFix collection first; there is nothing to profile
UserWarning: N repeat(s) are missing rollouts for some tasksRepeats have different numbers of measured rollouts (missing or masked rollouts)Expected for a partial or masked run; report coverage as in step 3
UserWarning: wandb is not installed, so the histogram/* stats are being skippedwandb is optional after 0.7.0Harmless: the profile files do not include those statistics anyway
gym: command not foundNeMo Gym is not installed in this environmentpip install "nemo-gym>=0.7" to collect or profile. The summary script works on existing profile files without it

Limitations

  • The script summarizes gym eval profile output; it does not recompute statistics from the rollouts.
  • Telling masked rollouts from rollouts never saved needs the materialized inputs and the masked total in _agent_metrics.json, which counts only rows that name an agent (rows of Environment Server tasksets do not). When either is missing or incomplete, the script reports that split as unknown.
  • When the same task ran under several agents or Environment Servers, the script reports each task and run separately and names each run as the materialized inputs do: by its agent, or by its Environment Server when several servers front one agent. If masking removed every rollout of a run, gym eval profile can name the other runs differently, so the profile file and _agent_metrics.json may use other names. When a row with no measured rollout could belong to more than one run, the script reports whether those runs are in the profile file as unknown.
  • A profile shows which tasks give a signal, not why a task fails. Read the rollouts for that.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
web-performance-auditorAI-powered web performance auditor for frontend and web developers. Use it to audit a website or web app, diagnose poor Core Web Vitals (LCP, CLS, INP) and low Lighthouse scores, review JavaScript bundle size, code splitting, lazy loading, image and font loading, hydration, React rendering, Next.js/Nuxt patterns, network waterfalls, third-party scripts, and caching. Produces a prioritized, senior-engineer performance audit with a score and concrete fixes.12 installsi4h-catheter-navigationOverview of `workflows/catheter_navigation/` (fluorosim DRR, XPBD physics, vasculature digital twin). Use when the user asks what the catheter navigation workflow is, what's supported, or where to start.0 installsjetson-speculative-decodingAdd EAGLE-3 or draft-model speculative decoding to a Jetson vLLM server when TPOT is the bottleneck.0 installsomniverse-content-servicesOmniverse Content Services, also discoverable as Omniverse Content Workspace or USD Content Workspace. Use for USD content collaboration as well as content access. Guide USD workflows on existing infrastructure, USD content versioning, 3D creation pipelines, and data access across distributed and scale-out compute. Use for manufacturing, automotive, factory and digital-twin workflows, architecture and construction, media and 3D content, robotics, fleet simulation, and physical AI content delivery. Discover requirements and route to ovstorage, ovpackage, ovlive, usd-content-workspace, and usd-caches experts.0 installsdoca-rmaxDOCA Rivermax (doca_rmax) receive streams for timing-precise media over IP (SMPTE ST 2110 video / audio, market data, scientific feeds) on a target BlueField DPU (DOCA Rivermax apps run only there), once the Rivermax libraries and license are installed; getting them is doca-setup / doca-public-knowledge-map territory. Trigger on "ST 2110 receive isn't getting frames", "sub-microsecond jitter on my media receiver", "NOT_SUPPORTED from doca_rmax_init", "no recv events after stream start", or "license check failing on a media receiver", even without naming Rivermax. Covers doca_rmax_in_stream sessions, the SDK + license precondition check, doca_rmax_get_*_supported capability queries, pairing with doca-eth queues and doca-flow steering, and DOCA_ERROR_* from Rivermax calls. Refuse and route elsewhere for programming the underlying queue (doca-eth), steering rules (doca-flow), PTP / clock sync (doca-firefly), or best-effort packet I/O.0 installsjetson-video-recipeUse when turning a Jetson encoder use case into one surface-neutral recipe with native Video Codec SDK and PyNvVideoCodec projections.0 installs

More from skills

View source →
nvidia-appNVIDIA App MCP: drivers, games, laptops, overlay. Check drivers, manage and optimize games, configure laptop features.2 installsnvidia-skill-finderUse for NVIDIA-related requests where an NVIDIA skill might help, even if the user did not ask for a skill. Trigger on NVIDIA products, hardware, software, SDKs, GPUs, Jetson/JetPack/L4T/BSP/SDK Manager/driver/flashing/setup, CUDA, NIM, NeMo, Omniverse/OpenUSD/SimReady, Isaac, RAPIDS/cuDF, cuPyNumeric, cuOpt, Dynamo, Holoscan, TensorRT, DeepStream, VSS, TAO, NGC/NVCF. Do not use for generic non-NVIDIA route, optimize, deploy, AI, video, data, or infrastructure tasks.1 installstao-run-automlRun container-backed AutoML / hyperparameter optimization (HPO) for NVIDIA TAO networks using AutoMLRunner. Handles algorithm selection (bayesian, hyperband, asha, bohb, llm, hybrid, autoresearch), WandB experiment tracking, job execution on any TAO SDK platform, result interpretation, and per-rec custom evaluation hooks. Use when the user mentions TAO AutoML, hyperparameter optimization, HPO, automl, automl_settings, AutoMLRunner, tao_automl, bayesian search, hyperband, ASHA, LLM-guided search, autoresearch, or wants to tune train/evaluate/inference/distill/prune/quantize for a TAO network. Model actions use the resolved image; venv training requires an explicit request. Platform-agnostic — runs on any SDK (Brev, SLURM, Kubernetes, Docker). Do not use generic "keep improving" language alone to override a matching domain-specific DEFT workflow; attribute-labelled CLIP / SigLIP image-retrieval loops belong to tao-run-deft-pas unless HPO is explicit.1 installscdf-event-video-generationRun the CDF Orchestration Event Video Generation DAG on Kubernetes or OSMO - image-to-video anomaly generation, auto-labeling, and anomaly dataset generation. Select for requests about event video generation, anomaly video generation, image-to-video synthesis, Cosmos3 image2video, anomaly dataset creation, safety/surveillance SDG, or generating person-falling, person-climbing, person-running, fighting, smoking/vaping, fire/smoke, or shoplifting video clips from a seed image. Covers both event_video_generation_dag_k8s and the external-endpoints-only event_video_generation_dag_osmo. Runs environment setup first when controller readiness is unknown. Not for person-crop clothing/attribute augmentation (that is cdf-image-attribute-augmentation) and not for video style transfer.1 installsnvidia-ontology-setupSet up or troubleshoot the Auto Ontology runtime. Use for Helm (the official install), Docker Compose, developer setup, and MCP connection to an existing deployment.1 installsfastgen-developImplement, refactor or review NVIDIA FastGen library code using its shared design, formatting, documentation and testing conventions. Use for source changes and code reviews; configuring or running an existing workflow alone does not need this skill.0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.631 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.532 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.342 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.244 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.172 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions144 installs

Frequently asked questions about nemo-gym-reward-profiling

What does the nemo-gym-reward-profiling skill do?

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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the nemo-gym-reward-profiling skill?

Run `npx @skills-hub-ai/cli install skills-nemo-gym-reward-profiling` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/skills-nemo-gym-reward-profiling/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does nemo-gym-reward-profiling work with?

nemo-gym-reward-profiling runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the nemo-gym-reward-profiling skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use nemo-gym-reward-profiling after installing it?

In Claude Code, type `/skills-nemo-gym-reward-profiling` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the nemo-gym-reward-profiling skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.