Skip to content

fix(resources_servers): record verifier failures that are scored as model results - #6984

Open
oyilmaz-nvidia wants to merge 9 commits into
mainfrom
fix/mask-verifier-failures
Open

oyilmaz-nvidia wants to merge 9 commits into
mainfrom
fix/mask-verifier-failures

Conversation

@oyilmaz-nvidia

@oyilmaz-nvidia oyilmaz-nvidia commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Work package 1 of #6983, under #3180. Seven resources servers score a failure of the verifier, the grader reply or the task data as a model result, and nothing in the saved row says so. This PR does not change any of those scores: every case keeps the reward and mask it had. Each is now reported through observe_scored_despite_failure (#6393), so the rollout is no longer indistinguishable from a normally graded one. The event is saved beside the row (_ng_failure_events) and counted by the rollout_scored_despite_failure health check.

Server Case, still scored as before Recorded as
critpt The grader response has no accuracy and the batch is accepted: it scores 0.0. A batch the grader errors reject is excluded and records nothing. judge_failed
officeqa An unexpected scorer exception scores 0.0. An answer the matcher cannot parse (ValueError) is a wrong answer and records nothing. verifier_error
big_finance An unexpected exception after the judge replied scores 0.0 with judge_error set. A row without rubric points in rubric_points mode scores 0.0 (the final_answer mode does not use them and records nothing). verifier_error
image_tools A row without a usable expected action, or one that cannot be scored against itself, scores 0.0. A malformed model call (arguments that are not an object, values of the wrong type) is a wrong answer and records nothing. verifier_error
lc_niah An expected_answer that cannot be read as a set of node ids (not JSON, not iterable, or unhashable items such as [[1]]) is graded as an empty set, so an empty prediction still scores 1.0. A JSON object is read as the set of its keys and records nothing. verifier_error
asr_with_pc A Hallucination row without audio_duration still counts as correct (reward 1.0). verifier_error
denovo_swe A patch that cannot be extracted is graded as an empty patch. A consumed session and a sandbox failure are recorded. A git failure in the agent's own checkout is the agent's result and records nothing. A verification that never completes after its retries is scored 0 with evaluation_completed=False. Seeding goes on after a failed seed prep (the cleaner or the README copy; the script still exits 0 and now prints a receipt of the failed steps), git init, git rev-parse HEAD (no base commit) or listing of the untracked files (the patch then keeps files that were already untracked). session_lost, verifier_error

Why

#4883 lists failures scored as model results, and #6393 added a way to record them without changing the outcome. Whether Gym should mask, retry or keep such a sample is an open decision (#6983, D1-D4) and affects training, so this PR only makes the failure visible. A later change can act on these events through the shared outcome policy.

Not in this PR

  • Any change to a reward, mask or retry. No retry parameter is added: whether to retry belongs to the shared outcome policy (D3), and a retry cannot help bad task data or a deterministic scorer fault.
  • asr_with_pc rows whose reference normalizes to empty: the code documents dropping them from the corpus metrics (Open ASR Leaderboard convention), so they are not recorded as failures.
  • status=failed scored 0 in officeqa and ui_generation (D1).
  • denovo_swe samples that stay evaluation_completed=False after their retries, which belong to the shared coding-server helper (work package 2).
  • image_tools/base.py tool failures shown to the model (work package 7).

Compatibility

Scores, masks and retries are unchanged, so benchmark results and training data do not move. A row that hit one of these cases gains a _ng_failure_events entry, and the rollout_scored_despite_failure health check reports it as an issue (it does not fail a run on its own).

Validation

  • Each server's own tests, run with the repo's .venv plus the server's extra dependencies (gym env test could not build venvs here: it needs uv >= 0.13.4 and this machine has 0.11.26): critpt 91, officeqa 88, big_finance 123, image_tools 41, lc_niah 50, asr_with_pc 172, denovo_swe 57 passed. These include every test that was already there, which is the check that behavior is unchanged.
  • Each new test calls verify (or score_answer) and asserts the unchanged reward and mask, the recorded event, and that a real wrong answer or a model's malformed call records nothing. With only the source files reverted, the new tests fail in every server.
  • ruff check, ruff format and pre-commit run --files pass on the changed files. The private guardwords hook was skipped (catalog unavailable).

Rollout evidence

Smoke runs for lc_niah, image_tools and asr_with_pc with a real model (Qwen2.5-7B-Instruct served by local_vllm_model, vLLM 0.29.0) through gym env start and gym eval run --no-serve. Coverage for all three: every rollout completed and measured, none masked. The events appear only on the rows with a verifier or task fault, and the rollout_scored_despite_failure health check reports them (2 issues on the asr_with_pc run, one per row without audio_duration).

The same saved responses replayed through the verifier on main and on this branch (same is the reward and mask comparison):

server row main this branch recorded
lc_niah gold [] reward 0.0 reward 0.0 none
lc_niah gold list (two rows) reward 0.4 / 0.6 reward 0.4 / 0.6 none
lc_niah gold oops-not-json (two rows) reward 0.0 reward 0.0 verifier_error
image_tools correct call reward 1.0 reward 1.0 none
image_tools wrong tool reward 0.0 reward 0.0 none
image_tools "arguments": [1] (the model's malformed call) reward 0.0 reward 0.0 none
image_tools "bbox_2d": "abc" reward 0.0 reward 0.0 none
image_tools no expected action reward 0.0 reward 0.0 verifier_error
asr_with_pc ASR-PC normal; Hallucination with audio_duration reward 1.0 reward 1.0 none
asr_with_pc Hallucination without audio_duration (two rows) reward 1.0 reward 1.0 verifier_error

Every row has same=True. The unit test for lc_niah also pins the case this makes visible: an empty prediction against an unreadable gold still scores 1.0, and is now recorded.

Not covered by a smoke run: critpt (needs a live Artificial Analysis API key), officeqa (needs the external document workspace and a sandbox), denovo_swe (needs the benchmark's container images and a sandbox) and big_finance (needs search and SEC credentials and a tool-calling model). They are covered by the verify-level tests above only. This is why the PR stays a draft until a maintainer decides whether that is enough.

Reproduce

Needs uv >= 0.13.4 on PATH, one GPU, and the model in the Hugging Face cache. Run from the repo root.

  1. Start the servers with one model (the first start builds the venvs):
gym env start --config resources_servers/lc_niah/configs/lc_niah.yaml \
  --config resources_servers/image_tools/configs/image_tools_pivot.yaml \
  --config resources_servers/asr_with_pc/configs/asr_with_pc.yaml \
  --model-type local_vllm_model --model Qwen/Qwen2.5-7B-Instruct \
  "++policy_model.responses_api_models.local_vllm_model.hf_home=$HOME/.cache/huggingface" \
  "++policy_model.responses_api_models.local_vllm_model.vllm_serve_kwargs.max_model_len=8192" \
  "++policy_model.responses_api_models.local_vllm_model.vllm_serve_kwargs.gpu_memory_utilization=0.85"
  1. Build the rows and collect rollouts. The image_tools system prompt demands the literal <tool_call> tags: with a looser prompt the 7B model drops them and every row scores no_tool_call_in_rollout.
OUT=$(mktemp -d)
OUT=$OUT python - <<'EOF'
import json, os

out = os.environ["OUT"]

# lc_niah: the shipped example rows, two with an unreadable expected_answer
rows = [json.loads(line) for line in open("resources_servers/lc_niah/data/example.jsonl")]
rows[1]["expected_answer"] = "oops-not-json"
rows[4]["expected_answer"] = "oops-not-json"
open(f"{out}/lc_niah_rows.jsonl", "w").writelines(json.dumps(r) + "\n" for r in rows)

# image_tools: text-only rows where the model copies a tool call
EXP = {"name": "image_zoom_in_tool", "arguments": {"bbox_2d": [100, 100, 300, 300], "img_idx": 0}}
calls = {
    "good_call": (json.dumps(EXP), EXP),
    "wrong_tool": (json.dumps({**EXP, "name": "color_at_tool"}), EXP),
    "args_not_object": ('{"name": "image_zoom_in_tool", "arguments": [1]}', EXP),
    "bbox_wrong_type": ('{"name": "image_zoom_in_tool", "arguments": {"bbox_2d": "abc", "img_idx": 0}}', EXP),
    "no_expected_action": (json.dumps(EXP), None),
}
system = (
    "You are a tool-calling bot. You only ever output a tool call wrapped in the literal tags "
    "<tool_call> and </tool_call>, each on its own line. The tags are mandatory."
)
with open(f"{out}/image_tools_rows.jsonl", "w") as f:
    for case, (call, exp) in calls.items():
        user = "Output this tool call, character for character, including the tags:\n<tool_call>\n" + call + "\n</tool_call>"
        row = {
            "agent_ref": {"type": "responses_api_agents", "name": "image_tools_pivot_agent"},
            "responses_create_params": {
                "temperature": 0,
                "input": [
                    {"role": "system", "type": "message", "content": system},
                    {"role": "user", "type": "message", "content": user},
                ],
            },
            "metadata": {"case": case},
        }
        if exp:
            row["expected_action"] = exp
        f.write(json.dumps(row) + "\n")

# asr_with_pc: text-only rows, scored per row as ASR-PC or Hallucination
long_answer = "Hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello."
asr = [
    ("asr_pc_normal", "ASR-PC", "Hello, world.", None, "Hello, world."),
    ("halluc_ok", "Hallucination", "", 5.0, "Hello."),
    ("halluc_missing_duration", "Hallucination", "", None, "Hello."),
    ("halluc_missing_duration_long", "Hallucination", "", None, long_answer),
]
with open(f"{out}/asr_rows.jsonl", "w") as f:
    for sample_id, task_type, ref, duration, say in asr:
        row = {
            "agent_ref": {"type": "responses_api_agents", "name": "asr_with_pc_simple_agent"},
            "responses_create_params": {
                "temperature": 0,
                "input": [
                    {"role": "system", "content": "You are a helpful assistant. /no_think"},
                    {"role": "user", "content": "Reply with exactly this text and nothing else: " + say},
                ],
            },
            "expected_answer": ref,
            "sample_id": sample_id,
            "task_type": task_type,
        }
        if duration is not None:
            row["audio_duration"] = duration
        f.write(json.dumps(row) + "\n")
EOF

gym eval run --no-serve --agent lc_niah_simple_agent --input $OUT/lc_niah_rows.jsonl \
  --output $OUT/out_lc_niah.jsonl --concurrency 5 --max-output-tokens 1024
gym eval run --no-serve --agent image_tools_pivot_agent --input $OUT/image_tools_rows.jsonl \
  --output $OUT/out_image_tools.jsonl --concurrency 5 --max-output-tokens 256
gym eval run --no-serve --agent asr_with_pc_simple_agent --input $OUT/asr_rows.jsonl \
  --output $OUT/out_asr.jsonl --concurrency 5 --max-output-tokens 256

The rows with a fault carry a scored_despite_failure entry in _ng_failure_events, and quality_summary.json lists them under rollout_scored_despite_failure.

  1. Replay the saved responses through main's verifier for the before columns. Run the script with each server's own venv (resources_servers/<server>/.venv/bin/python), from that server's directory, with PYTHONPATH=$OUT/old:<repo root>:
mkdir $OUT/old
git show origin/main:resources_servers/lc_niah/app.py > $OUT/old/lc_niah_main.py
git show origin/main:resources_servers/image_tools/app.py > $OUT/old/image_tools_main.py
git show origin/main:resources_servers/asr_with_pc/app.py > $OUT/old/asr_main.py
# then: python replay.py lc_niah $OUT/out_lc_niah.jsonl   (and image_tools, asr_with_pc)

replay.py:

"""Replay saved rollouts through the verifier on main and on this branch: scores must match, events may differ."""
import asyncio, importlib, json, sys
from unittest.mock import MagicMock

from nemo_gym.client import ServerClient
from nemo_gym.core import RequestFailureLog

server_name, rows_path = sys.argv[1], sys.argv[2]
rows = [json.loads(line) for line in open(rows_path)]


def recorded(log):
    return [e.failure_kind for e in log.report.events.values() if e.operation == "scored_despite_failure"]


def build(mod, row):
    if server_name == "lc_niah":
        cfg = mod.LCNIAHResourcesServerConfig(host="0.0.0.0", port=0, entrypoint="", name="")
        server = mod.LCNIAHResourcesServer(config=cfg, server_client=MagicMock(spec=ServerClient))
        body = mod.LCNIAHVerifyRequest(
            responses_create_params=row["responses_create_params"], response=row["response"],
            expected_answer=row["expected_answer"],
        )
        return server, body, row["expected_answer"][:14]
    if server_name == "image_tools":
        cfg = mod.ImageToolsPivotResourcesServerConfig(host="localhost", port=0, entrypoint="app.py")
        server = mod.ImageToolsPivotResourcesServer(config=cfg, server_client=MagicMock(spec=ServerClient))
        body = mod.ImageToolsPivotVerifyRequest(
            responses_create_params=row["responses_create_params"], response=row["response"],
            expected_action=row.get("expected_action"), metadata=row.get("metadata"),
        )
        return server, body, row["metadata"]["case"]
    cfg = mod.ASRWithPCConfig(host="localhost", port=0, entrypoint="app.py", name="")
    server = mod.ASRWithPCResourcesServer(config=cfg, server_client=MagicMock(spec=ServerClient))
    body = mod.ASRWithPCVerifyRequest(
        responses_create_params=row["responses_create_params"], response=row["response"],
        expected_answer=row["expected_answer"], sample_id=row["sample_id"], task_type=row["task_type"],
        audio_duration=row.get("audio_duration"),
    )
    return server, body, row["sample_id"]


async def verify(mod, row):
    server, body, label = build(mod, row)
    with RequestFailureLog.capture() as log:
        result = await server.verify(body)
    return result, recorded(log), label


async def main():
    old = importlib.import_module(f"{server_name}_main" if server_name != "asr_with_pc" else "asr_main")
    new = importlib.import_module(f"resources_servers.{server_name}.app")
    for row in rows:
        before, _, label = await verify(old, row)
        after, events, _ = await verify(new, row)
        same = (before.reward, before.mask_sample) == (after.reward, after.mask_sample)
        print(f"{label:<30} main: reward={before.reward:.1f} mask={before.mask_sample} | branch: reward={after.reward:.1f} mask={after.mask_sample} | same={same} | recorded={events}")


asyncio.run(main())

…m as model results

Seven resources servers scored a failure of the verifier, the judge reply handling or the task data as a model
result. Each now masks the sample with a failure_kind, or raises where the grader failed, so the sample is left out
of scores and training and its cause is visible.

- critpt: an Artificial Analysis response without a numeric accuracy scored 0.0. It is now rejected as judge_failed,
  like a batch with too many grader errors.
- officeqa: score_answer caught every exception and returned 0.0. It still scores 0 for an answer the matcher
  cannot parse (ValueError); any other exception is masked as verifier_error.
- big_finance: the catch-all around judge scoring returned reward 0.0 with only judge_error set. It is now masked
  as verifier_error. Judge call and unreadable-verdict failures already raise and are unchanged.
- image_tools: the catch-all in the pivot verifier and a row without a usable expected action scored 0.0. Both are
  now masked as verifier_error. A wrong tool call, a wrong target and a low argument score stay real zeros.
- lc_niah: an expected_answer that is not a JSON list was graded as an empty gold set, so an empty prediction scored
  1.0. The row is now masked as verifier_error. An empty gold list stays a valid task.
- asr_with_pc: a Hallucination row without a positive audio_duration counted as a correct row. It is now masked as
  verifier_error.
- denovo_swe: a verify of a session whose base commit was already consumed, or whose patch could not be extracted,
  graded an empty patch. It now returns a masked response (session_lost or verifier_error) without grading.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
@oyilmaz-nvidia oyilmaz-nvidia added bug Something isn't working area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters risk:mid Autobot PR risk: mid labels Dec 1, 2026
@copy-pr-bot

copy-pr-bot Bot commented Dec 1, 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.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:high Autobot PR risk: high and removed risk:mid Autobot PR risk: mid labels Dec 1, 2026
@oyilmaz-nvidia
oyilmaz-nvidia marked this pull request as ready for review December 1, 2026 03:53
…ed zeros in image_tools and denovo_swe

Review of the previous commit found two masks that hid a real model or agent failure.

- image_tools: every exception in the pivot verifier was masked, so a model call with arguments that are not an
  object, or values of the wrong type, left the scores. The task's expected action is now checked by scoring it
  against itself first, and only a failure there (bad task data) is masked. A malformed model call is a zero with
  the new failure_reason malformed_tool_call and is not masked.
- denovo_swe: every patch-extraction exception was masked, but the agent controls its checkout and can move .git.
  A git command that ran in the sandbox and failed is now the agent's result: the empty patch is graded, as before.
  A raising sandbox call, or a command that reported no exit code, is still masked as verifier_error.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Dec 1, 2026
…odel results

The previous two commits of this PR masked samples whose verifier, grader reply or task data had failed. That changes
scores and the training loss, which needs a decision on how Gym treats such failures (#6983, D3). This commit
replaces it with a record: every case keeps the score and mask it had before, and each is now reported through
observe_scored_despite_failure, so the rollout is no longer indistinguishable from a normally graded one. The
event is saved beside the row (_ng_failure_events) and counted by the rollout_scored_despite_failure health check.

- critpt: a grader response without accuracy is scored 0.0 as before and recorded as judge_failed.
- officeqa: an unexpected scorer exception is scored 0.0 as before and recorded as verifier_error. An answer the
  matcher cannot parse (ValueError) is a wrong answer and records nothing.
- big_finance: an unexpected exception after the judge replied is scored 0.0 as before and recorded.
- image_tools: a row without a usable expected action, or one that cannot be scored against itself, is scored 0.0 as
  before and recorded. A malformed model call (arguments that are not an object, values of the wrong type) is a wrong
  answer and records nothing.
- lc_niah: an expected_answer that is not a JSON list is graded as an empty set as before, so an empty prediction
  still scores 1.0, and the row is recorded.
- asr_with_pc: a Hallucination row without audio_duration still counts as correct, and the row is recorded.
- denovo_swe: a patch that cannot be extracted is graded as an empty patch as before. A consumed session
  (session_lost) and a sandbox failure (verifier_error) are recorded. A git failure in the agent's own checkout is
  the agent's result and records nothing.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
@oyilmaz-nvidia oyilmaz-nvidia changed the title fix(resources_servers): mask verifier failures instead of scoring them as model results fix(resources_servers): record verifier failures that are scored as model results Dec 1, 2026
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 1287e33

@nemo-pr-automation
nemo-pr-automation Bot requested a review from a team December 1, 2026 17:31
…rader falls back to the empty set

The record added for an unreadable expected_answer used its own check (is it a JSON list), which differed from the
parse the grader uses. A list with unhashable items such as [[1]] is graded as an empty set but was not recorded, and
a JSON object, which the grader reads as the set of its keys, was recorded although it is graded normally. The record
and the grader now share one parse, so the row is recorded when it is graded against the fallback set and not
otherwise. No score changes.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
oyilmaz-nvidia and others added 2 commits December 1, 2026 13:43
…nd big_finance

A re-scan against current main found four more cases in servers this PR already covers, with the same pattern: the
failure is scored as before and now recorded through observe_scored_despite_failure. No score, mask or retry changes.

- denovo_swe: a verification that never completes after its retries (scored 0, evaluation_completed=False) is
  recorded. Seeding also records a failed seed prep (the agent may still see the source), a failed git init, and a
  failed git rev-parse HEAD (no base commit to diff against), each at the seed stage, and seeding goes on as before.
- big_finance: a row without rubric points in a reward mode that uses them (rubric_points) scores 0.0 as before and
  is recorded. The final_answer mode does not use rubric points and records nothing.

An empty-reference row in asr_with_pc is not recorded: the code documents dropping such rows from the corpus
metrics as the Open ASR Leaderboard convention, so it is not a failure.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 7cc2eb6

The listing of files that are untracked before the agent starts printed its failure to stderr and returned an empty
set, so the run was graded without dropping those files from the patch and nothing in the saved row said so. A
non-zero exit, a result without an exit code and a raised exception are each recorded as verifier_error at the seed
stage, and the empty set is returned as before. No score, mask or retry changes.

Part of #6983 (work package 1), under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>
Comment thread resources_servers/critpt/app.py Outdated
from nemo_gym.core.failure_kinds import JUDGE_SKIPPED, PROVIDER_CREDENTIALS_REJECTED, PROVIDER_QUOTA_EXHAUSTED
from nemo_gym.core import FailureBoundary, observe_scored_despite_failure
from nemo_gym.core.failure_kinds import (
JUDGE_FAILED,

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.

[P2] Import JUDGE_FAILED through the public API

Please import JUDGE_FAILED through nemo_gym.core. It is already a public export, and the existing test_code_outside_the_library_imports_exported_names_from_the_public_api test fails solely on this new internal-module import. Moving this name into the public import above should resolve the core test failure.

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.

Verified at 457fbb3: JUDGE_FAILED now comes from nemo_gym.core, and the previously failing public-import test passes. This addresses the comment.

Comment on lines +301 to +305
observe_scored_despite_failure(
boundary=FailureBoundary.RESOURCES_SERVER,
failure_kind=VERIFIER_ERROR,
failure_reason=f"seed prep (wipe and README) failed for {body.instance_id}: {prep_result.stderr}",
stage="seed",

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.

[P2] Make the setup observation detect actual script failures

The generated seed_prep_script swallows cleaner failures with || echo ... and masks the README/git status with || true, so actual wipe/README failures return 0 and never reach this new observation. I reproduced a failing cleaner through seed_session: it returned a normal session with source still present and no event.

Please expose the preparation failure status/receipt while keeping seeding nonfatal, and exercise the generated script in the test; the current mocked exit code of 1 does not represent this failure. The underlying cleanup behavior predates this PR; this comment concerns the new observation missing it.

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.

Verified with the actual generated script through seed_session: a failed cleaner still leaves source present and exits 0, but now produces the seed-stage event. README-copy failures are recorded too, while healthy setup records nothing. Seeding remains nonfatal as requested. This addresses the observation gap.

Comment thread resources_servers/critpt/app.py Outdated
Comment on lines +535 to +542
if "accuracy" not in result:
# The batch is scored 0.0 below, as before; the missing value is recorded.
observe_scored_despite_failure(
boundary=FailureBoundary.RESOURCES_SERVER,
failure_kind=JUDGE_FAILED,
failure_reason="The CritPt grader response has no accuracy; the batch is scored 0.0",
stage="verification",
)

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.

Nonblocking [P3]: record only accepted fallback scores

Could this observation be emitted after the accuracy is None rejection guard? A reply without accuracy whose grader errors exceed the limit—or cover the whole batch—is excluded by judge_failsafe, but this event still marks it as scored and reaches the health report. I reproduced a one-item batch with judge_error_count=1: the row remains masked but carries this event.

Keeping the event on accepted fallback scores, with a rejected-batch test asserting no scored-despite-failure event, would preserve that distinction. This is a diagnostic correction; the score exclusion already works.

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.

Verified at 457fbb3: rejected batches remain excluded and no longer carry a scored-despite-failure event or its health finding. Accepted missing-accuracy replies still record the zero-score fallback. The HTTP reproduction and regression tests pass. This addresses the nonblocking comment.

Comment thread resources_servers/denovo_swe/app.py Outdated
f"&& git -C {shlex.quote(workdir)} --no-pager diff {shlex.quote(base_commit)}"
)
if result.error_type is not None or result.return_code is None:
raise RuntimeError(f"The sandbox did not report the git exit code ({result.error_type})")

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.

Nonblocking [P3]: preserve the provider error details

Please retain result.stderr in this error as well as error_type. Daytona reports provider failures with a synthetic return code and puts the useful cause, such as a 503 response, in stderr. Main preserves that detail; this branch replaces it with a generic message, so both the saved row and the new event lose the information needed to troubleshoot the run. Scores are unchanged.

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.

Verified at 457fbb3: the provider cause is retained alongside error_type. The new regression test confirms a 503 message reaches both the saved-row error and the diagnostic event. This addresses the nonblocking comment.

…in critpt and denovo_swe

- critpt: import JUDGE_FAILED from nemo_gym.core, which fixes the public-API import test that failed on it. Record a
  missing accuracy only for a batch that is accepted and scored: a rejected batch (grader errors over the limit or
  covering the whole batch) is excluded, so it no longer carries a scored-despite-failure event.
- denovo_swe: the seed prep script exits 0 whatever happens, so a failing cleaner or README copy never reached the
  record. The script still exits 0 and runs the same steps, and now prints a receipt naming the failed steps, which
  seed_session reads. A failed git commit --amend is not reported: it is expected on an image with no git history.
  The tests run the generated script with bash, including through seed_session.
- denovo_swe: keep the provider's stderr in the error for a command that reported no exit code, so the saved row and
  the event keep the cause (for example a 503).

No score, mask or retry changes.

Part of #6983, under #3180.

Signed-off-by: Onur Yilmaz <[email protected]>

@yuhezhang-ai yuhezhang-ai 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.

Re-reviewed 457fbb3 against main at 34bb0d8. All four earlier findings are addressed, including the two nonblocking diagnostic comments; no new actionable issue found in the update.

Validation: 149 focused tests passed, generated-script/seed-session and CritPt HTTP reproductions passed, and lint, formatting and diff checks passed. Live grading, model rollouts and an actual sandbox provider were not exercised in this follow-up. Scores, exclusions and retries remain unchanged; broader defaults remain the separate #6983 policy discussion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants