Skip to content

feat: reasoning gym environment - #1378

Merged
cmunley1 merged 5 commits into
mainfrom
cmunley1/env-reasoning-gym
Jun 23, 2026
Merged

cmunley1 merged 5 commits into
mainfrom
cmunley1/env-reasoning-gym

Conversation

@cmunley1

@cmunley1 cmunley1 commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

migrates reasoning gym simple agent environment to environments/

did not delete anything from resources_server yet (such as config or example rollouts, i suppose its safer to do in a followup PR?)

Signed-off-by: Christian Munley <cmunley@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented May 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cmunley1 cmunley1 changed the title feat: reasoning gym simple agent env feat: reasoning gym environment May 30, 2026
@cmunley1
cmunley1 enabled auto-merge (squash) June 23, 2026 02:34
@cmunley1
cmunley1 merged commit ff51aea into main Jun 23, 2026
15 checks passed
@cmunley1
cmunley1 deleted the cmunley1/env-reasoning-gym branch June 23, 2026 02:35
ritaneves pushed a commit that referenced this pull request Jun 25, 2026
migrates reasoning gym simple agent environment to environments/

did not delete anything from resources_server yet (such as config or
example rollouts, i suppose its safer to do in a followup PR?)

---------

Signed-off-by: Christian Munley <cmunley@nvidia.com>
Signed-off-by: Rita Fernandes Neves <rfernandesne@nvidia.com>
ehosseiniasl pushed a commit to ehosseiniasl/Gym that referenced this pull request Oct 13, 2026
…te examples (NVIDIA-NeMo#4542)

## What does this PR do?

The "Multiple tasks (composite)" dataset command in both reasoning_gym
READMEs now works. Before this change it exited 1 without generating
anything, because it asked for a task named `syllogisms`, which
reasoning-gym does not register. The registered name is `syllogism`.

Fixes NVBug [6805384](https://nvbugspro.nvidia.com/bug/6805384). Closes
NVIDIA-NeMo#4488.

### Cause

`environments/reasoning_gym/README.md:29` and
`resources_servers/reasoning_gym/README.md:21` pass `--tasks
knights_knaves,syllogisms,leg_counting`. reasoning-gym registers the
task as `syllogism` (`DATASET_NAME` in
`reasoning_gym/logic/syllogisms.py`); no version allowed by
`reasoning-gym>=0.1.19` (checked 0.1.19 and 0.1.25) registers the
plural. `create_dataset.py` catches the registry error, returns no
entries, and exits 1.

The typo came in with NVIDIA-NeMo#113 (resources server README), whose own
`create_dataset.py` already used `syllogism`. NVIDIA-NeMo#1378 then copied the line
into the environment README.

### Fix

Change `syllogisms` to `syllogism` in both README commands. This is the
spelling already used by the script's docstring and its `logic` category
table. Docs only; no code change.

### Before the fix

Gym `f054cf644` (main):

```bash
uv run --no-project --with 'reasoning-gym>=0.1.19' python environments/reasoning_gym/scripts/create_dataset.py \
    --tasks knights_knaves,syllogisms,leg_counting --size 1000 --output environments/reasoning_gym/data/train_composite.jsonl
```

```text
Creating composite dataset with 3 tasks: knights_knaves, syllogisms, leg_counting
Total samples: 1000, seed: 42
Error creating composite dataset: Dataset 'syllogisms' not registered
Error: No entries generated
(exit 1)
```

### After the fix

Gym `0c606d710` (this branch), with the README's corrected command:

```bash
uv run --no-project --with 'reasoning-gym>=0.1.19' python environments/reasoning_gym/scripts/create_dataset.py \
    --tasks knights_knaves,syllogism,leg_counting --size 1000 --output environments/reasoning_gym/data/train_composite.jsonl
```

```text
Creating composite dataset with 3 tasks: knights_knaves, syllogism, leg_counting
Total samples: 1000, seed: 42

Generated 1000 total entries
Task distribution:
  knights_knaves: 344
  leg_counting: 311
  syllogism: 345
(exit 0)
```

The `resources_servers/reasoning_gym` form (`python
scripts/create_dataset.py ...` run from that directory) gives the same
1000 rows.

### Validation

- QA testcase `reasoning_gym`, case `composite` (reads `--tasks` from
the README): FAIL on `f054cf644` (`Dataset 'syllogisms' not
registered`), PASS on `0c606d710` (1000 rows across the three families).
Whole case: 4/6 → 5/6. The remaining failure is the download route
(`prepare.py` `load_dataset` → `ArrowInvalid`), which fails the same way
on both commits and is tracked separately in NVBug 6805516.
- `pre-commit run --all-files`: passed
- `tests/unit_tests/test_fern_docs_links.py`: 18 passed
- Rollout evidence: N/A, docs-only change (dataset generation command
verified above)

### Compatibility

None. Docs only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: qiaochuz <qiaochuz@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants