Skip to content

Event Log and Verifier#

This page gives the event log of the benchmark tasks and the verifier that grades it again (work package WP12 of Farm Benchmark Suite: Design, decision D11 and section 9.4). The code is Fast/acres_batch/eventlog.py (the log) and Benchmark/acres_bench/verify.py (the verifier of every task). The tests are in Tests/Fast/test_eventlog.py. Each number on this page comes from a JSON file in Results/Benchmarks/. The table of each section names the file.

1. What the Log Is For#

A verifier outside the reach of the controller grades an episode. It reads only the log that the simulator process writes. It makes the scene again, runs the logged actions again in its own simulator and compares the two logs. A log that does not repeat fails. Thus a controller that changes the state through the library in the privileged setting fails.

One mechanism serves all tasks:

  • T1 runs on the Core library (CPU). Its log is on the host, as torch tensors on the CPU.
  • P4 and T4 run on the batched simulator (GPU). Their log is on the GPU during the episode.

2. Status#

Part File Status
Format, schema, state digest, record digest, file Fast/acres_batch/eventlog.py Built
Log of T1 (Core) and its re-simulation Benchmark/acres_bench/t1/env.py, t1/verify.py Built, tests pass
Log of P4 and T4 (GPU), the events of the rounds, the re-simulation of a batch Benchmark/acres_bench/p4/run.py, t4/run.py Built, run on the test banks
Verifier of every task (one command) Benchmark/acres_bench/verify.py Built
Verifier image of the harness (section 9.5 of the design) – Not built

3. The Format#

The log of a batch of E scenes with A agent rows each is a set of fixed-size tensors on the device of the simulator. The decision count is that of the host. Thus a decision does no host sync.

Tensor Shape Type Content
Actions, one tensor for each stream [K, B, ...] the type of the stream The actions of each decision. P4: choice [B] int8, drive [B, 5] float32. T1: command [B, 3] float64.
Events [E, L + 1, 4] int32 Decision, kind, agent (-1: the scene), value. Row L is a spare row for the writes past the end.
Event count [E] int64 All events of each scene, also those that the log did not keep
State digests [C, E, 2] int64 The digest of the state of each scene after 0, every, 2 every, ... decisions
End [E] int64 The decision count at the end of the episode of each scene

K is the most decisions of the episode, L is 4,096 and every is 20 decisions (10 s) on the GPU and 10 steps (1 s) on Core. At the end of the episode the log does one host copy and makes one record for each scene.

The fields of a record:

Field Content
schema, schema_sha256 The name of the format, and the sha256 of the schema in the code (eventlog.SCHEMA)
task, setting The task (t1, p4, t4) and the setting (privileged, standard, realtime)
scene The identity of the scene. T1: the scene dict. P4 and T4: the map, the kind, the vehicles, the source (a bank and an index, or the arguments of scenarios_rounds.make) and the sha256 of the scene arrays.
seed, options The seed of the generator of the simulator (none for Core), and the options that change a run (the fast paths, the meeting rule)
agents, decision_s, batch The rows of a scene, the time of a decision, and the size, the index, the scenes and the decisions of the batch
versions The commit, a changed tree and the sha256 of the code. The versions of Python, NumPy, PyTorch (with its numeric options), CUDA and Triton. The GPU, its UUID and its driver. The process defaults of the settings of the vehicle side and of training (settings, from acres_batch/defaults.py: a run again with other defaults does not repeat, and the comparison names settings). T1 adds the sha256 of the Core module.
decisions, actions The decisions to the end of the episode, and the actions of each stream [decisions, agents, ...]
events, events_total The kept events [n, 4] of the episode, and the count of all events
checkpoint_every, checkpoints The state digests to the end of the episode [c, 2]
final The summary of the task at the end: the input of its grader. P4 and T4: the episode log of env_rounds (the times of the requests, the counters, the trace of the poses). T1: the end, the steps, the last state row and the metrics.
digest The sha256 of the fields above, without versions, batch and setting

The event kinds:

Kind Meaning Value
end The episode of the scene ended –
arrival An agent came to a goal The request, or -1 for the yard, the end of a leg and the goal of T1
contact, corridor, rollover, stuck, timeout The safety and physics events. corridor is also the exit from the map of T1. –
deadlock A cycle of waits held 0 counted, 1 failure
refusal The checker started to refuse the chunks of an agent, or refused them for a different rule The rule of the checker
wait, hold, free An agent waits for a resource, gets it, gives it back The resource (a single-track zone of P4)
take, depart, service, served, release The life of a request of P4 The request, or the route for depart
call, outcome A call of a skill began or ended (Skills: Framework and Contract) The skill, or the call state of the end
engage, store, drop An agent took an item, put it in a slot, put it on the ground The item, or the slot
dispatch, done, branch, ask A node of a procedure's task graph began, ended with success, failed and is ready again or replaced, or ended in stop_and_ask (Procedure Layer) The node
breakdown A vehicle of a procedure broke down –

A scene keeps no event after the decision at which its episode ended.

State digest. A 32-bit hash mixes each 32-bit word of the state tensors of a scene with its position. The sum of these values is an int64 number. All products stay below \(2^{63}\), so no value overflows and the order of the sum has no effect. Thus the GPU and the CPU give the same digest for the same bits (test_gpu_gives_the_digests_of_the_host_and_no_sync). The digest checks that a run repeats, but it is not a cryptographic hash.

P4 uses each tensor of the state of the environment with a first axis of rows or scenes, without the trace. T1 uses the state and wheel rows of Core and the state of the episode rules.

File. eventlog.write writes a list of records to a JSON file. The arrays are exact: the file keeps their bytes, compressed with zlib, in base64.

4. The Verifier#

python -m acres_bench.verify LOG.json        # one result line for each record
python -m acres_batch.eventlog LOG.json      # the intact check and the event counts of each record

The verifier does these checks for each record:

  1. It compares the digest of the record with its content (intact). A changed record fails.
  2. It makes the scene again from its identity and compares the sha256 of the scene.
  3. It runs the logged actions with the logged seed and options in its own simulator. Then it compares its own record with the logged record (eventlog.compare). The comparison gives the first field that differs and the first state digest that differs.
  4. It grades the final summary of its own run with the grader of the task (verify_rounds.grade, t4/run.grade, t1/verify).

T1 runs each log again on Core. The result of a log does not depend on the other logs of its batch. P4 and T4 run the whole batch of a log again, to the last decision of the batch. The noise of a row depends on its batch. Thus a file of P4 must hold the records of whole batches. For a test of the coding-agent harness, a batch is one scene.

A log repeats only on the same GPU and the same software. Triton can contract multiply-adds in a different way on a different GPU. The comparison names the version fields that differ (versions_differ).

5. Results#

All runs: an NVIDIA L40S (driver 615.71.09) shared with other work, PyTorch 2.11.0 with CUDA 12.8, Triton 3.6.0. The tests of the log are in Tests/Fast/test_eventlog.py.

The test of the design (test_same_seed_and_actions_give_the_same_digest) runs P4 with two vehicles on three scenes of the real farm. It uses the reference solution and the fast paths with the Triton kernels, for 600 decisions. The verifier makes the scenes again from their identities and runs the logged seed and actions. Its records are equal to the logged records, bit for bit: the actions, the events, each state digest and the final summary. A changed action of one vehicle gives another record for its scene, and the other two scenes of the batch keep their records. The GPU and the host give the same state digests (test_gpu_gives_the_digests_of_the_host_and_no_sync).

The checks of the tasks on the log (the do-nothing controller, the reference solution and the re-simulation of each log):

Task Scenes Do-Nothing Passes Reference Passes Logs That Repeat File
T1 (Core), test split, 8 candidates 7 valid 0 7 14 of 14 eventlog_t1_validity.json
T4 (GPU), test bank 64 0 55 192 of 192 (also the drive without the meeting rule) eventlog_t4_validity.json
P4 (GPU), test bank, 1 vehicle 64 0 64 128 of 128 eventlog_p4_validity_a1.json
P4 (GPU), test bank, 2 vehicles 64 0 54 128 of 128 eventlog_p4_validity_a2.json
P4 (GPU), test bank, 3 vehicles 64 0 46 128 of 128 eventlog_p4_validity_a3.json

The success counts, the ends and the solvable banks were those of the checks of that time (t4_validity.json, p4_validity_a*.json before the fixes of 11 and 12 Nov 2026). The checks of 13 Nov 2026 on the final tree of stage 1 give other counts (P4: 64, 64 and 61. T4: 63, P4, section 7). The earlier T4 check did not replay the drive without the meeting rule.

Size and cost (eventlog_cost.json, 200 decisions after 20, the scenes of the train bank, the operator rule over the reference drive):

Scenes Vehicles in a Scene env.step (ms) Log (ms a Decision) State Digest (ms a Decision, One Each 20) Log over Step Host Syncs of the Log Device Memory of the Log (MB)
256 1 8.12 0.80 0.12 11.4 % 0 18.0
1,024 1 8.21 0.83 0.12 11.6 % 0 72.1
256 2 16.93 0.83 0.12 5.7 % 0 19.2
1,024 2 16.75 0.84 0.15 5.9 % 0 76.8

The log and the digest together cost 0.92 to 0.99 ms a decision. The log is launch-bound: its time does not change from 256 to 1,024 scenes. A repeat on 11 Nov 2026 ran with the GPU busy with other work (98 % use, eventlog_cost_busy_gpu.json). It gave 1.67 to 2.21 ms for the log and 0.20 to 0.29 ms for the digest, with no host sync. This was 7.0 % to 13.1 % of a step that was also slower. The table above, on the quiet GPU, is the reference.

Its parts are the copy of the actions, the probe of the rounds before and after the step (16 event entries) and one write of the events. A decision of a row keeps 21 bytes of actions (P4: choice 1 byte, drive 20 bytes). Each scene has 65,552 bytes of event slots and 208 bytes of state digests for 220 decisions. The device memory above is for 220 decisions. On the host (T1), the log costs 53 µs a step for 16 scenes and 68 µs for 64 scenes, without Core. A step of the T1 environment of 16 scenes takes about 4,350 µs (3,675 steps/s, t1_speed.json).

The records of the checks (the log entries of the check files: the median over the scenes, and the most events of a scene):

Task Controller Decisions Events (Median, Most) File of One Record (kB)
P4, 1 vehicle Do-nothing 6,528 5, 5 8.0
P4, 1 vehicle Reference 4,050 81, 141 54.0
P4, 2 vehicles Reference 3,223 108, 213 78.3
P4, 3 vehicles Reference 3,352 170, 283 114.6
T4 Reference 170 17, 128 8.7

No log was full: the most events of a scene is 283 of 4,096.

6. Findings on Determinism#

  • The runs repeat bit for bit. On one GPU and one software version, the batched simulator with the Triton kernels gives the same bits for the same seed and actions. The rounding of the earlier digest of P4 (0.01 s, 1 mm) is not necessary.
  • The final summary depended on the batch. The trace of the poses of env_rounds has the length of the decisions of the whole batch. A replay of a batch runs to the end of its longest episode, so the trace of each scene had another length. The record now keeps the trace to the end of the episode of its own scene.
  • A scene can change after its end. A scene of 2 vehicles ended at decision 7,468, and its batch ran on to decision 7,480. In this time, a loaded vehicle of the ended scene left the yard: env_rounds._leave does not test the end of the scene. Its round state in the final summary was "out", not "loading". A replay to decision 7,468 gave "loading", so the log did not repeat. The replay now runs the decisions of the batch, and the log repeats. The grader of P4 does not read the round state, so no grade changed.
  • The noise of a row depends on its batch. The scan noise and the noise of the physics kernel came from one generator and from the row index. Thus a scene of P4 repeated only in the same batch, at the same place. T1 has no noise, and each scene repeats alone. Since 18 Nov 2026 the draws of the physics kernel have the scene's noise key, not the row index (batch.md, "The key of the noise"). The seed of each decision still comes from the generator of the environment. Thus a scene repeats in a batch with the same seed and the same draws before it.
  • The controller must not draw from the generator of the simulator. The reference drive scans its candidates with its own generator. A controller that draws from the generator of the environment changes the noise of the simulator, and its log does not repeat without it.
  • The cache of the delivery paths has the run-time library in its key. Another build of the run-time library makes the paths and the scenes again. The sha256 of the scene in the log shows whether the scene is the same.

7. Changes to the Two Tasks#

Task Before Now
T1 T1Env kept a list of commands and a sha256 of the state row of each step. t1/verify.py compared the sha256, the steps and the end. T1Env keeps the event log. t1/verify.py uses eventlog.stack_actions and eventlog.compare.
P4, T4 p4/run.py kept the actions in its own tensors and replayed them. verify_rounds.digest hashed the episode log (times to 0.01 s, poses to 1 mm). T4 did not replay the drive without the meeting rule. p4/run.py keeps the event log, replay and repeats run a batch again from its records. verify_rounds.digest is removed. The options of the log hold the meeting rule, so T4 replays all three controllers.

8. What a Packaged Task Still Needs#

  • The verifier image (section 9.5 of the design): the same simulator, the same GPU type and the same software as the image that made the log.
  • The gateway for the standard and realtime settings. The log does not depend on the setting, but only the privileged setting runs today.
  • A signature of the log file by the simulator process. The digest shows a change of the content, but anyone can compute it again.
  • The scene bank of the task with the identities, so that the verifier image can make each scene without the cache of the delivery paths.