Skip to content

build(deps): bump nemo-lens to v0.3.0 to match NeMo-RL - #4272

Open
ananthsub wants to merge 5 commits into
mainfrom
ansubramania/nemo-lens-v0.3.0
Open

ananthsub wants to merge 5 commits into
mainfrom
ansubramania/nemo-lens-v0.3.0

Conversation

@ananthsub

@ananthsub ananthsub commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

NVIDIA-NeMo/RL#4607 moves NeMo-RL's nemo-lens pin from b0f977d4 to the v0.3.0 tag (7bcc03ce). An RL job installs Gym into its environment and resolves a single nemo-lens, so Gym's pin has to match NeMo-RL's. This PR moves Gym to the same commit.

  • Pin: [tool.uv.sources] now points nemo-lens at 7bcc03ce3565d2be6858b819b049bcc4c3ec05b4, written as a full commit hash like NeMo-RL's. In uv.lock, nemo-lens is the only package that changes.
  • Fallback tests: Lens added a span_attributes no-op to nemo.lens.fallbacks, which tripped Gym's fallback parity tests. Those tests compared Gym's no-op stand-ins in nemo_gym/telemetry/_fallbacks.py against nemo.lens.fallbacks, a module Gym never imports, and forced Gym to mirror every Lens no-op whether or not Gym calls it. This PR removes them, along with the matching rule in the _fallbacks.py docstring and the telemetry README.
    • What matters is that the stand-ins accept the calls Gym makes. The remaining behavior test now calls managed_span and span_cm with dotted attribute keywords, the way Gym's call sites do.
    • The tests for importing without Lens, no-op behavior, exception propagation, and binding the real helpers when Lens is installed are unchanged.

The other Lens changes between b0f977d4 and v0.3.0 are additive for Gym:

  • optional group gating for explicitly emitted spans
  • scoped span attributes
  • additional training resource attributes
  • normalization of detected resource attributes

None of the APIs Gym calls changed.

Lens's package metadata still reports 0.2.0 at this tag, so uv.lock records 0.2.0+7bcc03c. NeMo-RL's PR notes the same.

No Gym issue was filed. This keeps Gym in step with the NeMo-RL change linked above.

Validation

  • pytest tests/unit_tests/telemetry: all pass. With **attributes removed from the no-op managed_span, the behavior test fails, so it covers what the parity tests were meant to.
  • pytest tests/unit_tests -n 8: every failure also fails on unmodified main in this environment. They come from optional packages that are not installed (OpenSandbox, W&B, tenacity), and none of those files involve telemetry.
  • pre-commit run --all-files: clean.

Rollout evidence

I ran gym eval run on example_single_tool_call with the simple agent and gpt-oss-20b (3 tasks), once from main (nemo-lens b0f977d4) and once from this branch. Both runs had every span group on (span_groups=all) and used console export.

main (b0f977d4) This PR (7bcc03ce)
Span types (name, kind, process) 49 49, identical set
Spans exported 214 214, identical counts per span type
Traces 8 8
Traces that cross processes 4 4
Resource attributes 9 9, identical set

sandbox spans are not covered, because this environment has no sandbox. Running inside a NeMo-RL process is also not covered and needs an RL job built on both pins.

NeMo-RL is moving its nemo-lens pin to the v0.3.0 tag (7bcc03ce). An RL job
installs Gym into its environment and resolves one nemo-lens, so Gym's pin
has to match.

The Lens changes since b0f977d4 are additive for Gym. Lens added a
span_attributes no-op to its fallbacks, so Gym's fallback module mirrors it,
as the fallback parity test requires.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@ananthsub
ananthsub requested a review from a team as a code owner October 9, 2026 00:17
@ananthsub ananthsub added area:build Packaging, dependencies, containers, and releases needs-review PR is ready for code review and waiting on a reviewer labels Oct 9, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 9, 2026 00:18
…ad of adding an unused shim

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
The parity tests compared Gym's no-op stand-ins against nemo.lens.fallbacks,
a module Gym never imports, and forced Gym to mirror Lens no-ops it does not
call. What matters is that the stand-ins accept the calls Gym makes, so the
behavior test now calls managed_span and span_cm with dotted attribute
keywords, as Gym's call sites do.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@yaoyu-33 yaoyu-33 added bug Something isn't working complexity:low Localized change in one scope with a small, straightforward review surface labels Oct 9, 2026
Comment thread nemo_gym/telemetry/spans.py Outdated
client-vs-server latency attribution stops working.

Gym is pinned to nemo-lens ``b0f977d4``, so rather than change lens this module creates
Gym is pinned to nemo-lens ``7bcc03ce``, so rather than change lens this module creates

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: should we get rid of the commit hash here such that one does need to change it here when bumping up in pyproject.toml?

@ananthsub ananthsub closed this Oct 9, 2026
@ananthsub
ananthsub deleted the ansubramania/nemo-lens-v0.3.0 branch October 9, 2026 19:32
@ananthsub
ananthsub restored the ansubramania/nemo-lens-v0.3.0 branch October 9, 2026 19:33
@ananthsub ananthsub reopened this Oct 9, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 9, 2026 19:34
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

…cstring

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Resolve the uv.lock conflict with #4300 by taking main's lockfile and
relocking with the nemo-lens v0.3.0 pin.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Oct 12, 2026

This branch was previously deployed

1 inactive deployment
public — 561b22e2 Deployed Oct 9, 2026 by copy-pr-bot[bot] via release / finalize / notify #4908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Packaging, dependencies, containers, and releases bug Something isn't working complexity:low Localized change in one scope with a small, straightforward review surface needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants