Repository navigation
Improve Github SSH Key setup docs - #12
Merged
Merged
Conversation
Signed-off-by: Brian Yu <[email protected]>
soares-f
pushed a commit
that referenced
this pull request
Sep 8, 2025
Signed-off-by: Brian Yu <[email protected]> Signed-off-by: soares-f <[email protected]>
soares-f
pushed a commit
that referenced
this pull request
Sep 15, 2025
Signed-off-by: Brian Yu <[email protected]> Signed-off-by: soares-f <[email protected]>
abubakaria56
pushed a commit
to abubakaria56/Gym
that referenced
this pull request
Mar 2, 2026
Signed-off-by: Brian Yu <[email protected]>
abubakaria56
pushed a commit
to abubakaria56/Gym
that referenced
this pull request
Mar 2, 2026
Signed-off-by: Brian Yu <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 16, 2026
Supersedes #1510; covers epic #1205 friction #8 + #12 and issues #1488, #1489, #1490 in one place: - #1488: missing config_paths entry -> ConfigPathNotFoundError (names entry + searched locations). - #1490: malformed (non-list) config_paths -> MalformedConfigPathsError with the expected Hydra list syntax. - #1489: zero configured servers -> NoServerInstancesError, raised in RunHelper.start() before Ray (covers ng_run AND e2e_rollout_collection). All three subclass a new ConfigError base. A CLI decorator (exit_cleanly_on_config_error) on run()/e2e_rollout_collection() turns any ConfigError into a clean, rich-escaped message + exit 1 with NO traceback (the explicit ask in #1488/#1489), while keeping them ordinary exceptions so ng_validate (#1599) can still catch and format them. Zero-server check uses validated server instances, not a raw key count. Tests: deterministic tmp_path-based path-error tests (both-locations, dedup, absolute), malformed-config_paths, zero-server, and the decorator (ConfigError -> clean exit; non-ConfigError propagates). Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 17, 2026
Ports ng_validate into the unified gym CLI (#1434): a validate() command in cli/env.py registered as 'gym env validate' (+ ng_validate/nemo_gym_validate deprecated shims). Runs the full parse with no Ray, exits 0/1 with a clean, rich-escaped message. Targets martas/1434. Epic #1205 friction #12 (no config validation tooling). Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 17, 2026
Ports #1609 onto the unified gym CLI (#1434). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: - #1488: missing config_paths entry -> ConfigPathNotFoundError - #1490: malformed (non-list) config_paths -> MalformedConfigPathsError - #1489: zero configured servers -> NoServerInstancesError, in RunHelper.start() before Ray (covers env run + eval run / e2e) All subclass ConfigError; a cli/env.py decorator (exit_cleanly_on_config_error, also applied to e2e_rollout_collection in cli/eval.py) turns them into a clean, rich-escaped message + exit 1, no traceback. Targets martas/1434. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 17, 2026
Ports ng_validate into the unified gym CLI (#1434): a validate() command in cli/env.py registered as 'gym env validate' (+ ng_validate/nemo_gym_validate deprecated shims). Runs the full parse with no Ray, exits 0/1 with a clean, rich-escaped message. Targets martas/1434. Epic #1205 friction #12 (no config validation tooling). Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 17, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 23, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 24, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 24, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 24, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 25, 2026
Ports #1609 onto the shared CLI base (martas/1434 + uv pin + concurrency). Covers epic #1205 friction #8 + #12 and issues #1488/#1489/#1490: ConfigPathNotFoundError, MalformedConfigPathsError, NoServerInstancesError (all ConfigError); fail-fast guard in RunHelper.start(); exit_cleanly_on_config_error decorator on run()/e2e_rollout_collection() -> clean message, no traceback. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 25, 2026
…hs (#1205 #8/#12; #1488/#1489/#1490) (#1609) ## What One coherent fix for the three `config_paths` failure modes, all failing fast with a **clean message and no traceback**: | Issue | Bad input | Before | After | |-------|-----------|--------|-------| | [#1488](#1488) | typo'd / missing path | 7-frame `FileNotFoundError` | `Error: config_paths entry '...' was not found. Looked in: ...` | | [#1490](#1490) | scalar instead of list | raw Pydantic `ValidationError` (+pydantic.dev URL) | `Error: 'config_paths' must be a list of paths ...` | | [#1489](#1489) | empty / omitted (zero servers) | Ray starts, hangs until SIGTERM | `Error: No server instances are configured ...` before Ray | ## How - New `ConfigError` base in `config_types.py`; `ConfigPathNotFoundError`, `MalformedConfigPathsError`, `NoServerInstancesError` (and the existing `ServerRefNotFoundError`) inherit it. They stay ordinary exceptions, so `ng_validate` (#1599, `except Exception`) can still catch and format them. - `load_extra_config_paths` wraps `OmegaConf.load` (#1488); `parse()` wraps `ta.validate_python` (#1490). - `raise_on_no_server_instances` (validated server-instance check, not a raw key count) runs in **`RunHelper.start()`** before `initialize_ray()` — covers both run and `e2e_rollout_collection` (#1489). - A CLI decorator `exit_cleanly_on_config_error` converts any `ConfigError` to a rich-escaped message + `exit 1`, **no traceback**. Unexpected errors still propagate unchanged. ## Supersedes #1510 Consolidates [#1510](#1510): typed exceptions `ng_validate` can catch/format (a bare `SystemExit` would escape it), a validated zero-server check, the guard in `start()` so `e2e` is covered, and deterministic tests. ## Tests `test_global_config.py`: path-not-found (both-locations / dedup / absolute), malformed config_paths, zero-server (raise + pass). `test_cli.py`: the decorator (ConfigError → clean exit; non-ConfigError propagates unchanged; success passes through). 67/67 `test_global_config`+`test_cli` pass; ruff + pre-commit clean. --------- Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 25, 2026
…ction #12 / FEP-1016) Add `gym env validate` (+ ng_validate/nemo_gym_validate deprecated shims): run the full config parse with no Ray and no server subprocesses, exit 0 (valid) / 1 (invalid) with a clean, traceback-free message — config errors otherwise only surface ~30-60s later after Ray bootstrap. It reuses get_global_config_dict so the checks stay in sync: config_paths resolution (#1488/#1490), server cross-references (#1561), mandatory ??? values (#1575), and schema. A dummy policy_model (NO_MODEL) is injected so model interpolations resolve without real creds — the model is supplied by --model* at run time. Registered in the env group with the same config-selection flags as env start; wrapped in exit_cleanly_on_config_error. Tests: env validate routing + validate() valid/invalid behavior. Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
added a commit
that referenced
this pull request
Jun 25, 2026
…ction #12 / FEP-1016) Add `gym env validate` (+ ng_validate/nemo_gym_validate deprecated shims): run the full config parse with no Ray and no server subprocesses, exit 0 (valid) / 1 (invalid) with a clean, traceback-free message — config errors otherwise only surface ~30-60s later after Ray bootstrap. It reuses get_global_config_dict so the checks stay in sync: config_paths resolution (#1488/#1490), server cross-references (#1561), mandatory ??? values (#1575), and schema. A dummy policy_model (NO_MODEL) is injected so model interpolations resolve without real creds — the model is supplied by --model* at run time. Registered in the env group with the same config-selection flags as env start; wrapped in exit_cleanly_on_config_error. Tests: env validate routing + validate() valid/invalid behavior. Signed-off-by: Wojciech Prazuch <[email protected]>
5 tasks
wprazuch
added a commit
that referenced
this pull request
Jun 25, 2026
…tion #12) (#1599) ## What Adds **`gym env validate`** (+ `ng_validate` / `nemo_gym_validate` deprecated shims) — runs the full config parse with **no Ray and no server subprocesses**, then exits **0 (valid) / 1 (invalid)** with a clean, rich-escaped message (**no traceback**). Returns in well under a second instead of after a ~30–60s Ray bootstrap. ```bash gym env validate --config resources_servers/<env>/configs/<env>.yaml --config responses_api_models/<model>/configs/<model>.yaml gym env validate --benchmark gsm8k --model-type openai_model ``` ## How `validate()` lives in `cli/env.py` and is registered as `env validate` in the `gym` router (`cli/main.py` COMMANDS) with the same config-selection flags as `env start` (`--config`, `--benchmark`, `--environment`, `--resources-server`, `--model-type`, `--search-dir`, `--model*`). It reuses the same `get_global_config_dict()` parse path the other commands use, so the validation checks stay in sync: - **config_paths** resolution — missing/typo'd ([#1488](#1488)) and malformed ([#1490](#1490)) - **server cross-references** — unknown `name:` refs ([#1561](#1561)) - **mandatory `???`** values ([#1575](#1575)) - **schema** (`BaseNeMoGymCLIConfig`) Wrapped in `exit_cleanly_on_config_error` (from #1609) so any `ConfigError` becomes a clean message + `exit 1`. A dummy `policy_model` is injected (the `NO_MODEL` parser config, as in `gym list` / `env compose`) so model interpolations like `${policy_base_url}` resolve without real creds — validation is about config **well-formedness**; the real model is supplied by the `--model*` flags at run time. ## Targets `main` Originally drafted on the unified-CLI epic branch; rebuilt directly on `main` now that [#1630](#1630) (and #1637/#1609/#1635/#1671) have merged. The old branch contents (a snapshot of the CLI refactor + unrelated CI commits) were superseded and replaced. ## Scope note The zero-server check ([#1489](#1489), "nothing configured to run") is intentionally **not** part of `validate`: `NO_MODEL` injects a dummy model server (which would defeat the check), and "is anything configured to run" is a *start*-time concern already enforced by `gym env start` before Ray init. `validate` focuses on config well-formedness. ## Why Epic [#1205](#1205) friction #12 (no config validation tooling) — the M1 "fast failure triage" deliverable. Config errors otherwise only surface after Ray starts (~30–60s). ## Tests - `test_cli_main.py`: `gym env validate --config X` routes to `nemo_gym.cli.env:validate` with `+config_paths=[X]` (added to the parametrized config-command matrix). - `test_cli.py`: `validate()` prints OK on a valid config; a raised `ConfigError` becomes `exit 1` (no traceback). - All `test_cli` + `test_cli_main` + `test_cli_legacy` pass (the only failures are the pre-existing Python-3.12 `TestDidYouMean` argparse issue on `main`); ruff + pre-commit clean. Smoke-tested end-to-end: `✓ Config is valid.` on a real benchmark, clean error + `exit 1` on a bad path, and the `ng_validate` deprecation shim. --------- Signed-off-by: Wojciech Prazuch <[email protected]>
ritaneves
pushed a commit
that referenced
this pull request
Jun 25, 2026
…hs (#1205 #8/#12; #1488/#1489/#1490) (#1609) ## What One coherent fix for the three `config_paths` failure modes, all failing fast with a **clean message and no traceback**: | Issue | Bad input | Before | After | |-------|-----------|--------|-------| | [#1488](#1488) | typo'd / missing path | 7-frame `FileNotFoundError` | `Error: config_paths entry '...' was not found. Looked in: ...` | | [#1490](#1490) | scalar instead of list | raw Pydantic `ValidationError` (+pydantic.dev URL) | `Error: 'config_paths' must be a list of paths ...` | | [#1489](#1489) | empty / omitted (zero servers) | Ray starts, hangs until SIGTERM | `Error: No server instances are configured ...` before Ray | ## How - New `ConfigError` base in `config_types.py`; `ConfigPathNotFoundError`, `MalformedConfigPathsError`, `NoServerInstancesError` (and the existing `ServerRefNotFoundError`) inherit it. They stay ordinary exceptions, so `ng_validate` (#1599, `except Exception`) can still catch and format them. - `load_extra_config_paths` wraps `OmegaConf.load` (#1488); `parse()` wraps `ta.validate_python` (#1490). - `raise_on_no_server_instances` (validated server-instance check, not a raw key count) runs in **`RunHelper.start()`** before `initialize_ray()` — covers both run and `e2e_rollout_collection` (#1489). - A CLI decorator `exit_cleanly_on_config_error` converts any `ConfigError` to a rich-escaped message + `exit 1`, **no traceback**. Unexpected errors still propagate unchanged. ## Supersedes #1510 Consolidates [#1510](#1510): typed exceptions `ng_validate` can catch/format (a bare `SystemExit` would escape it), a validated zero-server check, the guard in `start()` so `e2e` is covered, and deterministic tests. ## Tests `test_global_config.py`: path-not-found (both-locations / dedup / absolute), malformed config_paths, zero-server (raise + pass). `test_cli.py`: the decorator (ConfigError → clean exit; non-ConfigError propagates unchanged; success passes through). 67/67 `test_global_config`+`test_cli` pass; ruff + pre-commit clean. --------- Signed-off-by: Wojciech Prazuch <[email protected]> Signed-off-by: Rita Fernandes Neves <[email protected]>
bxyu-nvidia
pushed a commit
that referenced
this pull request
Aug 27, 2026
## What does this PR do? Adds two capabilities to the SWE agent harness (`responses_api_agents/swe_agents/`), plus fixes to the DeepSWE verifier path found while baselining that dataset. **1. opencode patch mode.** New `opencode_patch_mode` config field (`worktree` | `committed`, default `worktree`), exported to the harness as `PATCH_MODE` and forwarded to the bench CLI as `--patch-mode`. `worktree` is the existing capture — `git diff` of the working tree with untracked files marked intent-to-add — and is unchanged. `committed` instead diffs the pre-run HEAD against the most advanced commit the agent left behind, searched across HEAD and every local branch. That mode is required by task families whose problem statement tells the agent to commit its solution: DeepSWE's statements end with *"work on this in a new branch from main and commit everything when you are done"*, so those rollouts finish with a clean tree and `git diff` records every patch as 0 bytes regardless of whether the model solved the task. Both modes emit a plain `base -> final tree` unified diff, so the eval side is unchanged. **2. opencode trajectory replay.** New `opencode_replay.py` module plus wiring, so a rollout can resume a partially-completed trajectory on a fresh container instead of restarting the task. When a request's `input` carries a prior trajectory (`function_call` / `function_call_output` items beyond the seed messages), it is converted to chat-completion format and surfaced as `problem_info["replay_messages"]`; the processors materialize it (plus the recorded system prompt and, for opencode, a subagent manifest) and forward the paths to `run_infer.sh` as positional args (opencode `#13`/`#14`, openhands `#18`). Recorded subagent sessions are linked to the exact parent task call that spawned them rather than by metadata order, so parallel siblings and nested agents can't consume each other's turns, and live continuations are merged back onto the recorded root. Per-session trajectory records now also carry replay linkage and global ordering (`recorded_session_id`, `spawn_call_id`, `spawn_index`, `global_turn`, …), and `SWEBenchVerifyResponse.subagent_trajectories` is populated so returned create-params are directly replay-ready. **3. DeepSWE verifier fixes.** - Carry optional `tests/grader.py` / `tests/config.json` from Harbor bundles (DeepSWE v1.1 delegates preparation and scoring to them) and mount them into the eval container. Optional, so older bundles still convert and grade. - Read the reward from `/logs/verifier/reward.json` (new tasks) as well as `reward.txt` (older tasks and crash sentinels). - Fix `mkdir -p /logs/vserifier` → `/logs/verifier`; the typo meant the directory the verifier writes its reward into was never created, so the reward read back empty and the task graded 0. - Skip injecting the online Maven mirror for verifiers that deliberately run offline (`mvn -o` / `--offline`) against their image's build-time JVM cache — Maven records which repository supplied each cached artifact, so a differently-named mirror makes cached plugins look unavailable. **4. Reverts #2120** (SWE agent rollout observations), removing `observability.py`, `tests/test_observability.py` and their call sites. <!-- TODO(author): state why the revert is included, and whether it will be re-landed in another form. Reviewers will ask, since #2120 is part of the merged #2114–#2120 series. --> Tests: `responses_api_agents/swe_agents/tests/test_app.py` gains 26 tests covering the replay path — gym-side message conversion (openhands and opencode), replay file materialization and system-prompt pinning, positional-arg ordering, subagent manifest mounting with `ENABLE_SUBAGENTS=1`, parent-task-call linkage for parallel and nested children, completed-invocation truncation, legacy payload parsing, live-continuation merging, and preservation of the new trajectory record fields. Note: end-to-end opencode replay also needs `--replay-messages-file` / `--replay-subagents-file` in the opencode fork. The commit currently pinned by `configs/swebench_opencode.yaml` (`nv-opencode@sdd/dev`) does not have them — its `run_infer.sh` stops at positional `#12` — so until that lands and the pin moves, an opencode replay request is a no-op and the agent starts the task from scratch. openhands replay is unaffected. Bumping the pin also requires clearing `cache/swe_agents/swe_opencode_setup`, since `OpenCodeHarnessProcessor.setup()` returns early once the tree exists and never re-checks-out the configured commit. ## Checklist - [x] I have read the [contributing guidelines](https://docs.nvidia.com/nemo/gym/latest/contribute/development-setup). - [x] The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs. - [x] Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable). - [x] Pre-commit checks pass locally (`pre-commit run --all-files`) (so CI lint/format/copyright pass). - [x] All commits have DCO sign-off (`git commit -s`) (so the DCO check passes). --------- Signed-off-by: Sugam Devare <[email protected]>
cmunley1
added a commit
that referenced
this pull request
Nov 25, 2026
- A leading row digit after letters matches only after the column of the A1 part
of a Sheets values range (after the last /values/, after its "!" when it names a
tab). Tab titles and ids no longer name rows: "Q4 2025" (4), deal_ye5l8juv (5),
msg_v2 (2), c7 (7). A number in the tab title ("PO #12") is not a row either.
- Split the URL before decoding it, so an encoded "#" in a tab title keeps the range.
- The wait reply gives the time in the seed's zone, the zone acted_on_day grades in.
- A multi-day row without the wait texts or with a time that is not ISO 8601 is
refused at load instead of failing the rollout with a 500.
Signed-off-by: Christian Munley <[email protected]>
subhankar-ghosh
added a commit
to subhankar-ghosh/Gym
that referenced
this pull request
Dec 2, 2026
…unded replies - Carry-over: the recorder saves its advanced cutter and held windows right after a window is cut (WindowRecorder.state_dict), and a resumed episode restores them, so a carried-over episode gets the same windows, rewards and level bonuses as an uninterrupted one (review NVIDIA-NeMo#6). - suspend() disarms the episode deadline and keeps the budget left; resume() re-arms it with that budget, so a checkpoint longer than the budget cannot end the episode. end() still stops a paused one (NVIDIA-NeMo#10). - The per-call model timeout now covers status and body reading, and a timed-out reply's connection is closed before the retry (NVIDIA-NeMo#11). - An infrastructure end masks only the windows still open at the failure; windows graded before it keep their rewards, and a cheat attempt keeps its penalty (NVIDIA-NeMo#12). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Subhankar Ghosh <[email protected]>
pplattner
pushed a commit
to pplattner/Gym
that referenced
this pull request
Dec 2, 2026
…user and time sim (NVIDIA-NeMo#5532) * feat(automationbench): add a simulated business days training environment A wait tool moves a per-rollout clock and applies each task's dated events. Successful writes are logged with simulated time, so tasks can grade the day an action happened (acted_on_day, not_acted) next to the world assertions, under the guardrail-gated AutomationBench headline. Signed-off-by: Christian Munley <[email protected]> * update Signed-off-by: Christian Munley <[email protected]> * feat(environments): ab_synth serves single-day, multi-day and multi-turn rows Rows pick their features through info keys: period_end for simulated days, user_card for a simulated requester, requester_services for apps only the requester runs. The requester is any OpenAI-compatible endpoint called through Gym's HTTP client. unavailable_call_break turns calls to missing tools or unconnected services into a broken guardrail. A requester that stays down ends the episode with requester_failed set, so training can mask it. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): bound requester calls, mask requester failures, type added records - Requester calls: each try (request and body read) ends after requester_timeout_s (default 300, must be finite), and _chat owns the retries, so a refused or stalled requester ends the episode instead of hanging the rollout. The client is imported from nemo_gym.client, the public API. - verifiers_agent: mask_sample_metrics lists rubric metrics that flag an environment failure; a rollout with any of them above 0 returns mask_sample=true and failure_kind verifiers_agent:<metric>. ab_synth's config masks requester_failed. - A record added by an event takes the type the collection declares, so a later event can update it even when the collection started empty. - The requester's tool budget counts calls, not responses. - Unclosed reasoning blocks are dropped from the requester's view. - README: a complete single-day row and the gym eval run command. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): fail fast on unset requester, mask broken events, keep clock aware - Refuse to load multi-turn rows when requester_base_url or requester_model is unset, and reject requester_max_tries < 1. - requester_body is merged after the built-in sampling values, so its keys win. - Optional requester key from requester_api_key_env or requester_api_key_file, sent as a Bearer header. - Clock.wait keeps current_time timezone-aware when the seed is aware. - A dated event that cannot be applied, or a requester that keeps calling tools, ends the rollout with requester_failed set, so it is masked. - Module logger instead of print. README notes that created records carry wall-clock timestamps. Signed-off-by: Christian Munley <[email protected]> * test(ab_synth): run the tests in verifiers_agent, refuse time-field assertions - Move the ab_synth tests to responses_api_agents/verifiers_agent/tests/, whose venv installs ab-synth-env, automationbench and verifiers, so the server test suite collects them. - Upstream routes and schema defaults stamp created records with datetime.now() in about 100 modules, many as default_factory, so no scoped clock patch reaches them. load_environment now refuses a world assertion that names a date or time field, and the README says so. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): send a headers dict when no requester key is set nemo_gym.client.request sets Content-Type on the headers it is given, so headers=None raised TypeError and masked every multi-turn row on an endpoint without a key. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): report a malformed wait time to the agent and read normalized text parts A wait(until=...) that does not parse is the policy's mistake, so return it as a tool error instead of masking the rollout as a requester failure. Only failures applying dataset events stay masked. _text read text only from dict content parts, so parts verifiers normalizes into objects were dropped from the requester's conversation and could mark a turn empty. Read text from dicts and objects alike. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): grade acts, events and reward faults correctly - Log a write only when it changes the world. Failed writes with any error shape ({"success": false}, {"ok": false}, ...) and read-only POSTs such as searches no longer break not_acted or set the acted_on_day day. - Keep non-ASCII text in object bodies, so body_contains matches "Müller". - A leading row number matches a URL only as an A1 cell reference, not inside "/v4/" or "Sheet1". - Dated events work on dict-typed collections (jira.issues, google_drive.files, ...). - An event on a record the agent deleted is skipped and the rollout is scored. Any other missing target still ends the rollout unscored. - reward is synchronous, so verifiers_agent masks a row whose assertions make it raise as a verifier error instead of scoring it 0. - After an overlong prompt the requester is not called again on the same turn. - acted_on_day reads the day in the seed's time zone (UTC for a naive seed). Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): deleted event targets, row and version matching, requester connects - An event on a record that existed (at the seed or added by an earlier event) and is gone now is skipped and the rollout is scored, whatever route deleted it (a POST with operation=delete, a Gmail thread delete, the requester). An event on a record that never existed still ends the rollout unscored. - names() skips the host and API version segments (/v3/, /2/ first, /api/1.0/, /rest/api/3/), and a leading row digit matches after any A1 column (B7, a7:b7, Sheet1!a7), not inside a word like Sheet1. - body_contains also matches the unescaped string values of an object body, so quotes, newlines and backslashes match. - A requester try makes one connection attempt: request() no longer retries a refused connection until the try's timeout. - README: record is matched in the URL only; records named only in a body (a Slack channel, a GraphQL id) cannot be graded with acted_on_day or not_acted. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): name sheet rows only in the A1 part of a values range - A leading row digit after letters matches only after the column of the A1 part of a Sheets values range (after the last /values/, after its "!" when it names a tab). Tab titles and ids no longer name rows: "Q4 2025" (4), deal_ye5l8juv (5), msg_v2 (2), c7 (7). A number in the tab title ("PO NVIDIA-NeMo#12") is not a row either. - Split the URL before decoding it, so an encoded "#" in a tab title keeps the range. - The wait reply gives the time in the seed's zone, the zone acted_on_day grades in. - A multi-day row without the wait texts or with a time that is not ISO 8601 is refused at load instead of failing the rollout with a 500. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): grade acted_on_day and not_acted on the records a write changed The day assertions matched `record` against the request URL, and every round of URL rules made new misses: tab titles and worksheet ids read as rows, an encoded "/" in a tab title, version segments, ids named only in the body. A write is now graded on what it did to the world: - Each logged write lists the keys of the records it added, changed or deleted (`id`, else `sid`, else the first `*_id` field, so Xero `contact_id` works), plus the records those point to by an id field or an action's params: a new calendar event names its calendar, a Slack post its channel, a Jira comment its issue, a sheet row its spreadsheet and tab. - A sheet row is named the way a Sheets range names it ("7", "B7", "Sheet1!A7:C7", "'Q4 2025'!B7", rows "A2:B5") and matched on the rows the write changed, numbered as the simulator addresses them (string row ids by position). - Dated events find their record by the same key, so a set-event on a Xero contact or a Twilio message no longer masks the rollout. - An integer `record` grades like its string. names() and its URL rules are gone. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): resolve day-assertion records at load and grade exact keys Round 4 guessed at grade time: any `*_id` field credited a parent, any string shaped like an A1 range counted as a row of any tab, and string row ids and actions-only apps never matched. Records are now resolved once, at load: - Each acted_on_day / not_acted `record` resolves against the seed and the records its events add: the record with that key, a Jira issue by its key, or a sheet row by its row_id or id. Only a string that names no record is read as an A1 reference, to rows of one tab (a row's number is its row_id, or its position for string row ids, as the simulator addresses it). - A row whose record names nothing or more than one record is refused at load, with the counts logged. replay() raises on such a row. - A sheet row's key is (spreadsheet, worksheet, row_id), so an append never takes the place of a row it does not edit. - Writes are graded on exact keys. Parents are credited only through an explicit map (calendar event to calendar, Facebook post to page, Slack message to channel, sheet row to spreadsheet and tab), and a Jira comment through its action's issue id or key. An opportunity's account or a ticket's requester is no longer acted on. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): resolve day records per rollout and key every record one way Gym's /run hands each rollout the row's own info, not the environment's dataset copy, so the records resolved at load never reached a real rollout and every multi-day row raised on its missing targets. Now: - setup_state resolves the row's day-assertion records. A row that cannot be resolved ends before its first turn with requester_failed and the new unresolved_records metric, so it is masked. The load-time pass stays as the audit and logs the counts. - One key function serves the seed, events and the write log: id, else sid, else an explicit primary key (Xero), never a foreign key a record happens to list first. A sheet row's key maps a spreadsheet or tab named by its title to its id, so title-addressed writes and event-added rows match. - Google Drive, Pipefy and Airtable writes that upstream keeps only as actions name their file, card or base through the action's params. - Seeds are null-stripped as upstream does, and tabs are scoped by spreadsheet. - Tests drive /run with the raw row info. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): check every row at setup and mask rows that cannot run A row Gym sends to /run need not come from tasks_path and skipped the load checks, so an unknown requester service or a null record raised in setup_state as a server error. Now: - One check (row_problems) runs at load and in every rollout's setup_state: wall-clock assertion fields, wait texts, ISO times, a requester for multi-turn rows, requester services that are apps, a record on every day assertion. A row that fails it or cannot be resolved, and any exception in setup or the turn-end check, ends the rollout before its first turn with the env_row_invalid metric, masked through mask_sample_metrics. - Airtable record creates and updates, Drive files created in or moved between folders credit the base and folders. - Sheets titles map to ids case-insensitively, a row's spreadsheet and tab are credited by the mapped ids, and a tab is keyed within its spreadsheet. - replay() grades the initial world from the null-stripped seed. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): refuse bad rows one by one and resolve sheet titles upstream's way - load_environment refuses each row that fails the row check or cannot be resolved, counts and logs them, and loads the rest. It fails only when no row is left, or when multi-turn rows have no requester configured. Before, one row with a date-field assertion stopped the whole load: 12 of the 72 A4 dev rows have one, so no ab_synth version could load that data. - Sheet rows map spreadsheet and tab titles to ids with the simulator's own _resolve_spreadsheet_id and _resolve_worksheet_id, so separator variants and duplicate titles resolve the way upstream writes them. A1 tab titles resolve the same way. - A dated event on a record that is gone is checked by the record's key and its id, so an event on a deleted tab is scored rather than masked. - A write that changes the world and then raises is still logged. - acted_on_day `day` must be YYYY-MM-DD. - A write to a tab acts on its spreadsheet. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): refuse only assertions on clock-stamped fields The date-field rule refused every world assertion whose field name looked like a date (due_date, start.dateTime, close_date, a sheet column, even Last_Updated_By), though the agent writes those from the task and they grade deterministically. Only fields the simulator stamps from the wall clock on every create or update (created_at, updated_at, sent_at, ts and the others in STAMPED_FIELDS) cannot match a fixed value, so only those refuse a row. Sheet columns are never stamped. Refused at load before and after, from the same rows: A4 dev rows 13 -> 1 of 72 (the one left is an ambiguous record), the A4 multi-day arm 190 -> 100 of 1,158 and pair_A 518 -> 47 of 4,548 (all of the remaining refusals are record resolution). Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): never let one row's checks fail the load, and check event targets - A row whose checks raise (a seed the simulator rejects, an event without a patch, a row without info) is refused with the error and counted; the other rows load. A null events list is treated as no events, as upstream strips it before a rollout. - Keys inside cell and field value maps (cells, cell_contains, Airtable fields) are the row's own column names, so a Google Forms "Timestamp" column no longer refuses a row. ts is not a stamped field: Slack assertions use it to find a seed message. - A dated event must target a record of the seed or one an earlier event added; any other target is refused at load instead of masking only the rollouts that wait past it. Refused at load is unchanged on our rows: A4 dev 1 of 72, the A4 multi-day arm 100 of 1,158, pair_A 47 of 4,548. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): run each row's dated events on its seed at load - Load applies a row's events in time order to a copy of its seed, with the same patch code a rollout uses, and refuses the row with the error when one cannot apply: a missing record, fields outside `set`, an added record the schema rejects. This replaces the target-only check, which let such rows load and masked only the rollouts that waited past them. - A row with `events: null` now also sets up as a row without events. Before, it loaded but every rollout was masked at setup. Refused at load is unchanged on our rows: A4 dev 1 of 72, the A4 multi-day arm 100 of 1,158, pair_A 47 of 4,548. No row of these raises in the event dry run (19, 916 and 431 rows with events). Signed-off-by: Christian Munley <[email protected]> * refactor(ab_synth): simplify without changing grading - Clock no longer tracks which records ever existed. Load and setup run every dated event on the seed (resolve_records), so an event that cannot find its record mid-rollout always means the rollout deleted it: the event is skipped. This drops _known and a full world dump after every applied event. - Shorter docstrings and comments: the module docstring points to the README instead of repeating it, and comments keep only the why. - README: the multi-day section no longer restates the implementation, and the refusal and masking rules are in one section. - Tests: drop two duplicates (a never-existing event target, a row refused at load and masked at setup), fold the one-bad-row load test into its parametrized twin, and assert the actual outcome where a test accepted either of two. Comments describe the behavior instead of review finding numbers. Rewards, masks and refusals are identical before and after on 551 recorded rollouts of single-day, multi-day and multi-turn rows and on 1,918 generated training rows (1,158 multi-day, 760 mixed), with no calls and with a wait to the end of the period. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): address review findings on grading, records and the requester - A multi-day row is graded at period_end: the clock runs to it before grading, so an event the agent did not wait for still applies. Waiting can no longer only lower the reward. - Load refuses a row whose dated events alone change a world assertion, unless the assertion sets excluded (true to skip it, false to make it an objective that must hold at period_end). - An A1 day-assertion record resolves against the world after the row's events, so a range covers sheet rows an event adds. - Requester tool calls go through the clock, so its writes reach the write log that acted_on_day and not_acted grade. - Load refuses rows whose events can never fire: events without a period_end, a multi-day row without the seed's meta.current_time, a period_end not after it, or an event after period_end. - A naive time the agent waits until is read in the seed's zone. - A not_acted with excluded: false scores as an objective, as the world assertions already did. - Each policy message the requester sees is cut to REQUESTER_RESULT_CHARS. - verifiers_agent warns when a mask_sample_metrics name is not among the rollout's metrics. - Tests: one regression per fix, the requester DONE test now asks the requester a second time, and the delete-then-event test deletes through a route that exists. Replayed against the previous head, graded at period_end: 551 recorded rollouts and 1,918 generated rows (no calls, and a wait to the end) keep their rewards. The changes are in which rows load: 17 rows whose events alone flip a world assertion are refused, and 8 rows with A1 records on event-added sheet rows now load. Signed-off-by: Christian Munley <[email protected]> * feat(ab_synth): let a row set its own turn limit and guardrail A row's info may set max_turns and unavailable_call_break, which override the environment's values for that row, so single-day, multi-day and multi-turn rows with different limits can share one agent. A value of the wrong type refuses the row. Two tests cover the override and the refused values. Signed-off-by: Christian Munley <[email protected]> * fix(ab_synth): retry a requester outage through rollout recovery A masked metric's kind is declared for the outcome policy, and a kind the policy names saves its outcome decision. ab_synth retries verifiers_agent:requester_failed, so rollout recovery reruns a requester outage, and an invalid row stays masked. Adds the missing copyright header to environments/ab_synth/__init__.py. Signed-off-by: Christian Munley <[email protected]> --------- Signed-off-by: Christian Munley <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.