Skip to content

Require complete generated task subtasks in agentic env ge n - #1368

Merged
xyao-nv merged 1 commit into
mainfrom
xyao/fix/agentic_env_task_ci
Oct 5, 2026
Merged

xyao-nv merged 1 commit into
mainfrom
xyao/fix/agentic_env_task_ci

Conversation

@xyao-nv

@xyao-nv xyao-nv commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Update SpecInference guidance to include every requested object in the generated subtasks and choose the appropriate task composition. (CI has been skipping the live agent test because ARENA_NVIDIA_API_KEY is not a secret, I will add it once this MR merged.)

Why this change?

“Place all five bananas into the bin” could generate an atomic task for only one banana, causing the live test’s parallel-composition assertion to fail.

What changes?

Require a separate subtask for each object the robot must act on.
Use parallel for multiple subtasks unless the prompt or action dependencies require an order.

Validation

  • All 10 spec-inference unit tests passed.
  • All pre-commit checks passed.
  • Three live test attempts passed.

Require a subtask for every requested object and default unordered
actions to parallel composition to reduce flaky live generation tests.
Document that structural validation does not enforce request coverage.

Signed-off-by: Xinjie Yao <[email protected]>
@xyao-nv
xyao-nv marked this pull request as ready for review October 5, 2026 17:59
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Changes task generation rules for agentic environment creation.

The PR is not ready to merge as a reliable fix for incomplete generated tasks, because valid partial tasks remain accepted.

Findings

  1. P1 Incomplete Tasks Still Pass ▶

Summary

The PR adds generation guidance to cover every requested object and choose task composition based on ordering. It also documents that validation does not check request coverage. The guidance alone cannot prevent a valid but incomplete task from being returned.

Reviews (1) · Last reviewed commit: "Require complete generated task subtasks"

@xyao-nv
xyao-nv enabled auto-merge (squash) October 5, 2026 18:48
@xyao-nv
xyao-nv merged commit 97f69a4 into main Oct 5, 2026
13 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 12, 2026
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 #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. #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:

```bash
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:

```bash
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.

Signed-off-by: Clemens Volk <[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