Skip to content

fix: add 'all' extra, surface auth errors in quickstart (QS fixes) - #1840

Merged
marta-sd merged 9 commits into
mainfrom
docs/qs-fixes-v2
Jul 1, 2026
Merged

marta-sd merged 9 commits into
mainfrom
docs/qs-fixes-v2

Conversation

@sephmard

@sephmard sephmard commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes two getting-started issues:

Issue ID File Fix
INSTALL-7d5b37c1 pyproject.toml Add all = ["nemo-gym[dev,sandbox]"] extra so uv pip install -e .[all] works as expected
QS-f80cc295 quickstart.mdx Add <Warning> troubleshooting callout after gym eval run output block pointing to policy_api_key / policy_base_url

Note: INSTALL-7be9bae7 (version pin update) is excluded — will be handled in a separate PR after the 0.4.0 PyPI release.

Details

INSTALL-7d5b37c1 — pyproject.toml only defined sandbox and dev extras. Running uv pip install -e .[all] silently resolved to base deps because the all extra didn't exist. Added all = ["nemo-gym[dev,sandbox]"] so the common install incantation works.

QS-f80cc295 — An invalid policy_api_key produces an opaque 500 Internal Server Error on the /run endpoint with no hint that auth is the cause. Added a <Warning> block in quickstart.mdx directly after the gym eval run expected output so users hitting this error immediately see the most likely cause and which config keys to check.

Test plan

  • Verify uv pip install -e .[all] now installs both sandbox and dev dependencies
  • Verify quickstart <Warning> block renders correctly in Fern preview

🤖 Generated with Claude Code

…kstart

Addresses four getting-started issues:

- INSTALL-7be9bae7: Update gym --version sample output and PyPI pin from
  v0.3.0/0.3.1 to v0.4.0 so installation.mdx reflects the current release.

- INSTALL-7d5b37c1: Add `all = ["nemo-gym[dev,sandbox]"]` to
  [project.optional-dependencies] so `uv pip install -e .[all]` installs
  all optional dependencies instead of silently falling back to base deps.

- QS-f80cc295 (code): In `setup_exception_middleware`, detect 401/403
  ClientResponseError from upstream model endpoints and return a clear auth
  error message instead of an opaque generic 500, with a console hint
  pointing to policy_api_key / policy_base_url in env.yaml.

- QS-f80cc295 (doc): Add a <Warning> callout in quickstart.mdx after the
  gym eval run expected output block explaining that a 500 on /run is
  typically caused by an invalid API key.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Seph Mard <[email protected]>
@copy-pr-bot

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

@github-actions

Copy link
Copy Markdown
Contributor

@sephmard
sephmard marked this pull request as ready for review June 30, 2026 17:19
@sephmard
sephmard requested a review from a team as a code owner June 30, 2026 17:19
Keep QS fixes to docs only (quickstart.mdx warning callout and
pyproject.toml all extra). The server_utils.py 401/403 detection
is out of scope for this PR.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Seph Mard <[email protected]>

@kajalj22 kajalj22 left a comment

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.

Could update the uv.lock file after this change?

hemildesai
hemildesai previously approved these changes Jun 30, 2026
sephmard and others added 2 commits June 30, 2026 16:27
Updates lock file to reflect the new `all = ["nemo-gym[dev,sandbox]"]`
optional dependency group added in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Seph Mard <[email protected]>
@sephmard

sephmard commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Could update the uv.lock file after this change?

@kajalj22 thanks for the review. The all = ["nemo-gym[dev,sandbox]"] extra we added to pyproject.toml doesn't actually introduce any new packages — it just references existing dev and sandbox extras, so the lock is unchanged.

Ran uv lock to verify this, and saw 10 new packages appear (matplotlib, scipy, scikit-learn, etc.). These aren't from our change — they're from mlflow's transitive deps that were previously suppressed by exclude-dependencies. PR #1835 (merged today) deliberately removed them from that exclusion list because a number of benchmark servers (scicode, arena_judge, ether0, reasoning_gym, etc.) actually need them.

So the lock on main is just stale relative to #1835 — it'll need a refresh, but that's independent of #1840. Happy to keep that as a follow-up so #1840 stays focused on the quickstart fixes. Created #1843.

@sephmard
sephmard requested a review from kajalj22 June 30, 2026 21:09
mlflow 3.14.0 updated its PyPI metadata to declare matplotlib,
scikit-learn, scipy (and transitive deps: contourpy, cycler, joblib,
kiwisolver, narwhals, pillow, threadpoolctl) as dependencies. Gym does
not use these — mlflow is only used in gitlab_utils.py as an HTTP
client for the GitLab model registry API.

Add all 10 packages to exclude-dependencies alongside the existing
mlflow exclusions (flask, sqlalchemy, etc.) and regenerate uv.lock.
Net change to uv.lock vs main: zero new packages.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Seph Mard <[email protected]>
@sephmard
sephmard requested a review from hemildesai June 30, 2026 21:30
hemildesai
hemildesai previously approved these changes Jul 1, 2026

@hemildesai hemildesai left a comment

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.

LGTM for the all optional dependency change

kajalj22
kajalj22 previously approved these changes Jul 1, 2026
sephmard and others added 2 commits July 1, 2026 09:10
Removes contourpy, cycler, joblib, kiwisolver, matplotlib, narwhals,
pillow, scikit-learn, scipy, and threadpoolctl from exclude-dependencies.
These were added by mistake — PR #1835 deliberately removed them because
server venvs (arena_judge, ether0, scicode, reasoning_gym, etc.) depend
on them. Re-adding them broke CI with ModuleNotFoundError in arena_judge
and ether0 (missing narwhals).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Seph Mard <[email protected]>
@sephmard
sephmard dismissed stale reviews from hemildesai and kajalj22 via 80e1ff3 July 1, 2026 13:19
@sephmard sephmard added the r0.4.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. label Jul 1, 2026
@ritaneves
ritaneves self-requested a review July 1, 2026 13:54
@kajalj22
kajalj22 self-requested a review July 1, 2026 16:08
@marta-sd
marta-sd merged commit d4c733c into main Jul 1, 2026
17 checks passed
@marta-sd
marta-sd deleted the docs/qs-fixes-v2 branch July 1, 2026 16:11
ananthsub pushed a commit that referenced this pull request Jul 1, 2026
…s) (1840)` into `r0.4.0` (#1872)

beep boop [🤖]: Hi @sephmard 👋,

    we've cherry picked #1840 into  for you! 🚀

    Please review and approve this cherry pick by your convenience!

Signed-off-by: Seph Mard <[email protected]>
Signed-off-by: NeMo Bot <[email protected]>
Co-authored-by: Seph Mard <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r0.4.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants