GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bobflow/benchmark/tracker/README.md at main · Texera/bobflow

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
148 lines (119 loc) · 9.35 KB
/

README.md

Copy path

File metadata and controls

148 lines (119 loc) · 9.35 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Context-tracker overhead experiments

These scripts measure what keeping the snapshot tree costs as a session grows: the agent service's memory, with the context tracker and without it, and the time to jump to a snapshot. They also measure the smolagents baseline's memory over the same kind of session. The paper's "Human Interaction Support" experiments (memory growth, jump time, tracker memory) come from them. No model is called: every model response comes from a recorded benchmark run.

Workload

Recorded KramaBench runs: Claude Opus 5.5 and DeepSeek V4.1 Flash, one rep each.

  • Dataflow agent: the optimized setting's runs on stable 87a7cea92. This is the revision these scripts start from, so every recorded call replays as it ran. There are 207 conversations; DeepSeek's wildfire-hard-19 has no trace.
  • smolagents: the paper table's runs, 208 conversations.

conversations.py turns attempt folders into one JSON line per conversation:

K=~/Desktop/optimized-row-experiments-20261024/traces/kramabench
python3 -I benchmark/tracker/conversations.py dataflow conversations-dataflow.jsonl \
  $K/claude-opus-5.5/optimized/opt1-kb-opus55/rep1 $K/deepseek-v4.1-flash/optimized-strict/opt1-kb-deepseek/rep1
S=<the smolagents rep1 folders of kramabench-experiments-20261014.zip>
python3 -I benchmark/tracker/conversations.py smolagents conversations-smolagents.jsonl \
  $S/claude-opus-5.5/smolagents/rep1 $S/deepseek-v4.1-flash/smolagents/rep1

Dataflow agent

run-arm.sh starts an agent service of this checkout on the engine of a campaign stack (benchmark/campaign; STACK_DIR, default /var/tmp/bobflow-bench) and replays every conversation through it (replay-dataflow.ts). The service is started by start-agent.sh, with its own port, trace database and workspace, and the memory route on (AGENT_DEBUG_MEMORY=1). It sends its model calls to the replayer, which answers each one with the next recorded response. Everything else runs as in a benchmark run: every edit, every execution on the engine, and the context of every call. The replay checks that each call's input is about as long as the recorded one, and that tool errors fall where they did.

All conversations run in one agent. Each one starts from the agent's first snapshot, the empty dataflow, so the conversations become branches of one snapshot tree. The replayer records the service's heap and external memory after a full collection, and the tree's size, twice per conversation. The first reading is taken right after the conversation. The second is taken once HEAD is back at the first snapshot (rest lines): that is the history alone, since the finished conversation's results have gone to disk. The paper's data uses the second reading.

R=/var/tmp/snapshot-overhead/runs C=conversations-dataflow.jsonl
benchmark/tracker/run-arm.sh $R/keep   3143 3197 $C --history keep     # the agent as it is
benchmark/tracker/run-arm.sh $R/jumps  3145 3195 $C --jumps 50 --jump-every 250
bun benchmark/tracker/structure_memory.ts $R/keep                      # the tracker's structure, per point

What the tracker costs is its structure over the history: the session keeps the same snapshots (dataflows, results, observations) either way, and the tracker adds, per snapshot, its id, parent, step, time, version and action, and the indexes over them (snapshots by id, each step's newest snapshot, the snapshots with children, the version numbers, each step's children). structure_memory.ts rebuilds that structure from the run's trace (traces.db) for the tree as it stood at each rest point, as the agent holds it, sharing strings as the agent does, and measures the live bytes it adds in a fresh process (heap snapshots before and after). It does not measure in the agent service: there, heap snapshots crash Bun after a few calls, and the heap's own size, counted in whole blocks, cannot show a few megabytes in a heap that has freed more. The paper's "without" line is the agent's memory less this structure.

--history forget is another comparison, not the paper's: before each conversation it drops every snapshot that the new conversation's path does not need, so the agent keeps no history of earlier dataflows. Its context is the same, except for results the engine serves from its cache: all conversations share one workflow, so a cached result can come from an earlier conversation, and only the kept snapshots still hold that run's statistics (62 of the 207 conversations then sent model inputs more than 2% shorter than recorded).

--jumps K --jump-every N checks out K random versions each time the tree passes another N snapshots (POST /:id/checkout-version). Each jump is timed from the request to the GUI frame (headChange) that carries the restored dataflow and results. The server's own timing comes back with the response. A jump to a version in the middle of a step records a restore step, as a click in the version tree does, so the tree grows a little with the jumps.

--verify-jumps FILE checks what jumps restore. After the replay, it jumps to every version and every step in a random order. For each jump it writes the restored dataflow and results (the headChange frame and GET /:id/snapshots/head), the conversation from the root to HEAD, the model's next context (the nextContext frame) and, for a version, its preview (GET /:id/versions/:id). Two versions of the agent that replayed the same conversations with the same seed then make the same jumps, and compare_replays.py compares them line by line:

benchmark/tracker/run-arm.sh $R/verify-new 3150 3190 $C --verify-jumps $R/verify-new/restores.jsonl
# the same in a checkout of the other version, to $R/verify-old
python3 -I benchmark/tracker/compare_replays.py restores $R/verify-old/restores.jsonl $R/verify-new/restores.jsonl

For the per-action snapshots, this compared stable 87a7cea92 with the agent of this change on every fourth conversation (52 conversations, 1,153 snapshots; every result was on disk when the jumps began). Of 1,386 jumps, 1,289 restored the same. The other 97 differ only in the status of six operators whose failed runs the engine reported as Running in one replay and Uninitialized in the other; each agent restored the status its own replay recorded.

--dump-requests FILE writes every model request the agent sends, one line per call. Two versions of the agent that replay the same conversations should send the same requests when a change is not meant to alter what the model sees, such as a refactor or removing a setting no run used. compare_replays.py requests checks that, after normalizing what two runs cannot share:

benchmark/tracker/run-arm.sh $R/requests-new 3151 3191 $C --dump-requests $R/requests-new/requests.jsonl
# the same in a checkout of the other version, to $R/requests-old
python3 -I benchmark/tracker/compare_replays.py requests $R/requests-old/requests.jsonl $R/requests-new/requests.jsonl

smolagents

.venv/bin/python benchmark/tracker/replay_smolagents.py conversations-smolagents.jsonl smolagents-memory.jsonl

This is the benchmarks' baseline, built by the harness's CodeAgentWrapper (benchmark/src/bobbench/scriptreact). It runs every conversation in one session with reset=False, as the smolagents service continues a chat. Its model returns the recorded responses. Its executor returns what each step's code printed, returned or raised, so no code runs and the memory is the agent's history, without execution variables. After every step the replayer records the Python memory traced after a full collection.

smolagents keeps no snapshot of its Python state, so it cannot jump. To go back to step k, it would have to run the code of steps 1 to k again. restore_smolagents.py times that for random steps. It uses the baseline's interpreter (benchmark/bench setup builds it) and executor, with the task data mounted where the benchmark mounted it. Each step runs in a fresh process; the process start and loading pandas and numpy are not counted, since a running session has done both already.

benchmark/envs/scriptreact/.venv/bin/python benchmark/tracker/restore_smolagents.py \
  conversations-smolagents.jsonl smolagents-restore.jsonl --data benchmark/Kramabench/data --samples 300

The paper's data

python3 -I benchmark/tracker/summarize.py --keep $R/keep --jumps $R/jumps \
  --smolagents smolagents-memory.jsonl --smolagents-restore smolagents-restore.jsonl \
  --out <paper repo>/scripts/plots/data

This writes memory_growth.csv, tracker_heap.csv, tracker_jumps.csv and script_restore.csv. The paper repository's scripts/plots/fig_memory_growth.py and fig_tracker.py draw them.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.