Skip to content

Fix benchmark play inference scope - #7174

Open
AntoineRichard wants to merge 2 commits into
isaac-sim:developfrom
AntoineRichard:fix/navigation-flat-anymalc-play-grad
Open

Fix benchmark play inference scope#7174
AntoineRichard wants to merge 2 commits into
isaac-sim:developfrom
AntoineRichard:fix/navigation-flat-anymalc-play-grad

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep benchmark environment stepping within torch.inference_mode(), matching normal play and startup benchmarks.
  • Add a regression test that observes inference mode at the environment step boundary.

Validation

  • uv run isaaclab -f
  • uv run python tools/changelog/cli.py check develop
  • uv run --extra test python -m pytest source/isaaclab/test/benchmark/test_play_schema.py

Checklist

  • Bug fix
  • Tests added
  • Changelog fragment added
  • No documentation change required
  • Contributor already listed

@AntoineRichard
AntoineRichard requested a review from a team August 19, 2026 15:46
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 19, 2026
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes pretrained navigation-policy inference by disabling autograd while computing delegated low-level actions.

  • Wraps embedded low-level policy evaluation and action-buffer assignment in torch.no_grad().
  • Adds a focused regression test asserting delegated actions do not require gradients.
  • Adds a changelog fragment describing the navigation play-benchmark fix.

Confidence Score: 5/5

The PR appears safe to merge, with the inference-only autograd change narrowly scoped and covered by a regression test.

The embedded policy output is now computed without gradient tracking while existing observation computation, action decimation, buffer reuse, and downstream action application remain unchanged.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/contrib/navigation/mdp/pre_trained_policy_action.py Restricts gradient suppression to low-level policy inference and action-buffer assignment without changing decimation or action application.
source/isaaclab_tasks/test/contrib/test_navigation_pre_trained_policy_action.py Adds a focused regression test confirming the low-level action tensor passed downstream does not require gradients.
source/isaaclab_tasks/changelog.d/navigation-pretrained-policy-no-grad.rst Documents the pretrained navigation-policy inference fix.

Reviews (1): Last reviewed commit: "Fix navigation pretrained policy inferen..." | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot 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.

Isaac Lab Review Bot

The change scopes gradient suppression to the embedded low-level policy inference, adds a focused regression test for gradient-free delegated actions, and records the user-visible fix in the package changelog.

  • Design and architecture: The fix remains local to PreTrainedPolicyAction.apply_actions and preserves the existing observation computation, decimation, action delegation, and counter behavior. No architectural concerns were identified.
  • API: No public symbols, configuration fields, tensor shapes, or action interfaces change. The intentional behavioral change is that generated low-level actions no longer participate in autograd tracking.
  • Implementation: Wrapping the policy call and buffer assignment in torch.no_grad() prevents the preallocated action buffer from acquiring autograd history while preserving inference values and control flow. The regression test directly covers the affected delegation path, although its construction through object.__new__ and manually populated private state creates a minor maintenance coupling to the class internals.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@AntoineRichard AntoineRichard changed the title Fix navigation pretrained policy inference Fix benchmark play inference scope Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant