Skip to content

Run live inference endpoint tests only on opt-in - #1431

Merged
cvolkcvolk merged 1 commit into
mainfrom
cvolk/fix/opt-in-live-endpoint-tests
Oct 12, 2026
Merged

cvolkcvolk merged 1 commit into
mainfrom
cvolk/fix/opt-in-live-endpoint-tests

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Skip the 6 tests that call the real inference endpoint unless ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1 is set. This stops them from making the CI test jobs run out of time.

Why this change?

Since Oct 9, the "Run tests" job and the native uv job on main run out of time and get cancelled. No code is broken. All other tests pass.

The cause is 6 tests that call the real public inference endpoint (build.nvidia.com):

  • test_environment_generation_agent.py: test_generate_spec_atomic_pick_and_place_against_live_endpoint, test_generate_spec_five_bananas_parallel_pick_and_place_against_live_endpoint, test_resolve_usd_prim_robocasa_kitchen_counter_and_fridge
  • test_missing_object_inference.py: test_infer_names_the_uncatalogued_object_against_live_endpoint, test_infer_names_nothing_when_the_catalog_covers_the_prompt_against_live_endpoint
  • test_shared_inference_backend.py: test_multimodal_image_against_live_endpoint

These tests used to be skipped because CI had the wrong API key. #1413 fixed the key, so they started running.

How long they take depends on how busy the free public endpoint is, which we don't control:

  • On Oct 8, in Fix agent public inference API key in CI #1413's CI rerun, the 5 tests that existed then took about 6 minutes together.
  • From Oct 9 to Oct 12 they took 28 to 48 minutes, or hung for over an hour when the endpoint returned errors. A failed request waits about 5 minutes for a 504 error, and hidden retries in InferenceBackend repeat that several times.

"Run tests" takes about 58 minutes without these tests and has an 80 minute limit, so the slow days push it over. The native uv job (120 minute limit) has the same problem. PR runs are affected too.

What changes?

The 6 tests now run only when both of these are set:

  • ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1 (new)
  • the API key for the selected endpoint, which is NVIDIA_API_KEY for the default public endpoint

Before, the API key alone was enough. The skip helper is renamed from skip_without_live_endpoint_key() to skip_unless_live_endpoint_tests_enabled() to match what it checks.

What this means:

  • CI no longer runs the 6 live tests, so the test jobs finish in time again.
  • Locally, having NVIDIA_API_KEY set no longer runs them. run_docker.sh passes that key into the container, so this changes local test runs too.
  • The tests that use a fake endpoint for the same code still run.
  • For now, nothing in CI checks that environment generation still works with the real public model. This was also the case from August until Oct 9, while the tests were skipped because of the wrong key.

This is a stopgap. Possible follow-ups, to discuss with the code owners:

  • Fix the hidden, stacked retries in InferenceBackend. The OpenAI client retries on its own, and the backend retries on top of that, so one call can hang for about an hour. This also affects people running environment generation from the command line or the GUI. A small first step: create the client with its own retries turned off and an explicit timeout, and remove the @pytest.mark.flaky markers, which do nothing because the plugin is not installed.
  • Decide whether the check request that InferenceBackend sends when it is created (_ping) is needed. It adds a full request to every test and is never retried. At least 5 of the 8 live tests that failed on Oct 11-12 failed in this request.
  • Ask authors to run the live tests (see below) when they change prompts, schemas, catalogues, or the model, and to paste the result under Validation. Require complete generated task subtasks in agentic env ge n #1368 already did this.
  • If the code owners want automated coverage, add a separate scheduled workflow for the live tests, with its own time limit, stopping at the first failure, and failing if the key is missing.

Usage example

Running the live tests inside the Arena container.

Before:

export NVIDIA_API_KEY=<your NGC API key>
python -m pytest -sv \
    isaaclab_arena/tests/test_environment_generation_agent.py \
    isaaclab_arena/tests/test_missing_object_inference.py \
    isaaclab_arena/tests/test_shared_inference_backend.py

After:

export NVIDIA_API_KEY=<your NGC API key>
export ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1
python -m pytest -sv \
    isaaclab_arena/tests/test_environment_generation_agent.py \
    isaaclab_arena/tests/test_missing_object_inference.py \
    isaaclab_arena/tests/test_shared_inference_backend.py

Each live test can take from under a minute to several minutes, depending on the endpoint.

Validation

Ran the 3 affected test files in the Arena container:

  • Key set, no opt-in (the CI setup before this PR): 25 passed, 6 live tests skipped.
  • Opt-in set, no key: 6 live tests skipped.
  • Opt-in and key set: the live test runs. It fails with a 401 because a placeholder key was used, as expected.
  • pre-commit passes.

CI on this PR:

  • "Run tests" passed in 58 minutes. The no-camera step took 40 minutes with exactly the 6 live tests skipped. The camera and GR00T policy steps, which have not run on main since Oct 8 because of the timeouts, also passed.

Not yet confirmed:

  • The native uv job does not run on this PR because of its path filter, so it will only be confirmed on main after merge.

The six tests that call the real inference endpoint ran whenever an API
key was set. Since #1413 gave CI the right key, they run in the
required "Run tests" job and the native uv job on every push. Each
request to the public endpoint takes minutes, and 504 errors from the
endpoint add 15 minutes per failed attempt, so both jobs now hit their
timeouts on main and on PRs.

Skip these tests unless ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1 is set
in addition to the API key, and rename the skip helper to match.

Signed-off-by: Clemens Volk <[email protected]>
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

Puts the six live inference endpoint tests behind ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1 in addition to the API key, so they stop pushing "Run tests" and the uv job past their timeouts. The change is small, every call site is renamed, and the skip condition is correct. No inline findings.

Test Coverage and CI Cost

After this PR nothing in CI or docker/run_docker.sh sets the opt-in variable, so these tests now run nowhere by default. The only place it is documented is the docstring of skip_unless_live_endpoint_tests_enabled(). The PR description lists the follow-ups: a separate CI job with the opt-in, and bounded retries in InferenceBackend. Could those be tracked in an issue linked from this PR, so the live coverage doesn't quietly stay off? Until that job exists, NVIDIA_API_KEY is still passed to both the test job (.github/workflows/ci.yml:247) and the uv_test job (.github/workflows/uv-ci.yml:65), but no test reads it. The new job is the natural place to move it.

Verdict

Ship it

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Low impact] Test skip condition renamed and made more restrictive.

The PR appears safe to merge, with a non-blocking gap in host-side opt-in for container runs.

Findings

  1. P2 Host opt-in gets dropped ▶

Summary

The PR requires both ISAACLAB_ARENA_RUN_LIVE_ENDPOINT_TESTS=1 and the selected endpoint's API key before running the six live tests.

  • Live inference tests run only when you opt in and provide an API key.

Acknowledged follow-ups: cvolkcvolk explicitly defers a separate live-test CI job and bounded retries in InferenceBackend. Neither is reported as an issue here.

Reviews (1) · Last reviewed commit: "Run live inference endpoint tests only o..." · Reviewed by Greptile

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks!

@cvolkcvolk
cvolkcvolk merged commit 9d88893 into main Oct 12, 2026
13 checks passed
xyao-nv added a commit that referenced this pull request Oct 20, 2026
Add a nightly CI job for the six live environment-generation and
inference tests disabled by #1431.

## Why this change?

#1431 made these tests opt-in because slow public inference requests
caused regular CI jobs to time out. Restore automated live-endpoint
coverage with a separate job.

## What changes?
- Add agentic env gen agent tests to nightly jobs

## Validation

- Tests passed.
- lIve agent test passed
https://github.com/isaac-sim/IsaacLab-Arena/actions/runs/39324836472/job/118348852887

---------

Signed-off-by: Xinjie Yao <[email protected]>
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