Repository navigation
Add RATs: the rats template and Evolver, with a LIBERO example - #133
Open
iamziyuzhao wants to merge 12 commits into
Open
iamziyuzhao wants to merge 12 commits into
iamziyuzhao wants to merge 12 commits into
Conversation
RATs (Playful Agentic Robot Learning, arXiv:2606.19419) learns a skill library by play and is evaluated with the library frozen. Hermit had no way to run it. Now RATs' own code runs every row, unchanged, at the pinned commit: - The rats template holds RATs' skill library (skills.json) and its play-time state (state/: failure memory, retry bank, proposer counts, curator history, loop counters, iteration digests). Its check screens a library's records and code and a state's files. - RatsActor runs RATs' scripts/run_rats.py on one row in RATs' Python 3.10 venv, through runner.py, inside a bubblewrap sandbox of its own: the checkout read-only, no network but the model endpoint and RATs' vision services, one GPU, the authors' learned libraries hidden, and in play the LIBERO-PRO test suites hidden. Every model call goes to a ChatEndpoint in the actor's process (Direct, Layer 1), which holds the key and meters tokens and cost; each request carries the configured reasoning effort (medium by default), and for a model without video input RATs' own _strip_videos_from_messages drops the videos. - A play row is one play iteration, resumed from the adapter with RATs' own --resume. An exec row is one LIBERO-PRO batch-driver job: one task, N trials in init states first_state + j, the library frozen, strict benchmark. - RatsEvolver applies what a play iteration hands back (skills.json and state/) after the template check, or leaves the adapter unchanged and says why. - examples/libero/rats/ has train (50 play iterations), val (the original LIBERO, init states 43-49), test (the paper's Table 1: six LIBERO-PRO suites, init states 0-9, 600 trials) and test_full (eight suites, 50 states) as configs of their own, plus rows.py, launch.sh (rows written once per argument set) and serve.sh (RATs' services). Tests: tests/methods/rats/ (29) on a stand-in of RATs' modules, including the Trainer and evaluate end to end in the sandbox. Docs: docs/methods/rats.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first evaluation's rows stopped on RATs' get_real_depth_map assertion: on this host's H200s, other processes' CUDA work (here GraspGen's, and other users' jobs) silently invalidates a live NVIDIA EGL context's reads, so the depth maps RATs reads back are garbage. RATs' own setup renders with NVIDIA's EGL; the actor still does by default, and now also takes `render: cpu` (launch.sh: RATS_RENDER=cpu): - Mesa is the only EGL vendor (__EGL_VENDOR_LIBRARY_FILENAMES, the glvnd vendor file), RATs' process sees no CUDA device and binds no GPU, and llvmpipe's threads are bounded (render_threads, default 2). - Inside the sandbox the runner points MuJoCo's and robosuite's EGL backends at Mesa's software device as the sandbox lists it (MUJOCO_EGL_DEVICE_ID): the index differs from the host's. - Checked in the actor's real sandbox: a LIBERO scene renders with depth in [0, 1]. The method page also says what final against none compares: a play library carries play's primitive records (the full API's 12, three of which the reduced API lacks) and the no-library condition the reduced API's 26, as in RATs' own evaluation recipe. Tests: the render settings, and a cpu row in the sandbox that binds no GPU and sets the device (skipped without Mesa's EGL). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…carry the play scene The post-PR audit of 476a45a found two P1 and four P2 defects; this fixes them and its P3s. - Seam 4: in exec, RATs' Verifier counts its native vote alone (task_completed, or reward >= 0.99, behind RATs' gate that the program ran) and keeps the structured custom and visual verifiers' results as an uncounted `vote`. RATs' docs set RATS_VERIFIER_STRICT_BENCHMARK=1 for this, but no code at 1fd2ef5 reads it, so a VLM-only success counted. A trial now counts when RATs' verdict and its last verification's native check both say success. - The services: a row's sandbox reaches only the ports its RATs config names (api_servers: play 8114/8115/8116, test 8114/8116 and the grasp service; never Molmo's 8122). serve.sh starts every service with a clean environment (env -i and a short list, no key or token), and GraspGen through graspgen-python, whose graspgen_guard.py refuses the one request msgpack_numpy would unpickle (an object array). - Without video, every vision call is built from images as RATs builds it without a video (the visual verifier's sampled frames, the feedback generator's first and last frames, the per-step verifier's images, the diagnoser's filmstrip), instead of a text-only call after the strip. - RATs' parallel sub-agent workers, which it starts as processes of their own, start through `runner.py worker` and reach the endpoint. - The play scene the last iteration left (its generated BDDL and custom verifier) is saved in state/scene/ and rebuilt with RATs' EnvironmentCreator in the next process, with the bootstrap task's name in loop.json; the template takes state/scene/. Validation leaves out play's bootstrap task, libero_spatial task 0 (39 rows). - Provider key files (.env, .openrouterkey) are hidden; play also hides LIBERO-PRO's perturbation specs (libero_ood/, which repeat the test `_task` instructions). - RATs' own parser reads a row's arguments: rats_args that change the row in any spelling (abbreviations, --flag=value) refuse it before RATs runs. - The provider call is bounded like RATs' request (200 s); the effort comment names the first-evaluation row (RATs' default.yaml says low); the rows cache key includes rows.py; the docs say a run with failed play rows ends short of 50 iterations, that RATs' docs' auto-launch of the services is not what run_rats.py does, and how the per-row read-only library differs from the batch driver's shared file. - Tests: the stand-in now has RATs' Verifier vote and video choice, its worker processes, a generated scene behind RATs' wrappers and build_parser; new tests for each fix, the template's scene, GraspGen's guard and the services' clean environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In catalog mode RATs' play rebinds to the bootstrap suite's own tasks (LifelongLoop._rebind_libero_env over _init_libero_validated_tasks: libero_spatial's ten), which are validation rows. A play row is RATs' default, novel-task play, so the runner's argument check now also holds --catalog off, in any spelling RATs' parser takes, and the actor's screen names it. The method page and the README say so; the splits paragraph says play's scenes use LIBERO's objects and fixtures, as the validation tasks do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With render: cpu, Mesa's llvmpipe renders a LIBERO step of RATs' play env (agentview 512x512 and eye-in-hand 800x800, with depth) in 0.18 s on the H200 host, against 0.016 s with NVIDIA's EGL (two llvmpipe threads; eight give 0.10 s). RATs' policy execution timeout (180 s, rats/config/default.yaml), under which its policy self-check, its execution and its sub-agent workers run, then cut programs a GPU runs to the end: in the first evaluation's first half hour, 6 of 17 executions reached it, and each self-check that did sent RATs into a self-repair that asks for shorter programs. - The actor gives the runner --timeout-scale (agent.params.execution_timeout_scale; 1 with render: gpu, 11 with render: cpu), and the runner passes run_rats.py --timeout as RATs' configured execution timeout, read as run_rats.py reads it, times the scale. RATs hands the same timeout to its sub-agent workers. A row whose rats_args set another --timeout is then refused. - The row's guards: an exec trial's is 2 h (six attempts of about ten minutes reached the 1 h guard), and with render: cpu both guards double. The row's record keeps its render, scale and limit. - The method page, README and launch.sh say so; a Budgets row in the authors-vs-port table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second post-PR audit (of 3f11476 and ddad5a1) found no P1, one P2 and seven P3s; each was checked against RATs at 1fd2ef5. - The library at test (P2): RATs copies the library it is given into its output directory and works on that copy (LifelongLoop.__init__), and each of its batch driver's jobs has its own output directory. The method page said a row's RATs write fails on a read-only copy; it records the skills' use on its own copy, as each upstream job does, and the trained library is never written. The method page and its table row say so, and the stand-in copies the library as RATs does; the end-to-end test checks the trial's usage went to the row's copy. - The argument check (P3): run_rats.py fills settings in from the env config's top-level rats: block after its parser (_apply_rats_runtime_defaults). The runner applies the same before it compares, and holds, in both modes, no --mock (task_completed at random), no library merge or tier filter, and no playtime or failure memory from other runs. - The Evolver (P3): a library handed back without its state/ (missing or a link), or with an empty one while the adapter's is not, leaves the adapter unchanged; before, the adapter's play state was wiped, and the next iteration would have started over. - The guards with a scaled timeout (P3): instead of doubling, a trial's and a play row's default guard grows by what the scaled execution timeout can add to their 24 program runs (six attempts, each a self-check, two self-repairs' self-checks and the execution): 14 h a trial and 18 h a play row with render: cpu. A scale must be finite. - Texts (P3): the scale bounds a program's whole wall clock, so a CPU row is somewhat more lenient than RATs' 180 s on a GPU; the factor was measured with two llvmpipe threads (eight give 0.10 s). Most validation tasks have a `_swap` test twin with the same instruction and goal (val.yaml, rows.py). The feedback generator attaches media on MolmoSpaces only. serve.sh leaves a port that already answers alone and says so; the README's Trust section says its guard and clean environment hold only for services serve.sh started. The endpoint's max_retries covers a provider's 429, which RATs' client does not retry for GLM. - The stand-in's vision services listen on free ports, not RATs' real ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The third post-PR audit (of da34f64) found no P1, one P2 and two P3s; each was checked against RATs at 1fd2ef5, GraspGen and the libraries they run on. - The services' boundary (P2). RATs' programs reach the vision services, which run outside the sandbox as the user who started serve.sh, and two of them took more than RATs' clients send: - SAM3's decoder opens any image format Pillow knows, and Pillow runs Ghostscript on an EPS image. serve.sh now starts SAM3 through sam3_guard.py, whose decoder opens PNG only (RATs' clients send PNG), of at most 4096 x 4096 pixels, and answers anything else with SAM3's own HTTP 400. - msgpack_numpy builds an array of an object type over the request's bytes under any kind but O, which the guard let through, and GraspGen reads its elements as pointers; GraspGen's server stops on a request of more than one ZMQ frame (the reply fails outside its handler). graspgen_guard.py now refuses every array whose type holds Python objects, or is none numpy reads, before it is built, and reads a request of more than one frame whole and answers it as an error. - The actor checks that a row's services answer before it starts RATs and after the row: a row whose services do not is a failed run (session_failed), not the method's result, so a service that stops during an evaluation no longer turns trials into the method's failures. - The quality checker's servers (P3). RATs' policy quality checker probes SAM3's and Contact-GraspNet's ports when its loop starts and rejects a policy naming a primitive of a server that does not answer, which uses up an attempt. RATs' evaluation runs Contact-GraspNet, but a test row of the GraspGen config did not reach 8115, so the trained library's sample_grasp_pose was rejected where RATs lets its self-check find it. Every row now reaches the ports the checker probes (rats/config/default.yaml `servers`) but Molmo's, which RATs' LIBERO setup does not run. - Texts (P3): the guards' growth with render: cpu (18 h a play row, 14 h a trial); smoke_val.yaml's task (1, not 0); PROGRAM_RUNS is an estimate; no key or token is in a service's environment, while a service reads what its user can read; RATs' own method switches pass the argument check (in play, RATs' ablations). Checked against the real code, offline: GraspGen's own serve_forever (no model) on a free port stops on a two-frame request without the guard and answers it as an error with it, and refuses object-typed and object-field arrays while floats decode; RATs' own SAM3 decoder sends an EPS image to Ghostscript, and the guarded one refuses it, JPEG and a 5000 x 5000 PNG. A guarded SAM3 started as serve.sh starts it, on an idle GPU and a free port, answered a PNG (200) and refused JPEG and EPS (400), and ran no Ghostscript. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fourth post-PR audit (of c85f3ca) found no P1 and no P2, and four P3s; each was checked against the code and LIBERO-PRO's task files. - The service check (P3). The actor checks that each of a row's services takes a connection, before the row and after it. After the row, a row with a service down was a failed run even when every trial had succeeded, which an outage cannot have caused: an exec row whose trials all succeeded on LIBERO's own check now keeps its result, with the outage in its output (services_down). The docs say what a failed run becomes (scored 0 within mean_score, counted in errors, its trials in the actor log's result.json: to be run again) and what the check cannot find (a service that listens but hangs, or fails its requests). The Evolver names a failed play row as one, not as an iteration that did not run. - The guards' tests (P3). Two tests run the guards on GraspGen's own server loop with its msgpack, msgpack_numpy, numpy and pyzmq, and on RATs' own SAM3 decoder with its Pillow and FastAPI, where the upstream checkouts and their venvs are (RATS_ROOT, GRASPGEN_ROOT); elsewhere they skip. Each fails against a guard with its check taken out. - Texts (P3): a test row reaches 8115 too; what the splits share: no row, while LIBERO-PRO's _task suites give 14 of their 20 Object and Spatial tasks a validation task's instruction in another task's scene, and play's bootstrap task is the original of two test tasks; RATs' budget switches (--attempts-per-iteration and the like) pass the argument check and change the protocol the guards assume; the guards limit what a request holds, not the work it asks for. The timeout test no longer depends on the host's load: its hanging row's timeout is 20 s, its crashing row's long (it exits at once). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fifth post-PR audit (of 28def22) found no P1 and no P2, and five P3s; each was checked against the code and RATs at 1fd2ef5. - A stopped runner (P3). The runner marks its result running after each iteration and clears the mark when RATs' run has ended and play's hand-back is written. A runner stopped in between (a signal, the OOM killer, a crash of the interpreter) left a row with no reason: an exec row now keeps the trials that finished and says the runner was stopped before RATs' run ended (with its exit code, in its output and the judge's feedback), and a play row is a failed run whose hand-back, which may be cut short, is not taken. - The quality checker's servers (P3). c85f3ca had every row reach the ports RATs' policy quality checker probes but checked only the row's config's, and launch.sh asked an evaluation for no 8115: with Contact-GraspNet down, the checker would reject the trained library's sample_grasp_pose with nothing said. The actor now checks the probed ports with the row's own (SAM3's, Contact-GraspNet's and PyRoki's: rats/config/default.yaml names PyRoki's 8116 too), launch.sh needs 8114, 8115 and 8116 for every run, and serve.sh's header says why. - Texts (P3): PyRoki's 8116 among the probed ports; the runner's docstring on RATs' budget switches; the method page's table row on the service check. The new tests fail at 28def22: a row with a probed port closed runs there, and a stopped runner's row has no error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README and the method page said that RATs' docs/setup.md calls Molmo unneeded for LIBERO-PRO; that sentence is about MolmoSpaces. RATs' scripts/start_servers.sh starts Molmo2-8B on 8122, and docs/setup.md lists 8122 among the release configs' ports, while its LIBERO-PRO install leaves out the molmo extra (vLLM) and no LIBERO config starts it. The rows still run without Molmo. The docs now call that a deviation from start_servers.sh, and say what it does: each object localization asks Molmo three times before SAM3's text prompt, and prints the failed requests where RATs' diagnoser reads them. In the first evaluation, GLM 5.3 Flash's diagnoses often blamed a perception outage on 8122. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first evaluation, reduced in size: 10 play iterations, then 30 test trials (Table 1's six suites, tasks 0-4, init state 0). The final library scores 0.133 against the no-library condition's 0.167, paired -3.3 points (SE 7.6). The example's README records the settings, the result and what the rows show: nine of the ten learned skills call a primitive of play's full API that the test's reduced API lacks (RATs' own pairing of its configs), and Molmo's absence shaped the library. The method page gets a Result section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iamziyuzhao
force-pushed
the
ziyu/rats
branch
from
November 30, 2026 06:12
a43afa7 to
0d35e01
Compare
iamziyuzhao
marked this pull request as ready for review
November 30, 2026 06:30
This branch has not been 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.
Change
RATs ("Playful Agentic Robot Learning", code, project) learns a skill library by play. With no benchmark task given, it proposes a manipulation task in a LIBERO scene, writes and checks the task's BDDL, and solves it with a Code-as-Policy program, in up to six attempts. A memory team then turns successes into skills (Python functions over the robot API, each with a reliability tier) and failures into a failure memory with lessons, and every five iterations it curates both. At test time the library is frozen and RATs' execution team solves LIBERO-PRO with it (RATs Exec, the paper's Table 1).
Hermit could not run it. This PR adds RATs as a method: RATs' own code runs every row, unchanged, at the pinned commit
1fd2ef5, in its own Python 3.10 environment, inside a sandbox the actor starts. One training step is one play iteration. The adapter is RATs' library plus its play state. The final library is evaluated frozen with RATs Exec. The differences from the paper, also in the first paragraph of docs/methods/rats.md:What it adds
ratshermit/adapter/templates/rats/:skills.json(RATs' primitive library L0, the seed),state/(learnable: iteration digests, failure memory, retry bank, novelty counts, curator histories,loop.json, the last scene),.hermit/check.py,UPSTREAM.md+ RATs' licensehermit/agent/evolver/methods/rats/actor.py(RatsActor),runner.py(runs under RATs' Python, imports nothing of Hermit)ratshermit/agent/evolver/methods/rats/evolver.py,evolver.yamlexamples/libero/rats/:train.yaml,val.yaml,test.yaml,test_full.yaml,smoke.yaml,smoke_val.yaml,rows.py,judge.py,launch.sh,serve.sh,sam3_guard.py,graspgen_guard.py+graspgen-python,env_configs/rats_libero_pro_graspnet.yaml,task-info/, READMEdocs/methods/rats.md; rows indocs/methods/index.md,docs/index.md,examples/libero/README.md; CHANGELOGtests/methods/rats/test_rats.py(43); theratsgroup intests/selection.py,tests/core/test_selection.py,tests/README.mdNo core change. Nothing outside the method's three places changes except the indexes, the CHANGELOG,
examples/libero/.gitignoreand the test-group entries. RATs is a checkout beside Hermit, as ASPIRE's is, not apyproject.tomldependency group: it needs Python 3.10, its own submodules (LIBERO-PRO, robosuite, Contact-GraspNet, cuRobo, SAM3) and GPU vision services.launch.shpins its commit and warns when the checkout is on a different one.How Hermit calls RATs.
runner.pycalls RATs' own entry point (scripts/run_rats.py main()) and changes RATs at four seams only:The model. Every model call goes to a
ChatEndpointin the actor's process (oneDirectcall each, Layer 1). The endpoint holds the provider's key and meters tokens and cost. RATs'_get_api_confignames it; Bedrock, Vertex and the Gemini proxy are off; RATs' per-role model variables all name the run's model. RATs' parallel sub-agent workers, which RATs starts as processes of their own (scripts/run_subagent_worker.py), start throughrunner.py workerand route the same way.reasoning_effort(agent.params.effort, default medium, the first-evaluation row's). RATs' own default is low (llm_reasoning_effortinrats/config/default.yaml), and RATs sends it only in its OpenAI form.agent.params.video: false, the default), every vision call is built from images, as RATs builds it when it has no video: the visual verifier's sampled frames (up to 8), the per-step verifier's images, and the diagnoser's filmstrip (RATS_DIAGNOSER_VISUAL_INPUT=frames, RATs' own setting). RATs'_strip_videos_from_messagesdrops any video that is left. The feedback generator attaches media only on its MolmoSpaces path, so on LIBERO it sends none either way.The init states. An exec row's trial j runs in init state
first_state + j. RATs seeds iteration n with n, and its LIBERO env takes init state(seed - 1) % 50, so the loop starts after iterationfirst_state.What a continuous run keeps in memory. A play iteration is one process, so the runner restores this state before the iteration and saves it after:
state/loop.json: the curation and skill-proposal counters, the curator's rolling history, the bootstrap task's name and the distillation counter;state/scene/: the scene the last iteration left, i.e. the BDDL RATs generated and its custom verifier. RATs' next iteration falls back to that scene when its own cannot be created. The runner rebuilds it with RATs'EnvironmentCreator.Everything else RATs carries lives in its output directory, which RATs' own
--resumereads.The verdict at test. In exec, RATs' Verifier counts only its native vote:
task_completed, or reward >= 0.99, behind RATs' own check that the program ran. The structured-custom and visual verifiers' results stay in the evidence but are not counted, so a trial that only the VLM calls solved goes on to its next attempt. RATs'docs/evaluation.mdsetsRATS_VERIFIER_STRICT_BENCHMARK=1for this, but no code at1fd2ef5reads that variable: there, any of the three votes counts.Before RATs runs, its own parser (
run_rats.py build_parser) reads the arguments the runner gives it, and the runner then applies whatrun_rats.pyfills in from the env config's top-levelrats:block (_apply_rats_runtime_defaults). A row is refused if itsrats_argsor that block change what the row is:--mock, which reportstask_completedat random), a library merged with others or filtered by tier, or playtime or failure memory carried in from other runs;--catalog) and the test tasks' descriptions.Any spelling the parser accepts counts, including abbreviations and--flag=value. RATs' own method switches pass (
--no-skill-reuse,--no-failure-memory,--random-order), as do its budget switches (--max-retries,--attempts-per-iteration,--turns-per-attempt,--multiturn-reset,--ensemble, and the env config'sattempts_per_iteration,turns_per_attemptandmulti_turn_decision): in play, a run that sets one is that RATs ablation, and an exec row holds its frozen flags. A run that changes a budget evaluates another protocol than RATs' default, which the rows' guards also assume.Trust. RATs' generated programs run in RATs' process, inside the actor's sandbox. The vision services run outside it, as the user who starts
serve.sh:api_servers(play 8114, 8115 and 8116; test 8114, 8116 and the grasp service), and the ones RATs' policy quality checker probes, 8114, 8115 and 8116 (below). No row reaches Molmo's 8122.serve.shstarts every service with a clean environment (env -iplus a short list): no key or token is in a service's environment. A service still reads what its user can read, which the guards below keep requests from reaching. The clean environment and the guards hold for the servicesserve.shstarted: it leaves a port that already answers alone (and says so), andlaunch.shchecks only that each port answers.serve.shstarts SAM3 throughsam3_guard.py, which decodes PNG only (RATs' clients send PNG), of at most 4096 × 4096 pixels.np.load, whose default refuses pickled objects; PyRoki takes numbers.serve.shstarts GraspGen throughgraspgen-python, whosegraspgen_guard.pyrefuses every array whose type holds Python objects (RATs' client sends arrays of floats) and answers a request in more than one frame as an error.services_downin its output); any other row is a failed run (session_failed), as a trial may have failed for want of the service. Hermit scores a failed run 0 withinmean_scoreand counts it inerrors; its trials are in the actor log'sresult.json, and such a row is to be run again. The check finds a service that has stopped, not one that listens but hangs or fails its requests.The step
flowchart TD A["adapter: skills.json (L) + state/ (M, retry bank,<br/>proposer counts, curator history, loop.json, scene, iteration digests)"] P["play row: the actor lays the adapter out as RATs' output directory<br/>and runs run_rats.py --explore --resume for one iteration"] I["RATs, in the sandbox: PROPOSE_TASK, create + verify the env,<br/>RUN_TASK (up to 6 attempts), UPDATE_MEMORY<br/>(skills, tiers, failures, lessons; every 5: curators, skill proposer)"] H["handed back: skills.json + state/ (digests of the iterations)"] C{"template check<br/>(the library's records and code, the state's files)"} U["the Evolver replaces skills.json and state/"] K["the adapter as it was; the step says why"] F["final adapter: the library after the last iteration"] E["test: RATs Exec per task, the library frozen<br/>(--fixed-task --no-skill-reuse --no-failure-memory)"] A --> P --> I --> H --> C C -- passes --> U --> A C -- fails, or nothing came back --> K --> A A -. after the last step .-> F --> EThe Evolver reads the step's one play record and the adapter it handed back, and calls only
check_spec. It writesskills.jsonandstate/, or leaves the adapter unchanged and says why. Four cases leave it unchanged: a failed play row, a library handed back without itsstate/(missing, a link, or empty while the adapter's is not), a hand-back that fails the check, and a state with links or devices. A step with more than one play row fails (data.step_size: 1,agent.concurrency: 1). RATs has no validation step and selects no snapshot, so the final adapter is the library after the last iteration.train.yamltags a snapshot every ten steps for the validation split to compare.Data splits (
examples/libero/rats/rows.py, task directories in Harbor's format; no row is in two splits)play-001...play-050libero_spatialtask 0 as RATs' play config doestrain.yamlval-<suite>-tNN, 39libero_spatialtask 0); init states 43-49val.yamltest-<suite>-tNN, 60libero_{object,goal,spatial}_{swap,task}); 10 tasks each; init states 0-9test.yamlfull-<suite>-tNN, 80test_full.yamlsmoke.yaml,smoke_val.yamlRATS_ROWS_ARGSchanges the sizes (--play,--tasks,--val-states,--test-states,--full-states).launch.shwrites each set of rows once underruns/rows/<key>/, where the key covers the arguments androws.pyitself; runs started side by side share it. A play row whose iteration hands back nothing (RATs crashed, or its state failed the check) leaves the state unchanged, and the next row runs that iteration again, so such a run ends with fewer than 50 iterations; the Evolver's step records say which.What play and test share:
libero_ood/, whoseood_task.yamlrepeats the test_taskinstructions). The sandbox hides all of them in play.--proposer-include-eval-task-context, in any spelling. That flag is RATs' optional task-aware play, which writes the 60 test tasks' descriptions into the proposer's prompt. LIBERO-PRO's Python task map names every suite's tasks, so play's process could import those names; RATs' proposer reads them only with that flag._swaptask keeps its original's instruction and scene and swaps the objects' positions; a_tasktask keeps its original's scene and gets another instruction and goal.libero_spatialtask 0, is the original oflibero_spatial_swap's andlibero_spatial_task's task 0, so those two test tasks are built on the scene play starts in (as with RATs' own play config and Table 1).What play and validation share: validation is the original LIBERO, the setting the paper's play is grounded in.
--catalog: in that mode play rebinds to the bootstrap suite's own tasks (LifelongLoop._rebind_libero_env),libero_spatial's, which are validation rows.libero_spatialtask 0, in the init state of the iteration's seed. It falls back to that task when an iteration's scene cannot be created before any scene was; after that it falls back to the last iteration's scene (seam 3). So validation leaves that task out.What validation and test share: 29 of the 39 validation tasks (Spatial's nine, Object's and Goal's ten) appear in the test's
_swapsuites with the same instruction and goal, their objects' positions exchanged. The_tasksuites give 14 of their 20 Object and Spatial tasks a validation task's instruction in another task's scene: all ten Object ones, with its goal too (libero_object_tasktask 0, "pick the cream cheese and place it in the basket", islibero_objecttask 1's), and four Spatial ones (Goal's none). So a validation score is not a held-out estimate of the test either.Protocol: train / test. The Evolver learns from the play iterations, and the final library is evaluated frozen on
test. An exec row is one RATs LIBERO-PRO batch-driver job (scripts/run_rats_libero_pro_batch.py): one task, all its trials in one RATs process, with--fixed-task --no-skill-reuse --no-failure-memory, and with RATs' Verifier counting only LIBERO's native check (seam 4). A trial counts when RATs' verdict and its last verification's native check both say success. The row's record keeps both, with each trial'stask_completedand reward.LifelongLoop.__init__), and each batch-driver job has its own output directory. Within a job, RATs records the skills' use on its copy as the trials run (usage counts and tiers; a skill can be deprecated), so a later trial of a task reads the library as the earlier ones left it. A row here is one such job: RATs copies the trained library, which the sandbox shows read-only, into the row's output directory. The trained library itself is never written.--no-skill-reusestops storing extracted skills and the skill proposer, and keeps the planner's retrieval from the frozen library. The flag's help text says otherwise; the batch driver's comment agrees with the code.--adapter noneis RATs' no-library condition (skill_library/libero_nonpriv_skills.json, the paper's "No Play").The authors' implementation against this one
1fd2ef5)state/loop.json,state/scene/); the scene rebuilt from its BDDL with RATs'EnvironmentCreatorskills.json(executable skill records with counters and tiers), the failure memory, the retry bank, etc., in the output directoryskills.jsonandstate/in the adapter; RATs writes them, the Evolver applies themadd_skill's validation and semantic dedup, RATs' program checkerllm_reasoning_effort,rats/config/default.yaml), sent only in RATs' OpenAI form; some calls set their owneffort); a request of RATs' own that sets one keeps itvideo: truekeeps the videos)docs/evaluation.md:RATS_VERIFIER_STRICT_BENCHMARK=1, only the nativetask_completed. At1fd2ef5no code reads it, and the native, structured-custom and VLM votes all countrats/config/default.yaml), under which the self-check, the execution and the sub-agent workers run; no wall-clock cap on a jobrender: cpu, below); a guard of 6 h per play row and 2 h per exec trial (timeout_s,trial_timeout_s). A scaled timeout grows each guard by what it can add to the 24 program runs of six attempts (a self-check, two self-repairs' self-checks and the execution each): 18 h and 14 h withrender: cpurender: cpurenders with Mesa's llvmpipe through EGL, and RATs' execution timeout is scaled by 11 (execution_timeout_scale), the ratio of a step's time measured with two llvmpipe threadscapx-baseline/); not porteddocs/evaluation.mdtest.yaml); 5 with--test-states 0-4; all 50 intest_full.yamldocs/evaluation.mdsays they auto-launch from the env config;run_rats.pyat1fd2ef5starts none (scripts/start_servers.shdoes)serve.shfrom RATs' own server modules, in a clean environment, shared by the rows; SAM3's images limited to PNG, GraspGen's object arrays and multi-frame requests refused; a row whose services do not answer before or after it is a failed runlaunch.shbefore the run), so the checker finds what RATs' evaluation host gives it: the trained library'ssample_grasp_posepasses the checker at test and fails in RATs' self-check, as therescripts/start_servers.shstarts it, anddocs/setup.mdlists 8122 among the release configs' ports, but its LIBERO-PRO install leaves out themolmoextra (vLLM), no LIBERO config starts it, and the LIBERO-PRO config calls it optionalstart_servers.shNVlabs/GraspGen, which RATs does not install)RATS_GRASP=graspnet)Application-side changes (
examples/libero/rats/, task-side code):rows.pywrites the rows.judge.pyturns an exec row's trials into its score, and a play row's own task outcome into its score.launch.shchecks the pinned commit, the services and the key, writes the rows, and runshermit trainorhermit eval.serve.shstarts and stops RATs' four vision services from RATs' own server modules, each with a clean environment. It starts GraspGen throughgraspgen-pythonandgraspgen_guard.py(Trust, above).env_configs/rats_libero_pro_graspnet.yamlis RATs' LIBERO-PRO config on Contact-GraspNet, for a machine without GraspGen.task-info/tells the learner what play and evaluation are.Left out: the plug-in evaluation (CaP-Agent0), MolmoSpaces, the real robot, the Molmo service, and per-role models.
First evaluation (reproduction guide §4): done, its record in
examples/libero/rats/README.md.noneand play ran atddad5a1, and the final library's test ata43afa7(50f84c2and45dcc6esince the rebase ontomain, Validation): GLM 5.3 Flash in every RATs role at effort medium, reduced in size (RATS_ROWS_ARGS="--play 10 --tasks 0-4 --test-states 0-0"): 10 play iterations, then 30 test trials (the six Table 1 suites, tasks 0-4, init state 0) for the final library against--adapter none, with paired differences and standard errors. Rendering is on the CPU (RATS_RENDER=cpu; see Validation). The full protocol is 50 play iterations and 600 test trials. With this model on the CPU, a play iteration took 3 minutes (every attempt rejected) to 3.4 hours. Two earlier starts were stopped and discarded:c7313df: the post-PR audit found that its scores would count VLM-only successes (P1-1 below), and that its play differed from RATs' (P2-1 to P2-3);ab4c26d, after half an hour: on the CPU, RATs' 180 s execution timeout cut programs that a GPU runs to the end (Validation, "Rendering").ddad5a1scales that timeout.The head since then,
da34f64(the second audit's fixes), changes nothing these rows do except the guards' values.none's and play's rows keptddad5a1's, which withrender: cpuare 12 h per play row and 4 h per test trial (at the head 18 h and 14 h). No row came near one: the longest play row took 3.4 h, the longest test row 3.1 h.0d35e01records the first evaluation (the example's README and the method page) and changes no code.a43afa7corrects the docs on Molmo (the Molmo row above) and changes no code.21474a4(the fifth audit's fixes) makes a test row need Contact-GraspNet's 8115 as well (it is up:serve.shstarted the four services) and records a row whose runner was stopped.28def22(the fourth audit's) changes only how a row is recorded when a service stops during it.c85f3ca(the third audit's) changes what a test row reaches: Contact-GraspNet's 8115 too, which RATs' quality checker probes. Before it, the checker blockedsample_grasp_posein a test row, which only the trained library names. In all 30nonerows, no policy was rejected for it. The final library's test rows ran ata43afa7. The servic 8000 es ran as started atab4c26d, before the SAM3 guard and the GraspGen guard's extension; neither changes what RATs' own requests get (Validation).Result (2026-11-30; the record, with the settings and spending:
examples/libero/rats/README.md):none: the reduced API's primitives, no learned skill (the paper's No Play)final: the library after 10 play iterationsPaired per trial, final − none: −3.3 points, SE 7.6; final better on 2 trials, none on 3, 25 tied (exact sign test p = 1.0). Training: 1 of 10 play iterations succeeded (iteration 9); $1.23, 15.1 h. At 30 trials a difference under about 15 points is not told from noise, and these are not the paper's numbers (another model, 10 of 50 play iterations, 30 of 600 trials).
localize_with_health_gate, a primitive of play's full API that the test's reduced API lacks (get_object_pose,sample_grasp_pose,get_object_3d_points_and_masks_from_language): RATs' own pairing of its play and LIBERO-PRO configs (the method page, Evaluation). RATs' planner chose learned skills in 25 of the 30 final rows; in 16, a program raised aNameErroronget_object_pose, andgrasp_lift_and_verifyandlocalize_with_health_gatecatch the error and return a failure. The one success that calls a learned skill grasped through its own fallback (plan_grasp).verify_object_on_surface. In thenonerows it rejected 14, and no row lost every attempt.none's), and two of the skills guard against that outage:localize_with_health_gate, andperception_guarded, which probes Molmo's port and returnsNonewhen it is closed, so that without Molmo every call it wraps fails. Both conditions ran without Molmo.Validation
All on Linux (RHEL 9, bubblewrap 0.6), Python 3.12, at
21474a4unless stated. The branch is rebased ontomain's84afde7(#118: AHE-Beta's example, the methods and docs indexes, the changelog; the one conflict, inCHANGELOG.md, keeps both entries), which renamed its commits with their contents unchanged:7e2d9f0→3894c8a,476a45a→797ac85,c7313df→3a996c5,ab4c26d→f25700f,3f11476→965cc81,ddad5a1→50f84c2,da34f64→51c76ba,c85f3ca→d886644,28def22→49d3691,21474a4→7de0987,a43afa7→45dcc6e. This description names them as they ran.python -m pytest tests/methods/rats/test_rats.py: 47 passed with the upstream checkouts (RATS_ROOT), 45 passed and 2 skipped without them, as in CI (again at0d35e01, after the rebase); withtests/core/test_layers.pyandtests/core/test_selection.py, 59 passed. On this shared host that takes 1.5 to 4 minutes, with its load.28def22: a row whose probed port is closed runs there, and a stopped runner's row has no error. The three Trainer/sandbox tests run under bubblewrap and skip with a reason without it; the CPU-rendering one also needs Mesa's software EGL device.python -m pytest --changedat0d35e01, after the rebase: 2056 passed, 178 skipped, 7 failed (atab4c26d: 1850, 177 and the same 7). The 7 fail identically onmain84afde7(and899597b) in the same environment, so they are not this PR's:rrsimissing:test_harbor_environment.py::test_rrsi_sees_...;mwmmissing:clbench_database/.../test_parity_golden.py, 3 tests;test_harness2_on_pi.py, 2 tests;test_sandbox.py::test_a_linked_venv_runs_....bash docs/build.sh(warnings as errors): passed, again at0d35e01.test) on3f11476,da34f64,c85f3ca,28def22,21474a4,a43afa7and0d35e01(after the rebase): passed.hermit check --no-probeon all six configs: passed. The one warning is the expectedenvironment.runner is host(the actor confines RATs itself).1fd2ef5, offline, its VLM stubbed to answer "success"; CPU rendering):task_completed: falsesuccessful on the VLM's vote alone (votes: native false, visual true), which reproduces the audit's P1-1. With the seam, it marks the trial failed, with the state hint "task NOT completed". Withtask_completed: trueit marks it successful.used_video: false). The feedback generator's and per-step verifier's video encoders return none, and the diagnoser takes frames.--proposer-include-eval,--output-d=/x,--libero-sui=...,--iterations=99(exec), and--catalog/--cat(play) are refused;--max-retries=3passes. With a timeout scale of 11, the runner passes--timeout 1980in play and exec, the parser reads 1980, and arats_args--timeout=600is refused. With RATs'_apply_rats_runtime_defaultsapplied after the parser (da34f64):--mockand--skill-library-min=verified(exec),--skill-library-merge=/x,--playtime-memory-seed=/xand--failure-memory-path=/x(play), and an env config whoserats:block setsskill_library_min_tier, are refused. RATs' pinned configs and the example's Contact-GraspNet config pass.EnvironmentCreatorfrom the smoke's generated BDDL. Its BDDL is found through RATs' wrappers, saved, and rebuilt in a second creator, with its custom verifier.runner.py worker <RATs>/scripts/run_subagent_worker.py --helpruns RATs' worker script; a path that is not RATs' worker script is refused.c85f3ca):serve_forever(no model loaded) on a free loopback port, in GraspGen's venv. Without the guard, a two-frame request stops it (ZMQError: Operation cannot be accomplished in current state). With the guard, that request is answeredUnknown action: refused: a request in more than one ZMQ frameand the server answers a health request after it. Object-typed, object-field and kind-O arrays and an unreadable type are answered as refused; a float point cloud decodes as float32 and reaches the handler.decode_image, in RATs' venv, with subprocesses recorded instead of run. It sends an EPS image to Pillow's Ghostscript (gs), and decodes a JPEG and a 5000 × 5000 PNG. The guarded decoder decodes the 512 × 512 PNG, refuses the JPEG, the EPS image and the 5000 × 5000 PNG (HTTP 400), and starts no subprocess.serve.sh's own command, on an idle GPU and a free port: a PNG answered 200 withresults, JPEG and EPS 400, no Ghostscript run.test_graspgen_guard_on_graspgen_s_own_server_and_libraries,test_sam3_guard_on_rats_own_decoder_and_pillow), which run where the upstream checkouts and their venvs are and skip elsewhere. Each fails against a guard with its check taken out (checked on three such copies: no format limit, no frame check, no object-type check).serve.shstarted them atab4c26d(the running ones): the four services' environments hold only the listed variables (no key or token). The live GraspGen server runs throughgraspgen_guard.py. Against it, a health request answersok, and an object-array request answersan object array is refused. A float point cloud passes the guard and reaches GraspGen's inference, which answersselected index k out of rangeto the probe's eight points.ab4c26d(actor-logs/<row>/sandbox/rats-1.json): every rowenforced: true,network: isolated,probe.passed: true. The play row forwards 8114, 8115, 8116 and the endpoint; a test row 5556, 8114, 8116 and the endpoint.1fd2ef5, LIBERO, GLM 5.3 Flash;RATS_SMOKE=1 ./launch.sh train), at476a45abefore the audit's fixes:actor-logs/play-001-*/sandbox/rats-1.json):probe.passed: true,enforced: true,network: isolated.Invalid image or video input): the video seam above. With no effort set, its thinking can use up RATs' 1,600-token cap on the per-step verifier (per_step_verifier.max_tokens) and leave an empty reply: effort medium.get_real_depth_map). On this host's H200s, other processes' CUDA work silently invalidates a live EGL context's reads (rows on the GPU with RATs' services failed, and so did rows on another GPU once others' jobs ran there).render: cpu(c7313df) renders with Mesa's llvmpipe through EGL, with no GPU. In the real sandbox the runner finds Mesa's software device at index 0 and depth reads in [0, 1].EnvironmentCreatorfrom the smoke's BDDL (agentview 512×512 and eye-in-hand 800×800, with depth), takes 0.179 s per step with Mesa against 0.016 s with NVIDIA's EGL on an idle H200. With two llvmpipe threads that is about 11×; with 4 threads 0.126 s, and with 8 threads 0.101 s.ab4c26d(CPU, RATs' 180 s), 6 of the first 17 executions ran into the timeout. RATs' self-checks run under the same timeout; each that did was followed by a self-repair, whose feedback asks for bounded loops and no blocking waits (RATs' own text for a timed-out self-check).ddad5a1scales the timeout by 11 withrender: cpu, which RATs also hands its sub-agent workers, and grows the rows' guards (da34f64: by what the scale can add to a row's program runs).TimeoutError.Not verified yet: a play row on the head's code (the first evaluation's play ran at
ddad5a1, its final test rows ata43afa7, the head's code), and the full protocol.Post-PR audit of
476a45a(an independent max-effort review): two P1, four P2 and seven P3. All are fixed inab4c26d. Each fix has a test, and the P1 fixes were also checked against the real RATs or the live service (above).RATS_VERIFIER_STRICT_BENCHMARKis read by no code at1fd2ef5api_servers;serve.shstarts the services with a clean environment, and GraspGen with the object-array request refused; README starts the services before the key is exportedrunner.py workerlibero_spatialtask 0, a validation taskstate/scene/, the bootstrap name inloop.json; validation leaves out play's bootstrap task.envand.openrouterkey, which RATs loads, were not hiddenlibero_ood/ood_task.yaml(test instructions) visible in play; a run can end short of 50 play iterations; the rows cache ignoredrows.py; the stand-ins hid P1-1 and P2-1 to P2-3; the docs' "auto-launched" services and the frozen-library copylibero_ood/hidden in play; the docs say a run can end short; the cache key coversrows.py; the stand-in models RATs' Verifier, workers, scene and parserAfter the audit, two more fixes:
3f11476refuses--catalogin play. Found in self-review while checking the splits paragraph against RATs' code.ddad5a1scales RATs' execution timeout with CPU rendering, and raises the exec trial's guard from 1 h to 2 h: six attempts of about ten minutes reached 1 h. Found in the first evaluation's first half hour.Post-PR audit of
3f11476andddad5a1(the second, by the same procedure): no P1, one P2 and seven P3, each checked against RATs at1fd2ef5. All are fixed inda34f64. The audit found every fix of the first audit holding, except the library-at-test text (its P2).LifelongLoop.__init__); each batch-driver job has its ownrats:block, whichrun_rats.pyapplies after its parser, and held neither--mocknor the library merge, the tier filter or memory from other runs_apply_rats_runtime_defaultsbefore it compares, and holds those settings in both modesstate/, or with a linked one, wiped the adapter's play statestate/while the adapter's is notrender: cputhe guards doubled, short of what an 11× execution timeout can addval.yamlandrows.pysaid validation lies outside the test suites; 29 of its 39 tasks are in the test's_swapsuitesserve.shpassed over a port that already answered without saying whose service it was; the feedback generator was said to send frames on LIBERO (it sends media on MolmoSpaces only)serve.shsays it did not start it, and the README's Trust section says the clean environment and the guard hold for the servicesserve.shstarted; the video texts fixedThe audit also asked why the endpoint retries (
max_retries, default 4). It covers a provider's 429, which RATs' client does not retry for a model without a fallback chain (only Gemini 3.1 Pro has one). The method page now says so.Post-PR audit of
da34f64(the third): no P1, one P2 and two P3, each checked against RATs, GraspGen and their libraries. All are fixed inc85f3ca. The audit found every fix of the second audit holding.sam3_guard.py(PNG only, at most 4096 × 4096);graspgen_guard.pyrefuses every array whose type holds objects and answers a multi-frame request as an error; the actor checks a row's services before and after it (a failed run if they do not answer)sample_grasp_posewas rejected at Tier 1 (an attempt used up) where RATs' evaluation lets the self-check find itsmoke_val.yaml's task (1, not 0),PROGRAM_RUNSis an estimate, "no token" holds for the services' environment onlyThe audit also asked whether play should refuse RATs' own method switches (
--no-skill-reuseand the like). They pass, as RATs' ablations, and the docs now say so.Post-PR audit of
c85f3ca(the fourth): no P1 and no P2, and four P3, each checked against the code and LIBERO-PRO's task files. All are fixed in28def22. Of the third audit's fixes, the guards and the quality checker's ports hold; the per-row service check was incomplete (P3 below).services_downin its output); the docs say what the check finds and what a failed run becomes (0 withinmean_score, inerrors, to be run again); the Evolver's message names a failed runrows.pysaid the splits share nothing, and the method page that a_tasktask changes the instruction and goal, while 14 of the 20 Object and Spatial_tasktasks carry a validation task's instructionThe audit also asked about RATs' budget switches (
--attempts-per-iterationand the like): they pass, change the protocol and the guards' assumption, and the docs now say so. A row that times out or crashes after a trial is scored over its requested trials, with status ok and the reason in its output and the judge's feedback (judge.py).Post-PR audit of
28def22(the fifth): no P1 and no P2, and five P3, each checked against the code and RATs at1fd2ef5. All are fixed in21474a4. Every fix of the fourth audit holds.launch.shasked an evaluation for no 8115, so with Contact-GraspNet down the trained library'ssample_grasp_posewould be rejected silentlylaunch.shneeds 8114, 8115 and 8116 for every run;serve.sh's header says why--max-retriesas a method switchThe audit also noted, in code this PR does not change, that the endpoint relay passes a request's
extra_headerson to the provider's call, which carries the key; it found no way for the key to reach the sandbox.The audits' open question on who decides success stays as documented. RATs' own process reports it, and a program could overwrite the runner's result file. ASPIRE's judge re-runs the program on the host; RATs Exec's trials keep state across attempts within one process, which a re-run would not reproduce.
Review
docs/methods/rats.md(setup, the four seams, the argument check, the sandbox and the services, the step, the splits, evaluation, parameters, the authors-vs-port table, what it is not) andexamples/libero/rats/README.md(setup of RATs, SAM3, the robot-description cache, GraspGen; trust; how to run).test_the_example_configs_name_their_splits_and_the_training_run_they_evaluatechecks the splits and thatBenchmark.overlaps()is empty). README, method page andlaunch.shname the same variables and commands.ChatC 8000 lientfor the run's model,Directfor each request.hermit.agent.base.endpoint.ChatEndpoint, which relays the provider's response and passes client disconnects on as aborts.RatsActoris anAgent(Layer 3) in the method's folder, as ASPIRE's actor is.supports = (): RATs' loop reads the library file itself. The Evolver needs nothing (needs: []) and calls no model.agent.params.env), and the provider key files RATs loads (.env,.openrouterkey) are hidden. The e2e test asserts that neither the key nor its variable, nor a key file's content, is in the sandboxed process's environment. The services start with a clean environment. The diff was scanned for keys and local paths.General
the row timed out after N s.session_failed), not a wrong answer, with its cost and log kept.rats_argswould change it is refused before RATs runs. A scene that cannot be rebuilt leaves the iteration in the bootstrap scene, and the result records why.smoke.yamlwithConfig.loadand runs theTrainerandevaluate("final"), with RATs' process in the real bubblewrap sandbox. The stand-ins are at the edge only: a stand-in of RATs' modules and a local OpenAI-compatible provider. During development the e2e test caught a real bug: the exec library was not readable in the sandbox. The smoke runs the real RATs. After the audit, the seams were also run against the real RATs' code (Validation), and the guards' tests run on the real services' libraries where the upstream venvs are.476a45afound 2 P1, 4 P2 and 7 P3, all fixed inab4c26d. The audit of3f11476andddad5a1found no P1, 1 P2 and 7 P3, all fixed inda34f64. The audit ofda34f64found no P1, 1 P2 and 2 P3, all fixed inc85f3ca. The audit ofc85f3cafound no P1 and no P2 (4 P3, all fixed in28def22). The audit of28def22found no P1 and no P2 (5 P3, all fixed in21474a4; Validation). The last two audits found no P1 or P2, which ends the review loop; the fixes of the fifth audit's P3s were reviewed by the author, with tests that fail without them.a43afa7and0d35e01(docs only) and the rebase were reviewed by the author.Method reproduction
Adapter template. A new
ratstemplate.aspire(markdown topic files read as context by a Codex session),prompt-only(one file) and the others carry prose. RATs' library is a JSON list of executable skill records with reliability counters and tiers, read by RATs' own planner, so none fits.skills.jsonandstate/; the Evolver replaces both whole after the check.ADAPTER.md,README.md,exports.yaml,.hermit/.skills.jsonandstate/, laid out as RATs' output directory; in exec,skills.jsonread-only, which RATs copies into the row's output directory.state/isinternaland never deployed.Evolver. New
rats; the flow chart is above.Upstream fidelity and adaptations. The table above. RATs' code is unchanged and its prompts are its own; the four seams are the only patches.
Learning information and evaluation boundaries. No hand-written text reaches RATs' roles.
task-info/is read by the Trainer's learner context, not by RATs. The splits section says what each split shares. Two caveats:env.andlow_level_env., and the sandbox confines the process. A program could still reach the simulator's state through Python introspection inside that process, or overwrite the runner's result file. A reported success rests on LIBERO's own check (seam 4), read in that process. Documented in the method page's Evaluation section.Sandbox control. The configs set
sandbox: {enabled: true, enforce: required}. The actor's sandbox ishermit.sandbox.Sandbox(enforce="required", network="no-network"):render: cpu);outputs/, logs, the provider key files, the authors' learned libraries, and in play every LIBERO-PRO suite's BDDL files and init states and LIBERO-PRO's perturbation specs.Record: the smoke's
sandbox/rats-1.json(above). There is noweb_search(no CLI agent). The judge runs on the host and reads only RATs' success records. Keys never enter the learning material or the adapter.Experiments. The first evaluation (Change: First evaluation and Result), recorded with its settings, spending and standard errors in
examples/libero/rats/README.md.Agent three-layer abstraction. Layer 1 is
ChatClient+Direct, used throughChatEndpoint(Layer 2's shared endpoint); Layer 3 isRatsActorandRatsEvolver.ChatClient'sUsageand price, summed intoRunOutput.cost_usdandtokens, then the Trainer's budget.render: cpu); each call is bounded by RATs' own 200 s request timeout, and the provider's call behind it bycall_timeout_s(default 200 s). A call cut off by either timeout records no usage, though the provider may bill it.Tests (
tests/methods/rats/test_rats.py)tests/methods/rats/; theratsgroup covershermit/agent/evolver/methods/rats/*,hermit/adapter/templates/rats/*andexamples/*/rats/*, and the robotics engine paths select it too (tests/core/test_selection.py). Listed intests/README.md.test_a_row_that_times_out_or_crashes_keeps_what_finished_and_says_why).1fd2ef5's code paths:base_agent,LifelongLoop.runandresume_from,run_rats.py'sbuild_parser, the Verifier's votes and video choice, the worker processes, a generated scene behind RATs' wrappers, and iteration file names.test_layers.pyheld therows.pymove. New since the audit:Config.load, theTrainer,evaluate, the realChatEndpointwith the realChatClient, and the runner as a subprocess. Stand-ins only for RATs' modules and the provider, and for the services' libraries in the guards' unit tests; the guards also run on the real libraries where the upstream venvs are.tmp_pathonly, no network, no sign-in. The GPU binding is monkeypatched (hermit.sandbox.gpu_args). The tests skip without bubblewrap.timeout_s20 s against a stand-in that sleeps, long enough for its first trial on a loaded host).Sandbox
hermit.sandbox.Sandbox(bubblewrap), with the record above, and so do RATs' sub-agent workers, its child processes. The actor itself runs on the host (environment.runner: host), as ASPIRE's GPU actor does: it binds the GPU RATs renders on (none withrender: cpu) and reaches the loopback services. It runs no adapter code itself; only RATs' process, sandboxed, runs the library's programs. The vision services run on the host outside a sandbox: they are RATs' own server modules and GraspGen, trusted code, started with a clean environment. Sandboxed code reaches them only through their request protocols, and GraspGen's one request that would run code is refused (Trust, above).Benchmark
hermit.task.directory.write_task, read back by the cap-harness view (examples/cap_harness/utils/agent/fields.py:task_row).test_the_rows_are_written_as_task_directories_the_view_reads_backchecks it.k/n trials in init states a-b).network_mode = "no-network"; the actor's sandbox gives an isolated network with the row's services forwarded. No memory limit is declared. Effective timeouts: the actor's guards (6 h per play row,trial_timeout_s(2 h) × trials per exec row; withrender: cpu18 h and 14 h × trials), RATs' policy execution timeout (180 s, ×11 withrender: cpu), and RATs' own 200 s per model call.trainer.call_timeout_minbounds the Evolver's calls and task tools, not the rollouts, and withrunner: hostthe framework sets no rollout deadline.476a45a(Validation), and the first evaluation ran 10 play iterations and 60 test trials of the real RATs on LIBERO and LIBERO-PRO (Change: Result).