Skip to content

feat: cli error handling - #1804

Merged
marta-sd merged 3 commits into
mainfrom
martas/fix-cli-error-handling
Jun 29, 2026
Merged

marta-sd merged 3 commits into
mainfrom
martas/fix-cli-error-handling

Conversation

@marta-sd

Copy link
Copy Markdown
Contributor

Improves how errors are reported to the user then data preparation or env tests fail

marta-sd added 2 commits June 29, 2026 10:24
… handle them gracefully in CLI

Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
@marta-sd
marta-sd requested a review from wprazuch June 29, 2026 08:59
@marta-sd marta-sd self-assigned this Jun 29, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 29, 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.

@marta-sd

Copy link
Copy Markdown
Contributor Author

/ok to test 170a05e

@marta-sd

Copy link
Copy Markdown
Contributor Author

/ok to test 9260afb

Comment thread nemo_gym/cli/env.py
try:
_validate_data_single(test_config)
except AssertionError:
print(f"Data validation failed for {test_config.entrypoint}. You can rerun just the data validation like:")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: using a multiline """ syntax

@marta-sd
marta-sd merged commit c337c4b into main Jun 29, 2026
31 checks passed
@marta-sd
marta-sd deleted the martas/fix-cli-error-handling branch June 29, 2026 09:17
wprazuch added a commit that referenced this pull request Jun 29, 2026
Resolve PR #1673 conflicts with main (now includes #1804/#1805/#1806). The
gym env compose work coexists with #1805's install-root _asset_config_path and the
agent asset selector in nemo_gym/cli/main.py; both `env compose` and `env validate`
remain registered. Auto-merge verified: no conflict markers, 167 unit tests pass
(only the pre-existing TestDidYouMean argparse failures), and `gym env compose
--benchmark gsm8k --agent simple_agent` + `gym env validate` both work.

Signed-off-by: Wojciech Prazuch <[email protected]>
muskank7 pushed a commit to muskank7/Gym that referenced this pull request Sep 30, 2026
…3700)

## Expected

The server test suite should finish testing the remaining modules and
exit nonzero when a server's pytest process fails, including an internal
error (exit code 3).

## Actual

`test_all()` records these failures in `tests_unrecognized`, but omits
that category from its final failure check. With no other failures, the
command returns successfully even though a server's tests never ran,
allowing its CI caller to report success.

## Fix

Include the existing category in the final exit condition. The suite
still completes the remaining modules, preserving the deferred reporting
introduced in NVIDIA-NeMo#1804, and an all-passing suite still succeeds. The
regression exercises actual pytest subprocesses for both cases.

Validation: 86 focused and 498 adjacent tests passed; core/sandbox
checks passed with 95.16% combined coverage, as did all-file pre-commit.
Model rollouts: N/A (test-runner-only change).

<!-- gym-verified-bug-hunter:cli-test-all-unrecognized-exit-success -->

Signed-off-by: yaoyu-33 <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 9260afb7 Deployed Jun 29, 2026 by copy-pr-bot[bot] via release / finalize / notify #503
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