Compare commits

..

255 Commits

Author SHA1 Message Date
bench
8077dd9795 Complete strict OpenCode SFT export using shared preservation pipeline 2026-11-10 18:01:17 +08:00
bench
982d5c04ef docs(memory): 11-08 collector downtime handed back to resumed rollouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:33:49 +08:00
bench
e43606ccc5 recovery: hand a stopped collector's downtime back to its rollouts
A rollout whose collector died (handover, crash) is paused on the next start
(CONTROLLER_RESTARTED) with paused_at taken from execution.json's updated_at.
But reconcile_run first settles interrupted operations through the stage
Worker, which rewrites execution.json, so updated_at was already "now": no
downtime was handed back and any stop longer than the remaining budget timed
the rollout out the moment it resumed. Those timeouts look like real 24 h runs
to the sibling rule, so their requeued attempts were never claimed either
(11-06..08: a 33 h stop, 10 of 12 Qwen rollouts lost).

reconcile() now takes owner_lost_at (the dead owner's last write, read before
the caller's own saves) and adds the whole downtime to the deadline, uncapped:
the paused-credit cap is for pauses that may never resume, while a restarted
collector resumes at once. downtime_s records it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:29:13 +08:00
bench
407ad584da docs(memory): 11-08 board borrowing verified in collection; Qwen rerun batch; long handover stop voids running rollouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:06:15 +08:00
bench
a1383dd1db docs(memory): 11-07 board 013 released to the system
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 23:01:35 +08:00
bench
811a8f4f93 docs(memory): 11-07 boards borrowed per use from the platform, live on staging and production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 22:58:21 +08:00
bench
fa5c895e90 health_check: a board in its post-release reset counts as borrowable
Every give-back resets the board for about 42 s; with one board online a
10-minute check landing in that window reported the whole march unusable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 22:56:48 +08:00
bench
6cfc479b98 boards: borrow from the RDK Sandbox platform per use, give back after
The platform now hands out boards per request and resets a board on release
(11-07 measured: free again after 42 s, new password, new host key, our key
gone). Boards are no longer ours between uses, so:

- harness/board_lease.py: request by board id (looked up by SSH port), install
  our public key with that lease's password (SSH_ASKPASS, never on a command
  line), release. A board-<slot>.rdk.json marker records each borrow, so a
  crashed holder's board is found and released; boards a person holds on the
  same account are never touched. Token in .env.local (RDK_SANDBOX_TOKEN) stays
  in controller processes; without it boards are used as statically configured.
- scheduler: borrow after taking the slot lock, give back right after use; an
  unavailable board rests 30 s per waiter. The reset replaces the board
  quarantine: receipts/idle-probe release and the orphan-marker loop in
  reconcile_leases become one sweep that gives back a dead holder's board.
- Host keys are no longer pinned (every borrow changes them): board_perf,
  the idle probe, Salty containers stop copying known_hosts.
- health_check: platform status replaces TCP and pinned-key ssh probes; warns
  when a march has no borrowable board or a borrow is older than 2 hours.

The agent's board access is unchanged (bench dev --board, stage run
board/eval); it never sees the token, passwords or which board it gets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 22:54:43 +08:00
bench
0afe29b921 docs(memory): 11-04 all existing rollouts used one unchanged skill pack
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:10:13 +08:00
bench
b1cffbe299 docs(memory): 11-04 watchdog scripts and production upgrade; health check as running on production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:53:50 +08:00
bench
5fd45e3611 docs(memory): 11-04 watchdog may run the three recovery scripts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:21:58 +08:00
bench
4861e5148e docs(memory): 11-04 Feishu alerts now go out from the VM, watchdog sessions behind a switch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:20:09 +08:00
bench
d3fb81d135 docs(memory): 11-04 watchdog sends Feishu from the VM and picks gateway keys by balance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:03:04 +08:00
bench
7880831a92 docs(memory): 11-04 watchdog in the VM, reports go out through the existing Feishu bot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:34:58 +08:00
bench
74d2f13e83 docs(memory): 11-04 audit of which RSI parts can be swapped and recorded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:28:06 +08:00
29ba8514be docs(memory): 11-03 how often Pi actually compacted (3 Qwen rollouts)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 21:06:03 +08:00
bench
c4ab2405b7 memory: Qwen 评测 30 道题、data-clean batch-3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 19:39:11 +08:00
bench
349cd8b278 docs(memory): 11-03 the 129 models missing from the 209-task batches, by difficulty
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 15:30:25 +08:00
c78b9c4c94 docs(memory): 11-02 22:0x 06 back on its earlier key; 05re resumes bounce on ledger timeouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:15:19 +08:00
0bf18005b7 docs(memory): 11-02 21:4x group f unpaused, paused rollouts made resumable; two resume caps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:55:55 +08:00
a94990a60e docs(memory): 11-02 cancelled the two stale r20261019-02 rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:32:43 +08:00
f9349a1a67 docs(memory): 11-02 account e recovered on its own at 10:30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 11:36:06 +08:00
6dd5cf1b0a docs(memory): 11-02 morning Salty job count check; account e 429 comes and goes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 10:03:25 +08:00
b1aa90bb9a docs(memory): 11-02 GLM key switch for the reopen batches; global slots full
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:34:23 +08:00
6706ef3d31 docs(memory): 11-02 both GLM accounts down, only Qwen running
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:04:25 +08:00
bench
a484c4df99 docs(memory): 10-31 reopen 78 blocked tasks as r20261031-05re/06re; qwen-all archiving
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:58:19 +08:00
bench
ec98f6e57f docs(memory): 10-31 05/06 have no claimable tasks left; 62 blocked only by the pre-10-16 budget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:14:04 +08:00
bench
779e123760 docs(memory): 10-30 Qwen full run on 204 S100P tasks, formal comparison finished
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:05:29 +08:00
bench
be222352f2 quota: a rate limit sent as HTTP 400 is a rate limit
The FAT gateway (litellm) answers an account rate limit with 400
"RateLimitError ... 您的账户已达到速率限制". It was UPSTREAM_REJECTED: the
group never cooled and every such request paused its rollout for good.
Now it cools the group and is resent like a 429; the all-rate-limited
resume check looks at the reason, not the status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:16:49 +08:00
bench
d06e096752 docs(memory): 10-29 workspace cleanup on production, staging long run 8/8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:12:35 +08:00
bench
b2dae337ee memory: why the GLM/Qwen gap widened in the formal comparison (10-29)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 13:04:24 +08:00
bench
2aa4db4bbe docs(memory): 10-29 VM disk near-full, workspace cleanup tested on staging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:51:44 +08:00
bench
4f27d61d5a salty offload: an archived rollout drops its whole workspace, not only files over 1 MB
Every workspace file is in the rollout's tgz, which the export worker and
salty_review_again read; the local copy has no reader. 10-29 archived
rollouts still held 34 GB on the VM (half of runs/) and the disk fell to
596 MB. Rollouts archived by the old code lose their workspace on the next
pass without a new upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:45:48 +08:00
bench
b0514e7a6a docs(memory): 10-28 23:49 Qwen group unstuck again, all-429 pauses made resumable by hand
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:54:20 +08:00
bench
ceffa5825d docs(memory): 10-28 offload background export on production, staging long run resumed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:20:59 +08:00
bench
cc03f31651 docs(memory): 10-28 infra fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 17:19:47 +08:00
bench
68028a2dfa infra: board self-test survives a lost receipt, all-429 pauses resume, export no longer blocks archiving
- board: RemoteSession.read_receipt (3 tries, 60 s, 10 s apart) shared by 07-board and the terminal
  path, which read once under a 15 s cap. When it still cannot be read, an idle board probed while the
  lease is held counts as cleanup proof (proof=board_idle_ps). 10-27/28: 13 rollouts lost, 7 already clean.
- execution: a *CLEANUP_UNCONFIRMED stop is INFRA_ERROR, not AGENT_ERROR.
- scheduler: a board quarantine marker without a lease is released when the board is idle
  (10-24..26: board-6 locked 47 hours).
- quota: a generation paused on HTTP_ATTEMPT_BUDGET_EXHAUSTED whose every attempt was a 429 resumes
  with fresh attempts once its group is OPEN/RECOVERING. Until then it holds no slot, so new claims keep
  probing the account (10-28 account e: 6 rollouts paused 9 hours after the re-key).
- salty_offload: the export runs in a background thread; archiving and freeing go on every 10 minutes
  (exports take 4-6 hours since 10-25).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 17:19:46 +08:00
bench
6aabf56cf2 collect: a rollout whose own resume budget is spent is not a resume candidate
10-28 r20260929-05: pose--rtmpose.tiny #4 had auto_resume_count 3/3 in
execution.json but resumes 0/3 in the quota ledger (each resume counted in
the execution, then failed before the ledger did). _resume_snapshot asked
only the ledger, so it offered the rollout every loop; Execution.resume
refused it (AUTO_RESUME_BUDGET_EXHAUSTED) once a second, and because a
ready resume blocks new claims, 05 admitted nothing new for 10 h.
Apply Execution.resume's own test before offering it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 11:11:21 +08:00
bench
61d8f54d44 quota: a full-context 400 on the half-open probe reopens the group
10-27 formal-qwen: after a CONNECT_FAILED cooldown the half-open probe was a
full context (400 CONTEXT_TOO_LONG). _finish only failed the generation, so
the group stayed HALF_OPEN, which admission never treats as ready: all five
lanes sent nothing for 4.5 h and paused on QUOTA_WAIT_BUDGET_EXHAUSTED.
The provider answered, so treat it like a successful probe (RECOVERING, 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 02:05:04 +08:00
bench
d9a861da46 content review: a gate-only job.json edit keeps the earlier review
Adding gates to running tasks' job.json (10-24: G1 require_bpu_compute, G4
budgets) changes the job.json hash in the review binding, so every reviewed
PASS became "unreviewed" and dropped out of SFT (05/06: 141/181 -> 3/10).
check() now falls back to the latest earlier receipt whose binding differs
only by job.json and by gate judgments it never made (absent, null, "na");
transcript, measurements, stage files and every earlier judgment must match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:30:04 +08:00
bench
10d5546f88 execution: a paused rollout past its deadline after a reboot ends as DEADLINE_EXCEEDED
After a host reboot _reason() returned BOOT_CHANGED_RECONCILE_REQUIRED for every paused
execution before looking at the deadline, so one already past 24 h was offered for resume,
refused by resume() without saving why, and offered again. 10-25 after the Mac mini hang
seven rollouts looped ~43k times and held 7 lanes until they were cancelled by hand.

When the boot changed, judge a paused execution's deadline by wall time (the old boot's
monotonic clock means nothing). _resume_snapshot already settles EXECUTION_DEADLINE_EXCEEDED.

Checked on staging (r20261026-st): rollout made to look "previous boot, started 49 h ago,
paused 1 h"; the collector settled it as DEADLINE_EXCEEDED within a minute of start, no loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:16:33 +08:00
bench
1c57d9a6b4 gates: a conv fused into a BPU node (ON "--") is not on the CPU
Rejudging real rollouts showed yolo11m.seg (every conv fused, two on the CPU)
counted as all-CPU. convnext.large with all 113 convs on the CPU still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:02:10 +08:00
bench
ec047480ba gates: G1 fails only when no conv/matmul runs on the BPU; G4 judged against board-CPU FP32 only
The agent decides what goes on the BPU and what stays on the CPU. Drop the
1.5x budget built from a platform int8 reference: that reference was an answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:40:22 +08:00
bench
71873e0ba1 scheduler: release a quarantined board of a paused rollout when the board is idle, from acquire
reconcile_leases only released boards of TERMINAL executions and only ran on manual reconcile, so a rollout
paused after a failed 07-board (10-24 16:02) kept the only S100P board quarantined for 6.5 hours. Acquire now
retries the proven-release path every 10 minutes while a slot is quarantined; a paused owner's board is freed
on the same proof as a terminal one (holder dead, no owned processes, live probe shows an idle board).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:00:33 +08:00
bench
768474e4be salty worker: replace a changed job.json instead of refusing the stage
Gates were written into running production jobs on 10-24; every later Salty stage of those rollouts failed
with 'job.json differs from the controller copy', and a failed 07-board quarantined the only S100P board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:58:49 +08:00
bench
92da091232 docs(memory): gates and hidden platform code in production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 12:42:16 +08:00
bench
31817a71fc speed_ref packs the platform code again; agent bench dev still does not
speed_ref exports the default graph with harness/tools inside bench dev; since 8fb9349 the dev bundle carried only
container_site, so a job without a cached export could not get a speed reference. salty_dev.execute takes an explicit
platform_code flag that only speed_ref passes; the agent's terminal path never sets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 12:34:49 +08:00
bench
ea83762099 board_refs: install onnxruntime on a board that lacks it, from the kept wheels
Boards have no internet. configs/board-ort keeps a wheel per board python (cp310 S100P, cp312 S600, SHA256SUMS);
the first CPU measurement on a board without onnxruntime installs it into /userdata/bench-ort, and a board whose
python has no kept wheel fails that job's CPU reference with the pip download command to fetch one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:55:46 +08:00
bench
c41f0b544b docs(memory): BPU-compute and board speed gates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:48:27 +08:00
bench
fd508fc513 board_refs: restore BOARD_* after building the ssh command; the registry check reads them for slot 0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:43:52 +08:00
bench
1dcf331c90 Gates: compute must run on the BPU; board latency budget and the original model on the board CPU as speed floors
- 06-hbm records the convolutions/matmuls hb_compile left on the CPU (its node table's ON column); G1 fails on any
  when the batch's gates say require_bpu_compute (new in gates.yaml; frozen batches without it are not judged)
- batch creation freezes agent/speed_ref/<job>.json into G4: latency_budget_ms = 1.5 x board_latency_ms (median
  board latency of plain int8 builds) and cpu_fp32_latency_ms; G4 also fails when the model is not faster than
  the original FP32 model on the board CPU, and records the speedup
- scripts/board_refs.py computes both; the CPU number is onnxruntime on the board itself under the board lease
- e2e prompt states the three rules; agent/VERSION 25

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:41:02 +08:00
bench
f6e7dfe56a docs(memory): pilot contract checksum incident and 10-24 tally
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:16:26 +08:00
bench
ff3c8926df Revert the pose evaluator edit from 8a1ee24: running batches froze its checksum
harness/eval/coco_extra.py is frozen per batch by task_contract (only listed equivalent rewrites may replace it).
The 8a1ee24 edit made every pose stage of the pilot batches fail the contract check (Qwen rtmpose.s never got a
formal stage). The keypoint shift gate it fed was removed in e0c224f, so the shift reaching 'unverified' no longer
decides anything; back to the approved version 505d37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:15:37 +08:00
bench
a0e86e71ea health_check: alert on board_offline stage failures and on unreachable board ports
10-23 08:00-11:00 all 8 boards behind rdk-sandbox refused connections; board/eval steps failed as
board_offline for 3 hours and nothing in the check covered it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:19:15 +08:00
bench
23b55cb86e docs(memory): production pose shift rule removed; rejudge limits with offloaded HBM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:39:53 +08:00
bench
f13c41da82 docs(memory): pose shift gate removed, pilot tally 10-23 08:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 07:56:43 +08:00
bench
e0c224f881 Pose: keypoint shift is recorded, no longer a pass/fail gate
The 2 px limit was a hand-set number from the first baseline (9-15): mean distance of all 17 joints in raw image
pixels, invisible joints included, not scale-normalized. On 10-22 SimpleBaseline r101 failed it with OKS-AP 68.34
vs FP32 68.22. OKS-AP already scores the task against ground truth with person-scale normalization, and FP32/quant
agreement is G2's job. New runs drop it from G3; the shift is still measured and recorded. Pose contracts no
longer state it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 07:55:51 +08:00
bench
8a1ee24338 Pose shift check no longer requires official_model; pose contracts state the 2 px keypoint shift limit
RTMPose evidence never carried official_model, so the top-down shift check reported every rtmpose run
UNVERIFIED (06 x2, pilot x2). run_quant already rejects a baseline of another model, so the key added nothing.
The contracts now say G3 also bounds the mean keypoint shift (2 px), which pilot agents could not know.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 01:39:15 +08:00
bench
bdfd600a54 docs(memory): opencode path guard, shared deps, 3/3 PASS rerun
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:19:15 +08:00
bench
89c06d4cba docs(memory): GLM vs Qwen pilot with platform code hidden
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:03:20 +08:00
bench
a8fdb288ec io-contracts for every adapter family: pose (HRNet/SimCC/MSPN/RTMO), depth, flow, features, DETR/Mask2Former/SOLO, EfficientViT-seg, SSD300
139 adapter models, 16 contract files. Each output is defined as an official module's own output (verifiable
against the official source and the bench stage run export signature), plus what the platform decodes on the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:02:02 +08:00
bench
8fb9349907 Agent no longer gets the platform's model code; each task states its I/O contract
The agent could read and copy harness/adapters (model loading, preprocessing, export, decoding), and every
bench dev container carried the whole harness, registry, scripts and export trees, evaluator and gates
included. That did the model-specific half of the deployment for it.

- guard and private-home jail no longer expose harness/adapters; bench dev packs only container_site
- the evaluator still decodes outputs with the platform's own code, so agent/io-contracts states what the
  graph's inputs and outputs mean (9 families, 71 models so far); the prompt appends the task's contract
- SYSTEM.md: says where official sources, weights and environments are; the compile.yaml template is
  replaced by the facts that differ from the docs
- e2e prompt: whole-class int16/float fallback and >1.5x board latency do not pass
- agent/VERSION 24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:51:17 +08:00
bench
061f3ed168 opencode: hard-link the pinned node_modules into the config dir
A symlinked node_modules made OpenCode hang inside the jail (read-only
target). A hard-linked copy is an ordinary installed tree for its reify and
takes no extra disk; agent/ and runs/ share one filesystem on the VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 11:24:49 +08:00
bench
abc351cdc5 opencode: seed the config dir with OpenCode's own package files
A hand-written package.json without its lock made OpenCode reify again over the
symlink. With its package.json + package-lock.json and node_modules linked to
the pinned copy, startup to init is 0.1 s and the home 672 KB (VM probe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 11:08:17 +08:00
bench
d166593ec6 opencode: Pi's path guard and the pinned plugin deps instead of a per-rollout install
The bench plugin applies guard-core like Pi's private-home path-guard: file
tools against the allowlist, bash only for root scans and direct shared-
resource commands; external_directory is left to that guard (job.json was
unreadable). Each rollout's config dir now links the pinned
agent/opencode/node_modules and models.json is not fetched: startup no longer
installs ~160 MB over the network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:54:18 +08:00
bench
91ed6add7c docs(memory): opencode rerun results on a separate staging run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:33:48 +08:00
bench
161d0a27e0 docs(memory): outcome of the 7 resumed 04 rollouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 02:27:56 +08:00
bench
69954d7c0d docs(memory): breakdown of export rollouts missing a verdict
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:52:09 +08:00
bench
b98113c8af docs(memory): Salty CLI 0.2.6 fixes job list parse failure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:19:04 +08:00
bench
2d164cd2a4 docs(memory): opencode on staging, fixes and pitfalls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:41:24 +08:00
bench
f61a083d5a opencode: export the session to a file; through a pipe it is cut at 64 KiB
Staging mobilenet.v2: 380 KB export came back as 65536 or 131072 bytes and
the rollout had no trajectory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:40:51 +08:00
bench
a595d49c05 opencode: budget counts fresh input and output, not cached context, like Pi
A staging rollout (mobilenet.v2) hit 2M tokens at turn 63: 1.95M were cache reads
of the same context. Pi on the same task counted 120k for 96 turns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:40:51 +08:00
bench
064e1a025f docs(memory): 04 paused rollouts resumed or cancelled after Qwen redeploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:26:18 +08:00
bench
216d5d0a05 docs(memory): reboot fixes shipped and 7 quarantined rollouts cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:13:58 +08:00
bench
5fb89d66b1 opencode: terminal_exec and the quota broker, like Pi
terminal_exec's body moves to agent/extensions/terminal-core.js, shared by
Pi's terminal.ts (unchanged schema/behaviour) and OpenCode's bench.ts.
OpenCode rollouts now get a managed Execution and a broker-scoped token
(the upstream key no longer enters its environment); terminal requires both.
No checkpoint/resume for OpenCode yet: the resume scan skips it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:46:53 +08:00
bench
44f3142cfa Reboot recovery: a reboot-killed scope proves a failed step; speed_ref sets aside an interrupted run
The 10-21 03:16 Mac mini reboot left 7 GLM rollouts (05: densenet201,
efficientnet.b2, rtmo.s; 06: rtmpose.x, rtmo.m, hypersim.base, yolo11n.seg)
quarantined OPERATION_STATE_UNKNOWN while still counted RUNNING: each had a
05-compile in flight, its reaper died with the VM before writing a receipt, and
_validate_recovered_receipt demanded one ('scope cleanup unconfirmed') although
scope_cleaned already accepts an earlier boot. Without a receipt an earlier-boot
scope now proves cleanup for a failed result and for the inline 04 whose meta is
hashed; any other success still needs its receipt.

speed_ref: stages/ref of an interrupted run kept bundle.tar, which salty_dev
creates exclusively, so the 3 in-flight references failed with FileExistsError
every 2 minutes and took all 3 workers. The leftover dir is renamed aside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 07:38:06 +08:00
bench
e1753ad70d Salty results: fsync before rename; an empty attempt meta no longer breaks _memory
The 10-21 03:16 Mac mini reboot left zero-byte files that had been installed
(tmp write + rename, no fsync) just before: 04-calibrate/a00/meta.json of 05
cls--swin.b k2, 07-board meta/perf of 06 pose--rtmo.l k2, salty/result.json of
several dev commands. _memory json-parsed every attempt meta of the model, so
every later 04/05 of swin.b failed in 0.03 s as REMOTE_UNAVAILABLE.

_install/_fetch/dev install now fsync the data before the rename; the dev sync
manifest uses execution.atomic_json; _memory skips an unreadable meta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 07:25:54 +08:00
bench
e3d14ad820 docs(memory): 10-21 Mac mini reboot and recovery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 07:22:20 +08:00
bench
60c85d87e5 docs(memory): Qwen service context length, concurrency and stall pattern
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:50:31 +08:00
bench
93a09d2a83 docs(memory): dev OOM memory doubling shipped to production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:43:10 +08:00
bench
50f163e993 bench dev: double memory after a failed dev job; never upload the pi checkpoint temp file
A dev container OOM (no reason given, the agent cannot raise the limit) was retried
at the same size and failed again every time (10-20: efficientnet.b6 3x at 16Gi,
unidepth.v2.vit.l 2x at 32Gi). remote.json now records memory and job_state; a failed
dev job of the rollout doubles the next one's memory (cap 128Gi) and stderr says so.

.bench-session.json.tmp (pi_session atomic write) was listed then renamed away before
tar read it: FileNotFoundError, dev command died as STAGE_EXECUTOR_EXIT (3x since 10-16).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:02:23 +08:00
bench
16b99ee1ed docs(memory): 06-hbm artifact return fix and two rollouts re-verified
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:47:19 +08:00
bench
19814889aa Salty worker: 06-hbm always returns its HBM/BC
The worker returned only artifacts that changed during the stage. 10-20
hrnet.w48 / ocrnet.hrnet.w18: the first 06-hbm container copied the HBM
into the (persistent) remote artifacts, then hit its memory limit; the
retry found it unchanged and never sent it, so the controller verified
'current HBM missing' and both ended UNVERIFIED after a good board eval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:46:05 +08:00
bench
e50bf15278 docs(memory): offload and staging reaper restarted on job-first cleanup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:26:59 +08:00
bench
8064feb2fc docs(memory): Salty job-list outage and v23 SFT chain review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:52:10 +08:00
bench
89c4801f53 Salty cleanup: remove the job before its storage dir
Jobs were kept until their dir delete succeeded; every storage delete
has failed server side since 10-19, so ~8000 finished jobs piled up and
from 10-20 17:00 /jobs grew past the CLI's response limit: salty ps and
describe by name failed and every Salty step ended REMOTE_UNAVAILABLE.
The job record is only an index (logs/describe are in stderr.log), so it
now goes first; the dir delete keeps its own retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:47:14 +08:00
bench
eab2dbcc37 docs(memory): board lease fix hot-swapped to production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:28:08 +08:00
bench
aad8d5b597 docs(memory): production switched to the new code on 10-20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:23:13 +08:00
bench
f75930e0f5 Scheduler: free a board whose stage died after its cleanup was proven
A 07-board step killed at its phase deadline never reached the lease release,
and a board lease was only freed once the whole rollout ended, so two S600
boards stayed locked for 11 hours (10-20). A board slot is now reused when its
holder is dead, the stage is DONE with cleanup VERIFIED, and every board-guard
receipt says VERIFIED - the same proof the stage worker already requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:21:32 +08:00
bench
3fa2e236f6 docs(memory): branches renamed to salty-prod / salty-test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:14:04 +08:00
bench
a6e2ce0ccb docs(memory): production hotfix of the one-shot Salty cleanup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:47:30 +08:00
bench
6badb5d44a docs(memory): Salty 0.2.4 on staging, background delete retries
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:30:32 +08:00
bench
36432d1c4e Salty cleanup: drop a succeeded delete task's record
Retries add a task record each (storage tasks lists them all). Once a delete
succeeded its record goes via storage rm-task (data untouched; the ID stays in
the receipt). Failed records stay for the Salty side's server investigation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:08:53 +08:00
bench
77031cd05b Salty cleanup: refused or failed deletes are retried from the background
With Salty 0.2.4 a delete is a background task; since 10-19 every one fails
server side, and a failure was recorded once and never retried, so garbage
would pile up for good. Now a submission the server refused (an HTTP error
such as 405) or a task that failed/was interrupted is submitted again by the
reaper after 30 min, doubling to 6 h; a task failing with not_found means an
earlier try removed it. A submission with no reply stays unknown and is never
resent blindly. The result path still makes one try. The reaper also covers
ended jobs ps no longer lists, logs only removals, and salty_offload gains
--reap-only so staging gets a background cleaner without archive/export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:02:07 +08:00
bench
5998ab4c81 fix(staging): support Salty CLI 0.2.4 lifecycle 2026-10-20 13:52:49 +08:00
bench
2c5a08015f docs(memory): overnight staging supervision results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:25:04 +08:00
bench
b4c4b83a88 Process reaper: a process exiting mid-scan is not a cleanup failure
On board kernels without /proc/<pid>/task/*/children, children() scans /proc and
reads each stat; a process that exits between the listing and the read answers
ESRCH (ProcessLookupError), which was not caught. 10-20 staging: the board guard
crashed in its own cleanup after a 20-minute self-test, wrote no result, and the
platform recorded BOARD_CLEANUP_UNCONFIRMED, quarantining a 5-hour rollout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 03:35:59 +08:00
bench
4b5b118909 terminal_exec: wait for a ticket queued behind the rollout's own worker
The stage worker runs one ticket at a time, but terminal_exec wait_handle gave up
after 1 s if the ticket had no operation yet ("Unknown protected stage handle").
10-20 staging: `bench stage run baseline` during a 40-minute bench dev compile,
and the agent followed the printed "# Pi wait" hint straight into that error.
In the last 3 days 85% of these errors (production 05/06 and staging) were real,
submitted tickets. A submitted ticket now waits under the execution's own stop
and deadline checks; a ticket the worker rejected before admission says why;
a handle that was never submitted is still unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:55:47 +08:00
bench
37df6933d7 Board commands: time starts with the board; a stage's own verdict is kept
10-19 staging: a 25-minute board self-test spent all of it queued for an S600
board shared with production, and the child's TERMINAL_DEADLINE_EXCEEDED was
overwritten by a bare STAGE_EXECUTOR_EXIT because it exited nonzero. The queue
is now covered by the request deadline (as for bench dev) and the command's
time starts at acquisition; a DONE status written by the child stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:07:10 +08:00
bench
98d85800ea docs(memory): Salty storage rm 405 incident and the one-shot cleanup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:01:35 +08:00
bench
45dcce1e7d Salty cleanup: one try, never hold a result back
From 16:50 on 10-19 Salty's storage rm answered 405 for every object; the
cleanup retried it for 30 minutes before each stage or bench dev result went
back. Garbage removal now tries once (dir first, so a failure leaves the job
listed) and salty_offload.reap_orphans tries again on its next pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:29:53 +08:00
bench
12bbc542dd docs(memory): staging collector, the three fixes verified there
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:00:15 +08:00
bench
f6a8318891 Tests: real Pi compacts a request the account refuses, and runs bash through the agent shell
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:56:46 +08:00
bench
ed962b11cc Agent commands: say when an earlier pipeline step failed
Pi's bash tool (shellPath), bench dev and the board terminal run commands with
pipe-note.sh: the exit code stays the last step's (no pipefail, so | head is
still 0), and a failed earlier step of the final pipeline gets one stderr line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:52:42 +08:00
bench
6e1668c9a8 Quota: a request over the account's limit is a full context for Pi
Recorded FAILED CONTEXT_TOO_LONG like a provider overflow and answered with
the overflow body, so Pi compacts and continues instead of ending the rollout
on an unrecognised 413. Content review keeps its REQUEST_EXCEEDS_INTERNAL_TPM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:52:42 +08:00
bench
db5a7a839d Export: read the running checkout's own state wherever it lives
A checkout whose state is elsewhere (BENCH_STATE_DIR, staging) was read as
<checkout>/state, so content review and export found no database and called
a PASS rollout unfinished. One helper, paths.state_dir, used by every lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:52:42 +08:00
bench
b3f80ad892 Collector: a paused rollout's wait reason is the lane while every lane is busy (no flicker in the log)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:41:41 +08:00
bench
20c876fd5c Staging: one rollout storage for bench dev and pipeline stages; log why paused rollouts wait
Codex review of the staging collector (10-19): a model built in bench dev was missing for 04-calibrate,
because only bench dev requests were rewritten to the container's bench/runs (reverts 56230c0). The
container now links the controller checkout's own runs/ to the same personal storage, so every
absolute path resolves alike; a no-op for production's bench/. And a paused rollout that waited ~2 h
left no trace of why: the collector logs each change of its wait reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:21:38 +08:00
bench
752943baaf Quota: each resume or restart starts a fresh wait allowance
Staging (10-19 14:06): a rollout whose lifetime wait total had passed wait_budget_s paused the first
time it was not admitted, resumed uncounted, and paused again every minute, starving the other paused
rollouts. 7 executions in production's s600 group are already over the total. The per-call bound and
the HTTP attempt budget are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:15:34 +08:00
bench
787f61fa80 Restart recovery: a dead collector's cut-off request replays at once, without pausing the shared group
Staging handover (10-19 11:40): the 2-minute hold on the dead collector's requests expired into an
unknown-outcome group pause that bounced every rollout already resumed. Its process exit closed the
connections, so the reply was cut off, not in doubt; and a platform restart no longer spends the
rollout's resume budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:03:04 +08:00
bench
56230c034c bench dev: send the workspace as the container's runs/ path, so a checkout outside bench/ (staging) works
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:39:13 +08:00
bench
c575ea0baf Restart recovery: resume turns queued for admission, wait for exiting stage reapers
Staging kill -9 with an immediate restart (10-19 11:17): a turn waiting behind the group's concurrency
read as not resumable and lost its slot, and a calibrate step whose executor was still exiting got
quarantined as SIDE_EFFECT_UNKNOWN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:25:40 +08:00
bench
72912a6b17 Restart recovery: keep slots for cut-off replies, wait for exiting reapers
Found on the staging collector (10-19): after kill -9 two rollouts whose reply was cut off were read as
not resumable for request_total_s while new rollouts took their slots, and a rollout handed over with a
bash command running was quarantined because the next collector looked before the reaper finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:02:59 +08:00
bench
0da66edde0 Resume rollouts after the collector dies (crash, kill, reboot, planned handover)
Processes are disposable; rollout state is resumable. When the collector dies,
the next one reconciles each running rollout from durable state instead of
quarantining or losing it:

- execution: a process of an earlier boot on this host is DEAD; a top-level
  reaper whose owner (the collector) died still proves its subtree empty
  (scopes record the owner that started them); reconcile() pauses a rollout
  with a proven-clean crash checkpoint as CONTROLLER_RESTARTED and marks its
  running tool calls INTERRUPTED; resume() across a reboot rebases monotonic
  clocks by wall time and credits the downtime as a pause
- stageworker.settle_interrupted: an admitted step whose executor is gone ends
  as STAGE_EXECUTOR_EXIT (free compile) and its handle is told directly; a
  board step without a clean board receipt still quarantines; nothing replays
- collection_runtime.crash_checkpoint: capture the real system prompt, freeze
  the session at the last saved message (mid-work phases only); configure_pi
  skips a generation ID the ledger already completed
- pi_session.js: checkpoint after every saved message (and compaction); on a
  recovered resume drop an unfinished trailing reply and answer open tool
  calls with an honest "interrupted by a platform restart" result
- scheduler: a paused rollout's local slot held by a dead holder is released
  once every process is proven gone
- pipeline: SIGUSR1 = planned handover (stop claiming, let board steps
  finish, shorten in-flight request holds, exit); SIGTERM still drains
- export: bench_recovery closes the cut segment; the dropped unfinished reply
  is excluded (UNFINISHED_BEFORE_RESTART)
- tests: test_controller_restart (real Pi on Linux: kill -9 mid-command,
  kill -9 mid-reply, SIGUSR1 handover, power loss + reboot), test_settle_
  interrupted; three tests of the old quarantine-everything rule now assert
  the new outcome while keeping their guarantees (no replay, unrelated PID
  untouched, board lease kept)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 09:29:26 +08:00
bench
6c7b19f616 offload: delete a rollout's compile scratch once it is archived
hb_compile's working_dir lives on the VM's own disk (work_root) and only
05-compile/06-hbm read it. Nothing removed it: on 10-18 742 finished rollouts
held 36 GB there, the Mac mini disk (which backs the VM disk) neared full,
and the VM's disk went read-only at 18:46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:55:11 +08:00
bench
f5cfd414eb docs(memory): v23 上线完成(10-18 15:43)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:50:08 +08:00
bench
6437b572a2 fix: freeze long Pi sessions at rollout end (no 1 MiB cap)
freeze_checkpoint read the session through config_bytes, which caps files at
1 MiB for tickets/configs. Long rollouts pass that, so finalization failed:
10-15..10-17, 17 rollouts, 4 recorded INFRA_ERROR instead of their real
outcome. The session read keeps the symlink/regular-file checks, no cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:33:37 +08:00
bench
18379401e4 v23: hand context compaction back to Pi, cut process rules from the prompt
- broker: a context-window 400 fails its generation (fences nothing) and goes
  back to Pi as context_length_exceeded, so Pi compacts and resends
- runner: new generation ID after compaction, wait for Pi's resumed run,
  record kept_messages; drop agent/context-mask.js and context_mask_chars
- models.json: contextWindow large so Pi compacts only on a real overflow,
  never on an estimate right before a pause (resume would not match)
- export: compactions[] gives what the model actually saw after each one
- prompt: keep facts and acceptance, drop how-to rules and coaching
  (SYSTEM.md 89->64 lines, e2e.md 27->20); stage status == stage wait

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 17:04:58 +08:00
bench
e3697f0ddb docs(memory): 10-17 删减清单与索引补齐
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:04:31 +08:00
bench
aca965ac9e docs/memory: 10-17 停 06(账号 B 没额度)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:30:56 +08:00
bench
2beb36a085 docs/memory: 能否当强化学习环境的评估与收尾清单
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 03:21:01 +08:00
bench
8703cd1b89 docs/memory: 10-17 底层复查(流程漏斗、平台复测缺速度、Qwen 续跑必死的根因)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 02:24:18 +08:00
bench
250f85eefb docs/memory: 10-16 断电停机与重启;AGENTS.md 索引补齐到与 MEMORY.md 一致
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:25:20 +08:00
bench
c1ecae2130 docs/memory: 稳定性体检复核更正(监控已有但有盲区、白跑时长实为约 1660 小时等)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:56:08 +08:00
bench
cb0ddb1625 docs(memory): 10-16 稳定性体检
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:06:41 +08:00
bench
a7f28230a8 docs(memory): v18+ 0 通过的原因与值得注意的行为
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:55:30 +08:00
bench
58d522a825 docs(memory): v16–17 下的 PASS/SFT 数
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:45:12 +08:00
bench
f481c3bc42 docs(memory): 10-16 按 collector 的 PASS/SFT 与自主性统计
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:42:11 +08:00
bench
5621eb1c95 docs(memory): 10-16 05 换 GLM key 与新账号组
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:23:40 +08:00
bench
e2741cb851 docs(memory): 10-16 17:00 复查(v18–21 行为与结果、S600 账号 429)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:55:34 +08:00
bench
ab2d95f4ce docs(memory): 10-16 下午 v22 热部署与重启
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:23:59 +08:00
bench
f2322ac926 test_pi_session:真 Pi 0.73.1 下 context_mask_chars 让请求里出现占位、最近输出完整、会话文件不变
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:49:58 +08:00
bench
b248a28fd7 上下文满记为预算用完;broker 内部错误可续跑并记日志;断线只占账号 2 分钟;04 Qwen 只发出时省去最早的工具输出
- quota:400 且正文说上下文超长(vLLM maximum context length、GLM exceeds max length)记 CONTEXT_TOO_LONG,不续跑;
  rollout 结束记 CONTEXT_BUDGET_EXHAUSTED(结局 BUDGET_EXHAUSTED,rollout.json TIMEOUT),不再是 INFRA。10-16 当天 7 条 Qwen。
- quota:do_POST 吞掉的异常打出类型、消息、位置(不含请求);一次都没发出去的 generation 记 BROKER_ERROR 暂停,
  能像连不上一样续跑。10-16 05 hrnet.w32 白跑 2.9h。
- quota:连接被断(REQUEST_CONNECTION_INTERRUPTED)的请求只占账号 UNKNOWN_HOLD_S=120 秒,不再等到请求自己的期限
  (20–27 分钟、整个账号的轨迹全停)。
- agent/context-mask.js:配置 rollouts.context_mask_chars 时(只给 04 Qwen),发出的上下文超过这个字数就把最早的工具输出
  换成占位,降到 60% 以下;会话文件保留原文;切点只在再次超限时移动。Pi 自带压缩只在两次 prompt 之间触发,用不上。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:37:55 +08:00
bench
21fce5e2e0 v22:bench stage wait 只看一眼不轮询;板上自测先查大小、拒绝有原因、失败也删副本;速度参考编不出来写 unavailable
- bench stage wait(stageclient 与 stagerun 两个入口)不再睡,没结束就返回 2 并指向 terminal_exec wait_handle。
  10-16 efficientvit.b0 400 轮里 307 轮是轮询。
- bench dev --board:先用 salty storage ls 量开发环境里的目录(>512 MiB 或 >40 个子目录直接拒绝),
  取回后已到时限也明确拒绝;拒绝原因作为命令结果回给 agent;snapshot/dev-files/tar 在任何路径都删。
  10-16 四次自测三次从 1.2 GB 的目录提交,取回 40 分钟、超时、exit 2 无原因、VM 留下 2.5 GB。
- speed_ref:默认配置编不出来时写 latency_ms_est=null、status=unavailable,并补齐以前的 FAILED。
- SYSTEM.md 对应三处;agent/VERSION 22。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:24:22 +08:00
bench
f7b9f3238c docs(memory): v20/v21、原图来源、dev 排队、stage wait
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:40:15 +08:00
bench
e543d7bd5f bench stage wait 一次最多等 10 分钟(原 60 秒),结束就返回
10-16:轮询的 agent 每分钟烧一轮,efficientvit.b0(v18)400 轮里 302 轮是 bench stage wait,没编译就用完预算;
vkitti.base 73 轮、zoedepth.nk 55 轮。bash 一条命令上限约 14 分钟,10 分钟在内。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:39:50 +08:00
bench
dbb717fba8 v21:校准图片换成训练集原图(calib-raw/<set>/images,原尺寸,images.json 带顺序、来源、姿态题人框)
v18-v20 的轨迹继续用它们开始时的缩放 png/,从 v21 起 $BENCH_CALIB_IMAGES 指向 images/。原图从 36 的 JuiceFS 取
(COCO 走官网、ImageNet 从同一批 parquet 行、NYU 从官方 .mat,哈希与平台一致),ADE20K/HPatches 从 pool。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:29:21 +08:00
bench
b3293851b9 bench dev:排队(dev 名额、Salty 容器)不算命令自己的时间
prepare 给走 Salty 的 dev 请求多 3 小时排队余量(仍不超过整条轨迹的时限),命令自己的 timeout 在容器启动后才开始算
(worker 用 spec timeout)。10-15:64Gi 的 dev 容器在 Salty 排队超过 agent 给的 300 秒,连 ls 都超时。
prepare 在 collector 里,下次重启后生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:59:46 +08:00
bench
22bf19d04e v20:板上自测直接在板卡容器里跑,S600 也开放;跑完删板上目录
用户定:板卡本身是测试环境、容器就是隔离,不再套命名空间(S600 的容器 seccomp 本来就禁)。命令在会话目录里跑,
$BENCH_OUT 拉回,会话目录照旧由 RemoteSession.close 删掉。S100P/S600 实测 0.75/0.97 ms,板上目录已删。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:52:13 +08:00
bench
8122c30b88 docs(memory): v18 夜间情况、v19 板上自测与板卡隔离实测
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:19:35 +08:00
bench
16a9c50c8b v19:bench dev --board 板上自测(S100P),隔离环境在真板上验证过
- terminal_jail:系统目录改递归绑定(S100P 沙箱容器在 /usr 下有只读的主机挂载,用户命名空间里非递归绑定被拒)、
  加 /host_lib 和只读 /sys(BPU 运行库读核心类型)、透传板上 LD_LIBRARY_PATH(libdnn/libhbucp 在 /usr/hobot/lib)
- collector 的请求检查只认 development 目标且不能热换,所以 --board 在命令前加标记,由新进程里的 terminal.run 转成板上请求;
  只对 v18+、nash-m 开放;上传当前目录(本地文件 + 只在开发环境里的大文件,如 hbm),一次最多 30 分钟、4 GiB;跑完删副本
- S600 板卡容器的 seccomp 禁止所有命名空间,暂不开放
- 实测:rdk-sandbox 上隔离环境里 /etc/shadow、/userdata、/root 不可见、无网络,mobilenet.v2 0.79 ms,回执确认清理

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:18:03 +08:00
bench
80aa571a0c v18 开发环境给出本题校准图片目录 $BENCH_CALIB_IMAGES;speed_ref 加 --follow 滚动补算
10-15 夜:提示词只说把 /data/calib/ 换成 /data/calib-raw/,agent 去 /data/calib-raw 找,每条花 5-8 次 dev 命令。
speed_ref 按轮跑时一轮要等最慢的那道编完,新题排不上。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:57:42 +08:00
bench
2ed2f5fec0 speed_ref:只给有 v18 轨迹的题按需编(--active,默认 3 路),失败的记 FAILED 不重试
Salty 和在跑的轨迹共用:一次加 8 路时 agent 自己的 dev 作业开始排队。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:42:43 +08:00
bench
1f8a7e20d1 v18:图和校准由 agent 自己做(平台不兜底),速度参考由平台预算
- 04 对 v18 起的轨迹(rollout.json 版本 >= 18,stagerun 放进 ctx.extra)要求 compile.yaml 写自己的
  onnx_model 和 cal_data_dir,缺了编译前拒绝、不占编译次数;更早的轨迹规则不变
- bench dev 对 v18 轨迹不挂平台 ONNX 和校准 npy,改挂 data/calib-raw(平台 128 张训练图,
  反归一化成模型输入尺寸的 8 位图,归一化由 agent 自己做)
- scripts/speed_ref.py:每题用默认配置在 dev 容器里编一次,hb_model_info 估计延迟写到
  agent/speed_ref/<job_id>.json(jail 里只读可见、实时更新),path-guard 放行这个目录
- 提示词:删掉自己编默认配置做参考、平台图和校准集位置;VERSION 18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:46:51 +08:00
bench
b2cde2b3c3 memory: v17 autonomy check 2026-10-15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:38:09 +08:00
bench
71e888cfc1 docs(memory): 热部署后核实、Salty 清理结果、dev 缓存泄露修复;同步 SFT 抽样细读记录
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:24:51 +08:00
bench
172a1749dd bench dev 只挂建模用的缓存(onnx/weights/sources/venvs),挡住私有源码副本、带标注的数据集和基线
bench/cache/adapter-probes/*/private-source 是 harness/registry 的私有副本,含参考配置:8 条 GLM 轨迹读过,
regnet.y.800mf 直接抄了一份。dataset-downloads 是 T1 所出自的带标注原始数据集,baseline 是评测图的 FP32 输出。
v16/v17 的 dev 命令只用过 sources 和 weights。容器内实测:缓存只剩 4 个目录,三处均不可见,onnx/hmct 正常。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:24:34 +08:00
bench
5bd0f1a40c Salty 失败作业不再留着:阶段失败拷完日志就删作业和目录,孤儿清理也收已结束的失败作业
失败作业的 logs、describe(OOM/驱逐原因)和内存记录早已写进本地 stderr.log,远端留着没人看,
10-15 攒了 327 个失败、95 个成功未删的作业和 485 个 personal 目录(用户同意清理,不是 SFT 数据)。
主控端被打断的那次尝试,其作业跑完后由 salty_offload.reap_orphans 删除,不再标 ponytail 遗留。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:32:57 +08:00
bench
85ae1750f1 Salty 容器里 onnxruntime 线程数限到分给容器的核数(阶段和 bench dev 都生效)
容器看得到宿主 244 个核,配额只有 4–6 个;onnxruntime 默认按核数开 125 个线程。
10-15 容器实测 resnet50(4 核):默认 320–500 ms/次,限到 4 线程 22 ms;hmct 校准写死的 10 线程约 35–48 ms。
做法:worker 把 harness/container_site 放到 PYTHONPATH 最前,其中 sitecustomize 在 onnxruntime 第一次 import 时
给 InferenceSession 加上限(OMP_NUM_THREADS),不用 onnxruntime 的进程什么都不做。它盖掉的镜像自带
sitecustomize 只装 Ubuntu 的 apport 崩溃钩子。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:28:35 +08:00
bench
b7577de0e7 板上加载模型卡住 10 分钟就按可重试的卡住结束,不再等满约 49 分钟
10-15 S600 40015、40017 两次在 load_start 之后再无进展,一直等到 guard 的期限。正常加载几秒(S600 约 4 秒)。
只限加载阶段:慢模型推理本身可能很久。主机关掉连接后,板上 guard 按断连回收并写清理回执。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:12:04 +08:00
bench
6ab088d7ee 评测分批不建新批次也能上:冻结规则增加逐对批准的等价改写,任务文件换成分批版本
- harness/eval/__init__.py:EQUIVALENT_SOURCES 列出精确的「冻结指纹 → 现指纹」对,contract_holds 判断现文件
  仍实现冻结合同(完全相同,或同一模块的已批准改写)。阶段检查、基线检查、expand 比对三处都走它。
- 批准的只有 f56ac2f 的 5 个任务文件:上板由逐张改为按实测字节分批,板上仍逐个样本推理
  (board_bench.infer_inputs),每张的预处理、后处理和指标一字未改。
- 批次的冻结记录不动,基线缓存按冻结指纹寻址,照常命中,不用重算。
- 用户 10-15:不建新批次。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:10:04 +08:00
bench
a526af7d78 docs(memory): 10-15 下午重启前清查出的底层 bug、v17/判分 v0.8、重启过程与核实
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:39:29 +08:00
bench
96d72b2f8c 判分版本固定处跟到 v0.8;导出清单说明改读 RECIPE_VERSION
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:16:48 +08:00
bench
41eb1d2193 agent v17:提示词删掉「评测数据只读可见」;判分 v0.8:板上磁盘满和板子连不上一样免罚
- dev 环境 10-14 起只挂校准集,VM 上 bench/data 为空,agent 已看不到评测数据,提示词与实际不符。
- 用户 10-15 定:板上磁盘满(disk_full)与 board_offline 同等处理,不扣 G2/G3、不扣超时分。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:53:34 +08:00
bench
b3be5cb102 板上每次调用按实测字节分批、G2 余弦按组算:大输出模型不再一次 12 GB(只取 f56ac2f 中不在冻结指纹里的部分)
task_contract 只哈希 harness/eval/<任务>.py;board.py、common.py、run.py 不在指纹里,在跑的 run 可以上。
各任务文件里的分组调用(分割/深度/光流/特征一次多张)仍等新建 run。
10-15 05 solo.r50 的 G2 一批 32 张 12 GB,容器内存撑爆,回执带不回来,整条轨迹作废。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:43:16 +08:00
bench
c2ceff5dc4 请求被模型服务直接拒绝(400)时不再暂停;额度账本读不到时暂停轨迹仍占着名额;修正过时注释
- 400 是服务拒绝这一条请求(如上下文超出模型窗口),续跑不可能被接受,暂停只会一直挂到 24 小时
  (10-15 04 retinanet.r101:76 万 token 的请求)。历史上 8 次,全是 Qwen。
- resume_readiness 在库忙时返回 QUOTA_SOURCE_UNAVAILABLE,原来不算在等,名额会被新题拿走。
- scheduler 注释:paths.config() 有 lru_cache,不会每轮重读。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:43:16 +08:00
bench
bf88f78f45 暂停等基础设施的时间不算 agent 的 24 小时:续跑时补回,暂停期间判超时也扣除,累计最多补一个预算
10-14 三条轨迹被 GLM 断线停了 7–16 小时,续上时只剩不到 1 小时,编译或评测做到一半被截断
(06 fcn.resnet101、depth.anything.v1.large、dpt.hybrid)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:43:16 +08:00
bench
4c98f9fd4e 板上清理回执读取:超时 15→60 秒并重试 3 次,慢握手不再把已清理的轨迹判成清理未确认
10-12 至 10-15 共 9 次(8 次 TimeoutExpired、1 次 ssh 退出),每次整条轨迹作废;
最近一次 05 fcn.resnet50 r02:板上已跑完并 waitpid 确认回收,回执读取超时。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:48:46 +08:00
bench
5a8e69d191 docs(memory): 派发前误判修复上线、待办总表、热部署前必查
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:21:10 +08:00
bench
383710c917 板卡阶段在派发前结束时补一张 not_started 回执,不再被当成清理未确认
板卡会话在第一条板上命令之前就写 UNKNOWN 回执(board_perf.bench),阶段结束时进程也都收完了,
所以本地执行完、目录里还没有回执,就证明板子没被碰过。原来这种情况(比如阶段开头的 harness 检查失败)
会被 stagerun/stageworker 判 BOARD_CLEANUP_UNCONFIRMED,执行被隔离、整条轨迹作废
(10-15 04 solov2.r50、05 deeplabv3plus.resnet50)。
只在真正执行阶段的一侧补(Salty 容器内或本地),控制端包装 Salty 的那一层拿不到这个证明,不补。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:20:15 +08:00
bench
6f3377b28a docs(memory): 评测文件被冻结不能热改(11:08 改坏三条)、暂停名额修复、第一条真自带图 PASS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:48:20 +08:00
bench
2b024178a9 回退 f56ac2f(板上评测分批):任务评测文件被 task_contract 冻结,在跑的 run 不能热改
harness/eval/<任务>.py 的 sha256 在建 run 时写进 job.task_contract,每个阶段开头都核对。
10-15 11:08 热部署改了 seg/mde/flow/feat/coco_extra.py,之后这些任务的阶段全报
frozen task implementation changed:板卡阶段因此被判清理未确认,整条轨迹作废
(04 solov2.r50、05 deeplabv3plus.resnet50;06 yolov8m.seg 各阶段全失败后判 FAIL)。
11:45:38 已在主控上恢复旧文件。分批改动等建新 run 时再 cherry-pick f56ac2f。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:47:23 +08:00
bench
f191baf520 暂停轨迹在等时这一轮只续跑不领新题;额度组暂停或对账中一律算在等
10-15 11:21、11:33:一条暂停轨迹续上的同一轮里,新题跟着进来,把还在等额度的几条的名额占了。
它们只能等别的轨迹结束才能排上,期间 24 小时时钟照走(两条自带图的只剩 7.5 小时)。
- _claimable:有暂停轨迹已就绪或在等额度时,这一轮只续跑;都续上了下一轮再领新题。
- _resume_snapshot:额度组 PAUSED/RECONCILING 不论原因都算在等(00:56 是连接被切,原来不算)。
collector 重启后生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:43:53 +08:00
bench
32a8e21f34 docs(memory): 板上评测按字节分批已上线(f56ac2f)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:08:34 +08:00
bench
f56ac2f3de 板上评测按实测字节分批:分割/深度/光流/特征不再逐张上板,大输出模型不再一批 12 GB
- BoardRunner:第一次只送 1 张,量出每张输入+输出字节,之后每批送到 1 GiB 为止(最多 32 张)。
  10-15 solo.r50 一批 32 张 12 GB,写满了一块 S600。
- common.groups:评测器按同一尺寸分组调 run_batched,一组的输出也放得进内存。
  分割、深度、光流、特征原来逐张上板,每张约 10 秒连接开销,100 张约 20 分钟。
  实例分割/姿态、G2 余弦也按它分组;非板卡 runner 保持原来的组大小。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:08:04 +08:00
bench
ea8362e545 docs(memory): 自带图结果:4 条真改图未出结论,superpoint 的自带图是复制的
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:44:24 +08:00
bench
4495899f03 docs(memory): 板上清扫上线核实:3 块板删 31 个旧目录,板上无失败
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:40:45 +08:00
bench
427d5fe7cc docs(memory): v16 下 Qwen 成功率变化的原因
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:43:54 +08:00
bench
d48152f417 docs(memory): 板上会话目录修复已上线(a263374),以及不能删活目录的原因
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:42:27 +08:00
bench
a263374839 板上会话目录:失败也删,只在守护进程可能还活着时留空目录;进入时清 6 小时没人动的旧目录;磁盘满归瞬态
10-15 S600 的 /userdata 两次写满(01:31–03:25、06:50–06:56),05 的 07-board/08-eval
报 No space left on device,却记成 unknown。
- 原来任何失败都把 eval-* 目录整个留在板上,没人回头看。现在只有清理没确认时才保留目录和回执,
  因为守护进程可能还在写回执和板级隔离标记;其余内容照删(solo.r50 一块输出 12 GB)。
- 容器被杀时 close() 不会运行:每个新会话先删 6 小时没人动过的 eval-* 目录,并把删了什么写进日志。
- No space left on device → disk_full(瞬态)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:41:29 +08:00
bench
4d00ff71f7 docs(memory): 10-14 HBM 步骤瓶颈、10-15 v16 轨迹质量对比
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:35:28 +08:00
bench
23d47c3003 docs(memory): 10-15 早上复查:dev 槽 37、S600 板盘满根因、暂停名额被抢、速度兜底仍判过
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:00:57 +08:00
bench
de481d33b2 docs(memory): 23:50 复查:修复生效、开始改图、dev 8 槽被长编译占满
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:55:00 +08:00
bench
41fdc55899 docs(memory): 自主性上线后核查:还没人自带图;dev 曾能看到评测集(已修)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:49:15 +08:00
bench
f16faee3d8 bench dev:只挂校准数据,评测集 t1 和 pool 不再可见;去掉重复上传
10-14 efficientvit.b3 在 bench dev 里读到了评测集 t1(含标签),可以拿答案挑配置或做校准。
salty_dev.execute 先自己 mkdir/cp 一遍,_submit 又传一遍,每条命令多三次 Salty 调用。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:48:56 +08:00
bench
95f53f9544 docs(memory): Mac mini 外网 SSH 地址 180.76.192.183:443
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:27:52 +08:00
bench
40994b694a docs(memory): 10-14 重启记录与上线后头 40 分钟观察
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:41:35 +08:00
bench
d5657969de bench dev:内存不低于本模型正式编译需要的量;容器失败时附内存记录
10-14 上线后第一个容器失败:vit.h.14 在开发环境 16Gi 里跑 hb_compile 被 OOM,Salty 不给原因。
现在按 salty_remote._memory 取本模型编译的内存下限(OOM 过就翻倍),并把容器的 usage.log 尾部附到 stderr。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:27:03 +08:00
bench
67d306de0f salty_offload 孤儿清理:跳过已自行清理的作业,停止时 404 视为已不在
10-14 重启后续跑的轨迹自己删掉了作业,ps 仍短暂列出,清理去 stop 得到 404,按网络故障重试 30 分钟,期间归档和导出都停着。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:16:43 +08:00
bench
9b7544a6bb 上线前加固 bench dev,写入速度要求
- 命令按墙钟截止(请求截止前 2 分钟),容器启动和排队不再挤掉结果回传的时间;实测超时命令在时限内返回 124。
- 状态轮询前 2 分钟 5 秒一次,之后 30 秒一次;上传上限 256 MiB,拷回单个 16 MiB、一次 64 MiB(Mac mini 链路约 1 MB/s)。
- salty_offload 的孤儿清理覆盖 bench dev:票已结束(例如轨迹被取消)还在跑的停掉,已结束的删作业和目录。
- 提示词:板上单帧延迟不超过平台默认量化配置模型的 1.5 倍,附自查办法;e2e.md 的 G4 同步。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:21:55 +08:00
bench
7195660570 docs(memory): 自主性改法已实现、速度门槛离线重判结果、重启清单补充
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:50:45 +08:00
bench
a92510dab8 智能体开发环境与自带图:bench dev 在 Salty 沙箱里跑命令,compile.yaml 可用 workspace 里自己的图和校准集
- bench dev:受管终端的 development 目标改走 Salty 容器(有完整工具链)。
  容器里用 user+mount 命名空间、uid nobody、去掉全部能力,只露工具链/缓存/数据(只读)和本轨迹 workspace;
  板卡密钥、其他轨迹、个人空间其余内容不可见(10-14 在 Salty 上实测,含 umount 逃逸被挡)。
  本地改动下次 bench dev 时上传,小文件拷回,大文件留在开发环境并列出。
- compile.yaml:model_parameters.onnx_model / calibration_parameters.cal_data_dir 可指向 workspace;
  04 在容器里核对输入输出与平台图一致(不一致直接拒、不占编译次数),记录图的 sha256 和校准来源。
- 配置白名单报错列出具体字段;SYSTEM.md 写明开发环境和自带图;agent/VERSION 15→16。
- 生效:stageworker/terminal/stageclient/SYSTEM.md 要重启;新配置要加 salty_remote.stages: terminal、
  terminal.enabled: true、pools.dev。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:49:14 +08:00
bench
c5408376a8 docs(memory): 自主性改法补充:VM 里没有工具链,开发环境上 Salty 排第一
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:12:36 +08:00
bench
3f78c0bb7c docs(memory): 智能体自主性改法:开放改图的窄路、兜底度量、本地算力
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:58:24 +08:00
bench
a522aca8c8 docs(memory): 10-14 智能体自主性核查:不让改图、兜底配置占多数
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:37:28 +08:00
bench
4738bb9bef docs(memory): 10-14 hbm 抽查按需、网络容错、板卡时限与重启清单
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:55:47 +08:00
bench
8a14b41abf Salty 容器里的板上操作按阶段截止时间收紧时限
本地执行时 board_perf 按执行状态把板上操作的时限收进阶段截止时间之内;Salty 容器里
没有执行状态,固定按 3600 秒,比 07-board 的 1 小时阶段时限还长。板上一卡住,容器就先被
阶段时限结束,清理回执带不回来,stageworker 只能判 BOARD_CLEANUP_UNCONFIRMED 并作废整条轨迹
(10-12 到 10-14 有 12 次,同一模型平时 0.2–2.6 分钟就完成)。现在 salty_remote 把阶段的
截止时刻(墙钟)放进打包的环境变量,board_perf 预留 600 秒把结果和回执交回去,超时就作为普通的 FAIL 结束,agent 可以重试。
VM 与 Salty 时钟偏差约 1 秒。两处都随阶段打包,部署即生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:49:54 +08:00
bench
f83fa3948c 网络小故障不再拖垮整条轨迹:原地重发、没发出去的暂停不扣续跑次数、结果不明的请求可以续跑
GLM 请求失败率约 0.3%,但一次失败就让整条轨迹暂停;3 次续跑次数被网络故障用完后,
轨迹只能挂到 24 小时上限(10-14 有 4 条);回复中途断开的请求过了等待期会被自动放弃,
同时整条执行被取消(10-13/14 共 16 条)。

A. 连接失败、域名解析失败(RETRY_UNSENT,确定什么都没发出去)在 broker 里等一会儿原地重发。
   每次重试把等待时间加上一次连接时限计入排队预算 wait_spent,保持
   客户端超时 = 排队预算 + 次数×单次时限 的上界;预算用完才照旧暂停。
B. 续跑次数只在最近一次请求可能已经送达时才扣(看账本最近一次 attempt 是否 sent)。
   连接/解析失败、因为别的请求结果不明而在准入时被挡下的暂停,续跑不扣次数。
   执行记录和账本两处计数同步,调度程序不再按原始次数预先过滤。
C. reconcile 自动放弃时(截止时间再过一个 token 窗口)不再取消执行,而是把这一轮
   标成 REQUEST_OUTCOME_UNKNOWN、可以续跑:重发一轮只花一次请求的 token,并计入续跑次数。
   人工放弃(operator)仍然永久隔离。续跑资格检查不再被已放弃的 attempt 挡住。
都在调度程序进程里运行,下次重启生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:41:49 +08:00
bench
f74fe00aaf hbm/bc 模拟器对比改为 agent 按需开启,只作诊断
阶段配置新增 verification_parameters.hbm_bc_samples(0–16,默认 0)。agent 用
bench stage run hbm --config <yaml> 指定 N 张校准样本,用 x86 模拟器对比 HBM 与 BC,
结果写在 G1.hbm_bc_cos_min,不改 verifier_ok:开了不会被扣分,真正把关的仍是 08-eval 板端实测。
编译配置只取三段,所以同一个 yaml 拿去编译也不受影响。适用任何有 .bc 的后端;跑失败记 None。
s06_hbm 随阶段打包,部署后马上生效(默认不跑);配置校验在 stageworker、说明在 SYSTEM.md,
都要下次重启时一起上线,否则按说明提交会被旧校验拒绝。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:48:17 +08:00
bench
aea3d74fa9 docs(memory): 10-14 Qwen 能力失败 6 道、更正 10-13 原因
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:26:32 +08:00
bench
e4e15134aa 域名解析失败暂停的轨迹可以自动续跑
DNS_FAILED / DNS_TIMEOUT 发生在发送之前(账本里这些生成的发送次数为 0),
重发安全;以前不在名单里,06 有 2 条从凌晨起一直停着。
调度程序进程内的代码,下次重启生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:24:02 +08:00
bench
ba143faaae 06-hbm 去掉 hbm/bc 模拟器抽查
x86 模拟器跑 2 张图占这一步 95% 的时间(本地中位 7 分钟,Salty 上 1–2 小时);
10-12 17:16 起 Salty 上撞 2 小时上限 103 次、约 206 小时。历史 388 次抽查报出 13 次
不一致,hb_verifier 都已先判掉,从没单独发现过问题;08-eval 在板上跑真 HBM。
与 salty_stage.py 一样记 hbm_bc_cos_min=None 并注明。阶段代码随每次提交打包,
部署后新起的步骤马上生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:24:02 +08:00
bench
8f9f8ab8b6 docs(memory): 10-13 晚核对修复效果、孤儿容器自动清理
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:30:18 +08:00
bench
ad51e86f5f 导出进程每轮停掉本地已结束的 Salty 作业,停好后清理
阶段时限只管超时;轨迹被取消、进程崩溃时,远端容器照样跑完,没人取结果。
10-13 晚有 12 个这样的作业占着约 64 核,同时我们自己的作业在排队。
现在每轮先查 salty ps:本地这一步已经写了 meta.json、远端还在 running/pending 的,
就停掉;已经 stopped 的,按 salty_remote 处理自己停掉的作业那样删除作业和临时目录。
failed 的照旧保留,供排查。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:24:47 +08:00
bench
9f5a64304c docs(memory): 10-13 晚重启上线续跑与额度读取修复
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:51:52 +08:00
bench
8a1ce8e6d9 额度账本读取时限 0.5 秒放宽到 5 秒;回复被截断且已确认结束的请求可以续跑
机器忙时读账本超过 0.5 秒:领题前检查失败会作废题目(10-13 下午约每小时 17 条),
续跑前检查失败会让暂停的轨迹退回去再等(vit.l.16 等反复退回好几个小时)。
INCOMPLETE_GENERATION 和 REQUEST_OUTCOME_UNKNOWN 一样,都是丢了一次回复,
只要账本记录了请求已结束(下面的未结束请求检查仍然生效),就可以从存档点重发。
这些代码都在调度程序进程里,重启后才生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:26:31 +08:00
bench
84a81b304a docs(memory): Mac mini 流量全局绕美国代理
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:14:05 +08:00
bench
90a5ea339f docs(memory): 修正提交号
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:15:20 +08:00
bench
bb4baf7aee docs(memory): 10-13 四个基建漏洞与处理
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:15:05 +08:00
bench
ec1a58edf8 续跑不再重新核对已结算的步骤;领题后不再重复查额度
续跑时 stageworker 会重新核对旧步骤回执。同一轨迹每次编译写同一个 .hbm,
旧回执核对失败后被当成状态不明,整条轨迹隔离;10-12/13 共 19 条编译过多次的轨迹,
续跑几秒内就判 INFRA_ERROR。现在已结算的操作直接沿用旧结果,判断条件与
reconcile_completed 相同。
collector 领题前已经查过额度,run_rollout 领到后又查一次(只等 0.5 秒);
机器忙时读超时,题被判 UNVERIFIED,一步都没跑(59 条)。领到后不再重复查。
这两处代码都在调度程序进程里运行,重启后才生效。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:15:05 +08:00
bench
7093c321f0 超时被杀的步骤归还名额、远端容器随阶段时限停止
步骤到了阶段时限被看门狗结束时来不及删 cpu 名额的占用记录,_try_slots 见记录就跳过,
只有调度程序重启才清;10-12 晚到 10-13 上午累计锁死 26/32 个名额。现在占用者已死、
且该步骤已记 DONE、进程清理已确认的名额可以直接接手(板卡名额不变)。
同时远端容器不随本地步骤停,7 个容器空跑最久 7.5 小时;提交时用 timeout 把容器
运行时长限制在该阶段的执行时限内(镜像自带 /usr/bin/timeout,已实测)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:15:05 +08:00
bench
c39a1e5ad0 docs(memory): 训练前 Qwen 能力失败题清单
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:09:37 +08:00
bench
82f2589b7d docs(memory): 10-13 Qwen 进度与新发现的系统问题
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:53:44 +08:00
bench
00243a2339 docs(memory): 容器线程被限流、编译超时不扣次数、depthpro 撤出
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:45:17 +08:00
bench
a7c454c0ae salty_remote: 容器里线程数按分到的核数设
容器看到整机 244 核,实际只给 4–6 核;torch/numpy 按 244 开线程,大部分时间在被限流。
10-12 实测(4 核容器):torch 默认 122 线程 2.6 次/秒,4 线程 42 次/秒;numpy 31 → 146–158 次/秒。
提交时设 OMP/MKL/OPENBLAS_NUM_THREADS=分到的核数。onnxruntime 不认这些变量,另行处理。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:43:02 +08:00
bench
375ce4d1f5 stagerun: 编译超时、看门狗判卡死也不扣编译次数
和容器被杀、执行器退出一样算系统的错,每条轨迹合计最多免 3 次。
10-12 17:16 后 DETR 两次编译一小时没日志没 CPU 被看门狗杀掉、
segformer.b5 编译逼近 4 小时上限,原来都会白扣模型一次机会。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:44:24 +08:00
bench
7dfaba94ca docs(memory): 逐图核对 GLM/Qwen 板端结果
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:30:01 +08:00
bench
66b88a2d30 docs(memory): 10-12 验证器核查
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:13:02 +08:00
bench
a00ed27e4d docs(memory): Qwen 基准改为旧结果也计入
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:07:14 +08:00
bench
1e0b8490f6 benchmark(qwen-sft-v1): 04 的旧结果也计入
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:06:46 +08:00
bench
0df42424f0 docs(memory): 10-12 20:00 Qwen 训练前基准进度
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:00:24 +08:00
bench
bf012be80c docs(memory): 取消在跑轨迹会让账号组停约 21 分钟
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:27:00 +08:00
bench
d53f9050de docs(memory): 10-12 17:16 立即重启换新代码
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:16:46 +08:00
bench
51d6cda544 alert: 启用小金飞书私聊报警,发送失败记日志
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:05:59 +08:00
bench
da7b77b62f alert: 可选用小金(飞书群答疑助手)私聊报警;记忆补充排空与 06 断流
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:03:38 +08:00
bench
ab629f2599 docs(memory): 10-12 自愈与报警
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:52:05 +08:00
bench
8d39d2b69b fix(drain_restart): 修空数组在 set -u 下报错;加 NO_TERM 防重复发信号;删掉排空期间手动续跑(旧进程在世时按设计不可接手)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:50:51 +08:00
bench
12787a289d fix: 系统失败不占编译次数、连不上可自动续跑、暂停轨迹不被新题抢名额;加健康检查与排空重启脚本
- stagerun: 容器被杀/执行器退出不计入 5 次编译(每条最多免 3 次)
- quota: CONNECT_FAILED / REQUEST_DEADLINE_BEFORE_SEND 证明未发送,允许自动续跑
- pipeline: 有暂停轨迹只差额度时,空出的名额留给它
- scripts/health_check.py + bench_health_alert.sh: 每 10 分钟检查,异常弹本机通知
- scripts/drain_restart.sh: 排空旧调度程序后重启,排空期间用新代码续跑卡住的轨迹

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:38:07 +08:00
bench
54c716fabb docs(memory): 10-12 系统清查结论与两处更正
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:13:08 +08:00
bench
dc08303971 docs(memory): 迁到 Salty 后通过数暴跌的原因
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:53:17 +08:00
bench
1ee95f018f docs(memory): 10-12 Qwen 37 题基准进度
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:47:16 +08:00
bench
7ff00955fa docs(memory): 04 的 Qwen NVFP4 服务实测速度
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:42:47 +08:00
bench
f35fe30a96 docs(memory): Qwen 轨迹只做训练前基准,不进 SFT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:30:34 +08:00
bench
50975fc62f docs(memory): Mac mini 10-12 强停后执行文件写坏的恢复办法
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:03:47 +08:00
bench
c5bd40146f docs(memory): Salty 导出耗时
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 06:17:36 +08:00
bench
5d647d0374 perf: Salty 导出只拷阶段文件和轨迹根目录文件,其余链接
按成员逐个拷贝要把每个小文件都从个人空间读一遍,日常导出从 16 分钟拖到半小时以上。
验证器只要求轨迹目录、阶段目录里的预测文件和 terminal_result.json 是真实文件。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:22:32 +08:00
bench
8c26709642 docs(memory): 导出只按存档清单搭目录;10-12 最终数字
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 03:41:43 +08:00
bench
df51a7c13f fix: Salty 导出只用存档里的文件,不混进容器替已放弃尝试写的东西
xfeat(05,10-11)的 06-hbm a00 主控已判超时放弃,容器却继续跑完,把 stdout.log 等写进了
个人空间的 runs。导出照搬个人空间的阶段目录,门证据多出 06-hbm/a00/stdout.log,
审核绑定和主控算的对不上,通过了审核仍显示"未审"。
现在解包时记下每个包的成员,本地目录只按成员清单搭(阶段文件和小文件拷贝、大文件链接),
存档没带的 HBM 从个人空间链接;旧的空标记会触发重新解包补清单。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:04:11 +08:00
bench
87e3d7a32d docs(memory): 审核额度新组、STARTED 回执放行方法、36 暂存清理
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 01:51:49 +08:00
bench
b4e4f6ee09 feat: scripts/salty_review_again.py 补审已搬走的 PASS 轨迹
最终数据集里"没审过/审核未知"、文件已被 salty_offload 删掉的轨迹,逐条从个人空间存档取回、
用配置的审核模型审、回执作补丁包传回、再删本地;一次只留一条(旧格式对话最大 650MB,
调度程序每次本地导出都会重读留在本地的文件)。已有 COMPLETE UNKNOWN 就走重试。

--release-started:崩溃留下的 STARTED 回执按设计不授权新请求。06 shufflenet.v2.x1.5 那条
其实请求已完成(账本 generation COMPLETE),按原执行号重审会被当作已完成而不发。放行时
原件进 history/,回执记成 COMPLETE UNKNOWN(OPERATOR_RELEASED_STARTED_RECEIPT),
由正常重试换新执行号发一次新请求。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 01:51:49 +08:00
bench
20555489a3 docs(memory): 10-11 最终数据集数字
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:33:06 +08:00
bench
351218b7ba docs(memory): 迁移前 PASS 搬运与补审结果、审核请求超额的限制
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:51:59 +08:00
bench
4df81a5abc docs(memory): 导出挪到 Salty 的做法与坑、数据集版本门槛改回 12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:10:53 +08:00
bench
6735b703a7 feat: 轨迹搬到 Salty 个人空间,数据集在 Salty 上导出(scripts/salty_offload.py)
Mac mini 只留小文件和最终数据集。常驻进程每 10 分钟:
- 结束满 30 分钟(UNVERIFIED 24 小时)、执行 TERMINAL、PASS 已审完的轨迹打包到
  personal:/bench-root/archive/<run>/<job>/<kk>.tgz,个人空间已有同大小副本的产物不进包;
  之后的改动(如审核回执)另传 <kk>.u<时间>.tgz,旧包从不覆盖;传完核对大小再删本地 >1MB 文件。
- 有新包时最多每小时起一个 Salty 作业(salty_remote_worker.export):把包解到 personal 的 runs
  (不解 workspace),用账本快照跑 export/to_agentrl.py,数据集留在 personal:/bench-root/datasets/,
  拷回 bench/datasets-final/。
调度程序每条结束后的本地导出保留:它在文件还在本地时发现并审核新 PASS,搬运等它审完。

导出作业里 runs 不能是指向个人空间的软链接:verify.py 会 resolve 轨迹目录、拒绝软链接的预测文件,
路径对不上时 G3 变未验证、审核绑定也变(实测 SFT 0 条)。所以容器里重建真实的轨迹和阶段目录,
agent/、artifacts/ 等大目录用软链接。实测和 Mac mini 本地导出逐条一致(3/3/2)。
半截上传的包解包失败就跳过,下次再解。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:10:30 +08:00
bench
e030719b4d docs: 经验记忆入库(docs/memory/),根 AGENTS.md 指向它
docs/memory/AGENTS.md 写了怎么读、怎么新建、不能写什么、怎么和本机副本同步,以及索引。
推送前已核对:只有变量名,没有密钥或密钥片段。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:24:24 +08:00
bench
2018b62a05 fix: hb_verifier 没测就崩溃时 G1 记未验证,不再记一致性失败
yolo11n.seg(06,10-11)的 int16 配置让 hb_verifier "launch function crashed"(rc 255),
没打出余弦表;板上精度达标却被判 FAIL。工具崩溃说明不了编译不一致,只说明没测到。
余弦低于阈值、hbm≡bc 抽查不一致仍判失败。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:24:24 +08:00
bench
0855486585 test: usage_log 检查只跑一拍,不在临时目录删掉后报错
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:22:50 +08:00
bench
aa3fabf8e9 feat: salty_remote 内存需求按模型记,跨批次/板型共享
同一模型在 04/05/06 里只是 march 不同,之前每个批次都要先被 OOM 杀一次。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:22:33 +08:00
bench
c8a93c9605 feat: salty_remote 按题记内存需求:同一 job 任何轨迹里该阶段被 OOM 杀过,就从当时内存的两倍起步
内存需要是模型的属性;之前按单条轨迹计数,补号重跑的轨迹又从 16Gi 起,重复被杀。
meta 里记 salty_memory。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:36:40 +08:00
bench
45cff52749 fix: salty_remote 按需加内存的上限从 64Gi 提到 128Gi
r2d2 编译在 32Gi 下内存仍按每 15 秒约 1.3G 线性增长后被杀;旧编译机内存大,
上限放到 128Gi 让重模型的环境接近原来。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:13:42 +08:00
bench
f1f44c9d1e fix: 调度程序因读整个 events.jsonl 被 OOM 杀;message_update 不再逐 token 复制整条消息
Pi 每个 token 发一次 message_update,里面 message 和 assistantMessageEvent.partial
各带一份到目前为止的整条消息,events.jsonl 每条轨迹 300–800MB(99.9% 是它)。
budget_used 每次 read_text() 整个文件,调度程序峰值 5GB,10-11 07:08 在 10GB 的
Mac mini 虚拟机里被内核 OOM 杀掉。下游只读 message_update 的 type/delta,
完整文本在 message_end。budget_used 改为逐行读。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:47:41 +08:00
bench
665bbef9d0 fix: salty_remote 失败的 Salty 作业不再删除,留给平台侧取证
管理员需要用 salty describe/logs 和 Volcano 记录查失败原因;之前失败后立刻 rm,
平台侧就查不到运行记录了。只有被人为 stop 的作业才清理。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:27:03 +08:00
bench
df64aa85b2 feat: salty_remote 按需加内存:同一阶段容器失败(非停止)过几次,就把申请翻几倍(上限 64Gi)
统一给编译 32Gi 时共享队列只放得下一个编译作业;改为默认值不变,
只有真的被 OOM 杀过(memory.oom.group=1 无声死亡)的阶段重试时才多要内存。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:50:49 +08:00
bench
dd20d199d7 feat: salty_remote 容器每 15 秒记录内存用量(usage.log)
Salty 容器开着 memory.oom.group=1:任一子进程超内存,整个容器被杀,
原因留空、日志为空,看起来和磁盘驱逐一样。记录内存才能分清。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:34:42 +08:00
bench
8a613c63f3 feat: salty_remote 容器每分钟把 /tmp 剩余空间和最大文件记到个人空间,失败时取回
大模型编译的容器会因节点磁盘压力被驱逐(实测本地写到约 39G 时被杀,日志和原因全丢),
这份记录不随容器丢失,用来看清是哪些文件撑爆了本地盘。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:27:40 +08:00
bench
c0237bf006 fix: salty_remote 容器失败时保存 salty describe(失败原因),作业状态写进 meta
作业随后就被删掉,之前只存 logs,OOM/驱逐这类原因看不到。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:11:46 +08:00
bench
6a013d6b00 fix: salty_remote 容器异常退出时补写的 meta 带上操作身份
否则 stageworker 校验回执时报 completed attempt metadata mismatch,
轨迹被暂停(PAUSED_INFRA)而不是让 agent 看到一次普通的阶段失败。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:03:49 +08:00
bench
356fdaa0f8 fix: salty_remote 改用可重试的传输,网络抖动不再废掉轨迹
Mac mini 虚拟机里约 17% 的请求会失败,原传输(salty_client)任何一步失败都判
"副作用不明"并隔离整条轨迹:上传、下载、清理里的 describe 都中过招。改为每步可重试:
作业名每次唯一、重提前先按名字查(回复丢失也不会重复建作业),上传覆盖自己的目录,
查询/下载只读,删除遇 404 即成功;连续失败 30 分钟才判这一步失败(REMOTE_UNAVAILABLE,
普通失败、agent 可重试,板卡阶段仍由回执检查隔离板卡)。清理失败只留垃圾,不影响结果。
超时只发 SIGTERM,不强杀。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:51:43 +08:00
bench
949c5da70c feat: salty_remote 按阶段设内存(memory_by_stage)
轻量阶段不必申请 16Gi;Salty 同时可跑的作业很少时,按需申请能多放几个。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:13:36 +08:00
bench
0cf3c2005f fix: salty_remote 查询作业状态失败时重试,长时间断网才判失败
Mac mini 网络抖动时 salty describe 报"网络错误",原来一次失败就把阶段判成
SIDE_EFFECT_UNKNOWN、整条轨迹被隔离(10-10 06 批次 11 条、04 批次 1 条)。describe
是只读的,现在连续失败 30 分钟内持续重试;轮询间隔 15s→30s,减轻 Salty 压力。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:06:49 +08:00
bench
236766c19b fix: salty_remote 按快照取回新产物,不看修改时间
06 用 copy2 把 HBM 放进 artifacts/,保留了编译时的 mtime,按"本阶段开始后修改"筛会
漏掉它,主控判定时找不到 HBM(G1/G3 unverified)。改为阶段前后比较文件大小和 mtime。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:44:34 +08:00
bench
73303ec61d fix: 所有容器的编译工作目录都放本地 /tmp,05/06 之间经个人空间交接
base.work_dir() 会 resolve 软链接;04 容器里 bench-work 指向网盘,compile.yaml 就写进了
网盘路径,05 在网盘上编译(极慢)且 HBM 不在本地工作目录,回执判"无 HBM"。现在每个
容器 bench-work 都指向 /tmp/bench-work;05、06 跑完把工作目录存回个人空间(跳过三个
无人读的中间 ONNX),06 开跑前取回,跑完照原逻辑删 *_model.onnx。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:46:38 +08:00
bench
f6aec1f419 fix: salty_remote 取回 HBM,并去掉 32MB 上限
主控在本地重算编译回执里 HBM 的哈希(stagerun._completion_status、stageworker 复核),
最终判定也要读 rollout 的 artifacts/*.hbm,所以 05 工作目录里的 HBM、本阶段新写的
artifacts 必须回到主控同一路径;评测预测文件也要核哈希,不能截断。落盘只允许写进
本题目录和编译工作目录。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:32:06 +08:00
bench
e376b593fe feat: 每个阶段整步在 Salty 容器执行(salty_remote,默认关闭)
Mac mini 主控只跑 agent、调度、账本、配额和锁;agent 的每次 bench stage run
(01–08)都在 Salty 起一个容器跑完整的 Stage.run(含查缓存),容器用软链接
复刻老编译机路径,冻结的任务路径和缓存原样可用,跑完只取回阶段目录(≤32MB 的
文件)和板卡回执。配置键 execution.salty_remote,未开启时行为不变。

已验证:本地往返测试;Mac mini → Salty 容器 → 结果取回的真实链路(06-hbm 空跑)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:59:57 +08:00
bench
45b1262f01 feat: Salty 远程编译(05-compile PTQ),默认关闭
把本地工作区里编译上云的改动单独拿出来,放到当前生产代码(c2c52ed)上:
新增 salty_client / salty_stage / salty_stage_worker 及两组测试,并在
stagerun、pipeline、stages/base、s06_hbm 里接线。只有配置里写了
execution.salty.enabled: true 且 stages 含 05-compile 时才生效,
现有配置不受影响。

合到生产代码上时补的衔接:
- 编译次数上限:已记录过提交的 Salty 编译只做找回、绝不重提,不受上限
  阻拦;只准备好、从未提交的照常拒绝(新增 salty_stage.dispatch_recorded)。
- selected() 与 cleanup_state 读取在上下文缺字段时按"未启用 / VERIFIED"处理。

未包含:进程优雅退出(owned_process / namespace_owner 等)和其余板卡侧改动,
仍留在本地工作区。

测试(Linux, python3.10):test_salty_client、test_salty_stage 全过;
stagerun/pipeline/阶段相关的 13 个已有测试与 c2c52ed 结果一致。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:19:48 +08:00
221 changed files with 13574 additions and 777 deletions

View File

@ -35,3 +35,7 @@
任务输入在 `runs/<run_id>/<job_id>/job.json`,轨迹和证据在 `runs/<run_id>/<job_id>/rollouts/<kk>/`;状态数据库由 `BENCH_STATE_DIR` 决定。配置中的工作、缓存和数据路径继续沿用现有环境,不手工重置运行数据或隔离标记。
`bench status --run <run_id>` 查看批次状态;`scripts/audit_rollouts.py --run <run_id>` 查看轨迹验收。任务启动、模型回复、板测通过和最终 SFT 是不同证据,不能相互替代。
## 经验记忆
开始工作前先读 [docs/memory/AGENTS.md](docs/memory/AGENTS.md)。那里有之前的 agent 积累下来的用户偏好、现场事实和踩过的坑,也写了新增记忆的格式和存放规则。

View File

@ -86,7 +86,7 @@ Agent 执行是否结束/超预算独立记录在 `verdict.execution_terminal`
| G1 compile | 是 | .hbm 存在;`hb_model_info` 的 march / 输入 dtype / layout 与 job.json 一致;`hb_verifier` 通过;日志无 ERROR |
| G2 numeric | 否 | 校准外样本逐输出余弦用于诊断,记录 min;编译一致性由 G1 单独核验 |
| G3 task | 是 | 同一 T1、同一预处理和评测器,板卡 HBM 真实输出相对 FP32 的任务指标劣化 ≤ 5%,改善通过;`rel_pct`,不放宽阈值;T1 上记 `pass-screen`,T2 上才 `pass` |
| G4 perf | 否 | 仅 job.json 有 `latency_budget_ms` 才判;mean 与 p95 分开存 |
| G4 perf | 否 | job.json 有 `cpu_fp32_latency_ms`(或显式 `latency_budget_ms`)才判:须快于板上 CPU 跑原始 FP32;mean 与 p95 分开存 |
07-board 记录性能,08-eval 用板卡输出计算任务精度;两者按 job 的 march 领取兼容的空闲板,每块物理板共用一个跨进程锁,凭证只进入这两个受信任阶段的子进程。两个阶段可分别领取同 march 的不同板,实际板名和槽位写入阶段证据。没有兼容板卡时 G3 为 unverified,不回退模拟器冒充上板。
旧 job 的板卡字段为空时按 march 查询当前注册板卡;非空但 march 不匹配则报错。`board-backfill` 复用已有 HBM,补缺失的性能和板端精度,不重编。

View File

@ -1,65 +1,42 @@
# bench agent · 系统提示(追加在 pi 默认系统提示之后)
你负责完成 job.json 固定的部署任务。harness 提供共享资源、实际过程记录与独立验收。探索顺序、实现方式和重试方法由你决定,受本任务总预算约束;其中编译次数是主预算,每条轨迹启动编译的次数有硬上限,用完即不能再编译。
你负责完成 job.json 固定的部署任务:从模型权重出发,交付一个在目标板卡上精度和速度都合格的模型。怎么做由你决定;验收只认平台在板上的实际测量。
## 环境和结果边界
- workspace 是你的可写工作区,可以修改自己的代码、模型副本和私有环境。公共源码、共享工具链、其他任务和运行程序不可修改。
- 本 rollout 的日志、阶段产物、job.json 与任务数据可读;正式提交和阶段证据只读。其他 rollout、状态库、凭据与 oracle 不属于本任务。
- 公共可复用工具位于 `$BENCH_ROOT/harness/adapters/`;`BENCH_ROOT` 已由运行环境提供,可读、可复制修改自己的副本,不是新增模型的必经入口。评判代码仍不作为 Agent 的实现依赖。
- 查找文件先用 `rg --files`,搜索内容用 `rg`;限定在 workspace、任务返回的日志目录或上述公共 adapters 目录。不要执行 `find /` 或遍历整台服务器来寻找代码;路径不可访问时依据工具报错处理。
- 单条 bash 命令最长约 14 分钟,到时只结束这条命令(返回 `Command timed out`),轨迹继续。更久的工作放后台运行(`nohup … > log 2>&1 &`),再分次查看日志;不要用 `sleep` 一次等待超过 10 分钟。
- 现有 Pi legacy 沙箱仍保留 shell 路径限制;工具报限制时按其说明使用明确路径。不要为私有环境安装修改共享工具链。
- 目标板卡、数据、指标与阈值以 job.json 为准。编译失败、图变化、精度下降都如实保留;只有平台的实际测量能作为验收证据。
- 阶段在后台运行;提交返回 handle 后调用 `terminal_exec({"wait_handle": "<handle>"})`,一次等待原阶段完成或原期限终止,不消耗模型轮数反复轮询。不要为等待重提交阶段;诊断时只查看该 handle 返回的日志与对应阶段,不遍历所有历史产物。旧 `bench stage wait <handle> --poll 60` 仍可用于一次短查询,返回 2 仅表示仍在排队或运行。
## 环境
- 当前目录是你的 workspace,可写。本 rollout 的 job.json、日志和阶段产物可读;平台代码、共享工具链、其他 rollout、评测数据和判分结果不属于本任务。
- 你的 bash 跑在控制机上,**没有工具链**(hb_compile、hmct、onnx、onnxruntime、torch 都不在),用到它们的命令走 `bench dev`。单条 bash 命令约 14 分钟会被结束,只结束这一条。
- 工具链文档:`oe-doc <query>` 和 `.horizon/skills/`。
## compile.yaml 里你能改的旋钮(PTQ · hb_compile 3.5.3 · hmct 2.6.5,已对源码核实)
harness 钉死 `model_parameters`(onnx / march / working_dir / 输出前缀),你写的 yaml 里这几项会被覆盖。其余三段照下面填,写进 `compile.yaml`(你的 cwd 就是 workspace/),然后 `bench stage run compile --config compile.yaml`(先 `bench stage run calibrate` 也行,它会把你的 yaml 与钉死项合并并落盘)。
## 等待不花轮数
`bench dev` 和正式阶段都在后台跑,提交后返回 handle。`terminal_exec({"wait_handle": "<handle>"})` 一次等到结束,不管等多久都只算一轮。用 sleep 或反复查看状态来等,每查一次都算一轮,还会占上下文。
```yaml
input_parameters: # 默认 featuremap/NCHW/无归一化,预处理在主机侧(评测器口径一致);一般不用动
input_type_rt: featuremap # featuremap | rgb | bgr | nv12 | gray | yuv444
input_type_train: featuremap
input_layout_train: NCHW
# mean_value / scale_value / std_value 仅当 input_type 不是 featuremap 时有意义
calibration_parameters:
calibration_type: default # default | max | kl | mix ← 首选旋钮。default = 自动搜索;掉点大时试 kl 或 mix
# (还有 skip = 完全不校准,只给预量化模型用;普通 PTQ 选它必崩 G2/G3,白烧一次编译)
max_percentile: 0.99999 # 只对 max 有效,截掉激活长尾(0.9999–1.0)
per_channel: true # 权重逐通道量化,对深度可分离卷积(MobileNet/EfficientNet)常有帮助
run_on_cpu: "node_a,node_b" # 把敏感节点放 CPU(float),逗号分隔 ONNX 节点名;run_on_bpu 反之
optimization: set_model_output_int16 # set_model_output_int8 | set_model_output_int16(其余以 hmct 报错为准)
quant_config: # 精细精度控制(dict 或 json 路径)。qtype: int8 | int16 | float16 | float32
model_config: { all_node_type: int8, model_output_type: int16 }
op_config: { Softmax: { qtype: float16 }, LayerNormalization: { qtype: float16 } } # 按算子类型
node_config: { "/features/features.8/features.8.2/Mul": { qtype: int16 } } # 按节点名(看 hb_compile 日志里的逐节点余弦表挑最差的)
compiler_parameters:
compile_mode: latency # latency | bandwidth | balance
optimize_level: O2 # O0 | O1 | O2 —— hbdk4 后端只接受这三个,写 O3 会在 yaml 校验阶段直接报错
jobs: 8
## 开发环境:`bench dev`
```
诊断信号在哪:`terminal_exec` 等待结束后给你 stdout/stderr 路径;hb_compile 日志末尾有逐节点 `Calibrated Cosine / Quantized Cosine` 表和模型输出余弦。余弦偏低时可检查敏感节点、尝试 `node_config` 提到 int16;最终任务精度以 G3 实测与 job 中的阈值为准。
bench dev "python check.py" # 在带完整工具链的容器里跑一条命令,cwd 是 workspace
bench dev --timeout 7200 -- python export.py # 长任务给足时限(最多 43200 秒;容器启动约 1 分钟)
bench dev --board -- python3 run.py # 把当前目录传到本题的板卡上运行,可用 BPU
```
- `python`、`hb_compile`、`hb_verifier`、`hb_model_info` 来自 OE 工具链(含 hmct、onnx、onnxruntime);torch 用 `/home/ming01.wang/toolchains/bench-venv/bin/python`,或 job.json 里 `model_runtime.python` 指定的环境(OpenMMLab 模型的环境里装好了 mmdet/mmpose/mmseg,官方配置在包里)。只读可见:官方源码在 `/home/ming01.wang/bench-cache/sources/`,权重在 `/home/ming01.wang/bench-cache/weights/`(`bench stage run fetch` 返回本题的路径),其他 Python 环境在 `/home/ming01.wang/bench-cache/venvs/`。
- 校准图片:`$BENCH_CALIB_IMAGES`,是训练集原图,和评测集不重叠;`$BENCH_CALIB_IMAGES/../images.json` 列出顺序和来源。预处理以 job.json 的 `model_spec.preprocess` 为准。
- 同步:本机改过的文件在下一次 `bench dev` 开始时传上去;命令里新建或改动的小文件(单个 ≤16 MiB)拷回本机,大文件(图、npy、hbm)只留在开发环境,输出末尾会列出来。
- 板上:有 python3、numpy 和 hbm_runtime(`m = hbm_runtime.HB_HBMRuntime('x.hbm')`,`m.model_names`、`m.input_names[name]`、`m.input_shapes[name]`,`m.run({name: {输入名: 数组}})`);写到 `$BENCH_OUT` 的文件会拉回到结果目录的 `output/`。一次最多 30 分钟,板卡和正式阶段共用。
- 开发环境和板上怎么试都不计编译次数,结果也不作为验收依据。
## 共享资源与正式验收
原阶段按需要调用,不要求探索按编号顺序进行。执行某一步仍需它实际消费的输入;使用结果前等待完成。
```
bench stage run fetch # 获取或复用正式权重
bench stage run export # 导出 ONNX
bench stage run baseline # 固定 T1 的独立 FP32 参考
bench stage run compile --config compile.yaml # 编译,含 04 配置准备
bench stage run fetch # 正式权重
bench stage run export # 平台参考导出:图不给你,用来核对你的图的输入输出
bench stage run baseline # 独立的 FP32 基线
bench stage run compile --config compile.yaml # 正式编译
bench stage run hbm # 收集并检查编译产物
bench stage run board # 板端性能记录
bench stage run eval # 板端 T1 精度与 G2 诊断
bench stage run board # 板上延迟
bench stage run eval # 板上任务精度
```
随后调用 `terminal_exec({"wait_handle": "<handle>"})` 等待刚提交的阶段。
`--config` 在 workspace 内;目标板卡、产物路径和输出目录由 Worker 固定,配置记录实际使用值。共享工具链和板卡通过受管执行工具获取资源;若任务开放 terminal 命令模式,自写命令通过 terminal_exec 运行;仅阶段模式下该工具只提供等待。连接凭据由平台管理。查看 wait 返回的 stdout/stderr/meta,根据失败证据决定下一步;性能记录失败仍可尝试精度评测。
- compile.yaml 是 hb_compile 的 PTQ 配置(hb_compile 3.5.3 · hmct 2.6.5),放在 workspace 里,字段以 `oe-doc` 为准。`model_parameters.onnx_model` 和 `calibration_parameters.cal_data_dir` 必填,写你在开发环境里做的图和校准 npy 目录(workspace 内的路径);march、working_dir、输出前缀由平台固定。
- 评测器在主机侧做完预处理,按 featuremap(NCHW float32)把数据喂给模型;校准目录里每个 .npy 是一个模型输入,形状同 input_spec,float32。
- 这一版和文档不一致的地方:`optimize_level` 只接受 O0–O2(O3 会被拒);`quant_config` 分 `model_config`、`op_config`、`node_config` 三段,qtype 取 int8、int16、float16、float32。
- 你的图的输入输出(个数、顺序、类型、形状、含义)要符合任务说明末尾的输入输出约定,基线、上板和评测才可比;不一致时编译前就会被拒并列出期望值,不占编译次数。
- 阶段失败时看等待结果里的 stdout/stderr/meta 再决定下一步;板上延迟记录失败时仍可以跑精度评测。
## 结束说明
用自然语言说明实际完成内容、测量范围、失败及未验证事项;不要求调用 claim 或使用规定终态词。总轮数、token 和墙钟预算仍是硬上限,收到收尾提醒时停止新工作并给出真实说明。
G1 是编译/产物检查,不是板端测量。精度结论说明样本集、样本数、指标、FP32 与板端值及固定阈值;标准误只作诊断,不放宽阈值。不能把子集筛查概括为全数据集无损。自写推理的 HBM 加载/输出关联若未被平台确认,明确板端预测来源未自动核实。缺材料时保留实际错误,不猜测失败原因。
## 工具链参考
`.horizon/skills/` 和 `oe-doc <query>` 提供工具链文档。共享执行环境由 job 和 Worker 选择;自己的试验依赖放在 workspace 私有环境。
最后用自然语言如实说明实际做了什么、平台实测结果是什么、哪些没有验证。总轮数、token 和墙钟预算是硬上限,收到收尾提醒时停止新工作。

View File

@ -1 +1 @@
15
25

View File

@ -68,8 +68,8 @@ function makeGuard(env) {
const allowRead = [
WS, RO,
path.join(JOB, "job.json"), path.join(JOB, "data"),
path.join(BENCH, "harness", "adapters"),
path.join(BENCH, "data"), path.join(BENCH, "cache"), path.join(BENCH, "bin"), path.join(BENCH, "agent", "oe-doc.sh"),
path.join(BENCH, "agent", "speed_ref"), // default-config latency per job (scripts/speed_ref.py)
path.join(PROJ, ".horizon"), path.join(PROJ, "AGENTS.md"),
];
if (MODE === "repair") allowRead.push(path.join(JOB, "oracle"));

View File

@ -32,8 +32,8 @@ expect("read oracle (e2e)", e2e.judgePath("../../../oracle/result.json"), "block
expect("read oracle (repair)", repair.judgePath("../../../oracle/result.json"), "allow");
expect("read sibling claim", e2e.judgePath("../../00/claim.json"), "block");
expect("read sibling via rollouts/", e2e.judgePath("../../00/workspace/compile.yaml"), "block");
expect("read public adapter", e2e.judgePath(B + "/harness/adapters/segnext_tiny.py"), "allow");
expect("copy public adapter", e2e.judgeCommand("cp " + B + "/harness/adapters/segnext_tiny.py ./model.py"), "allow");
expect("read platform adapter", e2e.judgePath(B + "/harness/adapters/segnext_tiny.py"), "block");
expect("copy platform adapter", e2e.judgeCommand("cp " + B + "/harness/adapters/segnext_tiny.py ./model.py"), "block");
expect("write public adapter", e2e.judgePath(B + "/harness/adapters/segnext_tiny.py", { write: true }), "block");
expect("read harness", e2e.judgePath(B + "/harness/gates.py"), "block");
expect("read state sqlite", e2e.judgePath(B + "/state/jobs.sqlite"), "block");
@ -88,6 +88,8 @@ expect("url", e2e.judgeCommand("echo https://x.y/z"), "allow");
expect("read own rollout.json", e2e.judgeCommand("cat ../rollout.json"), "allow");
expect("ls ..(own rollout)", e2e.judgeCommand("ls .."), "allow");
expect("ls ../.. (rollouts dir)", e2e.judgeCommand("ls ../.."), "block");
expect("read speed reference", e2e.judgeCommand("cat " + B + "/agent/speed_ref/cls--m--nash-e--ptq--int8.json"), "allow");
expect("other agent files stay closed", e2e.judgeCommand("cat " + B + "/agent/SYSTEM.md"), "block");
expect("repair reads oracle yaml", repair.judgeCommand("cp ../../../oracle/stages/04-calibrate/compile.yaml ./compile.yaml"), "allow");
async function extensionCases() {
@ -119,7 +121,7 @@ async function extensionCases() {
for (const command of ["find / -maxdepth 6 -name harness", "find '/' -name harness", "find -L / -name harness", "true && /usr/bin/find / -name harness"]) {
expect(policy + " root scan " + command, (await handler({toolName: "bash", input: {command}})) || null, "block");
}
for (const command of ["rg 'find /' .", "find . -name harness", "find . -name '/'", "find " + bench + "/harness/adapters -name '*.py'"]) {
for (const command of ["rg 'find /' .", "find . -name harness", "find . -name '/'", "find ./src -name '*.py'"]) {
expect(policy + " scoped search " + command, (await handler({toolName: "bash", input: {command}})) || null, "allow");
}
expect(policy + " shared compile resource", await handler({ toolName: "bash", input: { command: "hb_compile -c x.yaml" } }), "block");

View File

@ -10,7 +10,7 @@
* 禁止直接调 hb_compile 等重命令(走 bench stage run);`sleep 100+`、`git push`。
*
* 白名单(e2e):workspace/(可写)· 本 rollout 根(agent/ stages/ handles/ rollout.json)· <job>/job.json · <job>/data
* · bench/data · bench/cache · bench/bin · bench/agent/oe-doc.sh · <proj>/.horizon · <proj>/AGENTS.md ;repair 额外 <job>/oracle。
* · bench/data · bench/cache · bench/bin · bench/agent/oe-doc.sh · bench/agent/speed_ref · <proj>/.horizon · <proj>/AGENTS.md ;repair 额外 <job>/oracle。
* 项目树内其余一律拒(别的 rollout、harness/、state/、export/、别的 job);项目树外只拒 ~/.pi、~/toolchains、bench/.env.local。
*
* 每次拒绝写一行到 <rollout>/agent/guard.log(L4 导出统计"越界尝试次数")。第二道保险是文件系统权限。
@ -83,7 +83,7 @@ log("init", JSON.stringify({ mode: MODE, deny_extra: DENY_EXTRA, allow_extra: AL
const FORBIDDEN_CMDS = ["hb_compile", "hb_mapper", "hb_verifier", "hrt_model_exec", "hb_perf",
"ssh", "scp", ...(PRIVATE_JAIL ? [] : ["rsync", "wget", "curl", "pip", "pip3", "conda", "npm"])];
const WRITE_PATTERNS: RegExp[] = [
/\bsleep\s+[0-9]{3,}/, // 用 bench stage wait,不要 sleep 等编译
/\bsleep\s+[0-9]{3,}/, // 用 terminal_exec wait_handle,不要 sleep 等编译
/\bgit\s+push\b/,
];
@ -162,7 +162,7 @@ export default function (pi: ExtensionAPI) {
const cmd: string = input.command ?? "";
if (rootFind(cmd)) {
log("deny-bash-root-find", cmd.slice(0, 500));
return { block: true, reason: "不要从 / 扫描服务器;在 workspace、任务返回的日志目录或 $BENCH_ROOT/harness/adapters 内限定搜索。" };
return { block: true, reason: "不要从 / 扫描服务器;在 workspace 或任务返回的日志目录内限定搜索。" };
}
// The private mount jail enforces filesystem boundaries. The lexer here is
// only a diagnostic for direct shared-resource commands, never isolation.

View File

@ -0,0 +1,106 @@
/**
* terminal-core — terminal_exec 的执行核心(纯 node,无 runner 依赖):Pi 的 terminal.ts 和 OpenCode 的
* agent/opencode/bench.ts 共用,两边只各自声明参数 schema。返回 Worker 回执;失败时抛出带回执原文的 Error。
*/
const fs = require('node:fs');
const path = require('node:path');
const crypto = require('node:crypto');
const read = (file) => JSON.parse(fs.readFileSync(file, 'utf8'));
function context(rd) {
const metadata = rd && fs.existsSync(path.join(rd, 'rollout.json')) ? read(path.join(rd, 'rollout.json')) : {};
const commands = metadata.natural_agent_version === 'natural-agent-v1' && metadata.jail_policy === 'private-home';
return {metadata, commands};
}
async function run(rd, params, signal) {
const {metadata, commands} = context(rd);
if (!rd) throw new Error('Managed terminal requires a task rollout');
const waiting = Object.hasOwn(params, 'wait_handle');
if (waiting && (Object.keys(params).length !== 1 || !/^[a-zA-Z0-9_-]+$/.test(params.wait_handle))) {
throw new Error('wait_handle must be a local handle and cannot include command parameters');
}
if (!waiting && !commands) throw new Error('Command execution is disabled for this task');
if (!waiting && (!params.command || !params.target || !Number.isFinite(params.timeout))) throw new Error('command, target and timeout are required');
const id = waiting ? params.wait_handle : 'terminal-' + crypto.randomUUID();
const dir = path.join(rd, waiting ? 'stages/_queue' : 'handles', id);
if (!waiting) {
fs.mkdirSync(dir);
fs.writeFileSync(path.join(dir, 'request.tmp'), JSON.stringify({stage: 'terminal', ...params}));
fs.renameSync(path.join(dir, 'request.tmp'), path.join(dir, 'request.json'));
}
const monotonic = () => Number(process.hrtime.bigint()) / 1e9;
const admissionUntil = monotonic() + 1; // Worker polls new stage tickets every 0.5s.
// The rollout's worker runs one ticket at a time, so a submitted ticket can wait behind a long one
// (10-20: a baseline started during a 40-minute bench dev compile answered "Unknown protected stage handle").
const submitted = waiting && fs.existsSync(path.join(rd, 'handles', id, 'request.json'));
for (;;) {
if (signal?.aborted) throw new Error('Terminal wait cancelled; execution owner performs cleanup');
try {
let result, receiptClosed = !waiting;
if (waiting) {
let state;
try { state = read(path.join(rd, 'execution.json')); }
catch { throw new Error('Protected execution state unavailable'); }
let operation;
try { operation = read(path.join(dir, 'operation.json')); }
catch (error) {
if (error.code !== 'ENOENT' || (monotonic() >= admissionUntil && !submitted)) throw new Error('Unknown protected stage handle');
}
const ledger = state.operations?.[id];
if (operation && ledger) {
const keys = ['operation_id', 'payload_sha256', 'execution_id', 'epoch'];
const matches = (value) => value && keys.every(key => operation[key] !== undefined && operation[key] === value[key]);
if (!matches(ledger) || operation.operation_id !== id || operation.execution_id !== state.execution_id ||
metadata.execution_id !== state.execution_id) throw new Error('Stage operation identity mismatch');
try { result = read(path.join(dir, 'status.json')); }
catch (error) { if (error.code !== 'ENOENT') throw error; }
if (result && !matches(result)) throw new Error('Stage receipt identity mismatch');
receiptClosed = operation.state === 'DONE' && ledger.state === 'DONE';
if (operation.epoch !== state.epoch && !(result?.state === 'DONE' && operation.state === 'DONE')) {
throw new Error('Stage operation owner fenced');
}
if (result?.state !== 'DONE') {
if (state.cancel_requested || state.cleanup_state === 'QUARANTINED' || !['ACTIVE', 'PAUSED_INFRA'].includes(state.execution_state)) {
throw new Error(state.stop_reason || 'Execution stopped');
}
const phase = state.phases?.[id];
let deadline = state.deadline_monotonic;
if (phase) {
if (phase.epoch !== state.epoch || phase.boot_id !== state.boot_id) throw new Error('Stage phase identity mismatch');
const phaseDeadline = phase.state === 'QUEUED' ? phase.queue_deadline_monotonic : phase.execution_deadline_monotonic;
if (phase.state !== 'DONE') deadline = Math.min(deadline, phaseDeadline);
} else if (operation.state === 'PREPARING') {
// Before request preparation finishes there is no phase yet;
// do not invent/reset one. Once saved, use its original policy.
let request;
try { request = read(path.join(dir, 'request.json')); }
catch (error) { if (error.code !== 'ENOENT') throw error; }
if (request) deadline = Math.min(deadline, operation.received_monotonic + state.config.phases[request.stage].queue_deadline_s);
} else throw new Error('Stage phase missing');
if (!Number.isFinite(deadline) || monotonic() >= deadline) throw new Error('Stage or execution deadline exceeded');
}
} else if (monotonic() >= admissionUntil) {
if (!submitted) throw new Error('Unknown protected stage handle');
let ticket; // written by the worker when it rejects a ticket before admission (or forged: never a success)
try { ticket = read(path.join(rd, 'handles', id, 'status.json')); } catch {}
if (ticket?.state === 'DONE' && !operation) throw new Error('Stage ticket rejected: ' + JSON.stringify(ticket));
if (state.cancel_requested || state.cleanup_state === 'QUARANTINED' || !['ACTIVE', 'PAUSED_INFRA'].includes(state.execution_state)) {
throw new Error(state.stop_reason || 'Execution stopped');
}
if (!(monotonic() < state.deadline_monotonic)) throw new Error('Stage or execution deadline exceeded');
}
} else result = read(path.join(dir, 'status.json'));
if (result?.state === 'DONE' && receiptClosed) {
// Pi marks a tool failure from a thrown error, not a returned isError
// field. Preserve the actual receipt in that real error message.
if (result.result !== 'OK' && !(waiting && result.result === 'SKIPPED')) throw new Error(JSON.stringify(result));
return result;
}
} catch (error) { if (error.code !== 'ENOENT') throw error; }
await new Promise(resolve => setTimeout(resolve, 250));
}
}
module.exports = {context, run};

View File

@ -0,0 +1,44 @@
// node agent/extensions/terminal-core.test.js — the core shared by Pi's terminal.ts and OpenCode's bench.ts.
const assert = require('node:assert');
const fs = require('node:fs');
const os = require('node:os');
const path = require('node:path');
const core = require('./terminal-core.js');
const rd = fs.mkdtempSync(path.join(os.tmpdir(), 'terminal-core-'));
fs.mkdirSync(path.join(rd, 'handles'));
fs.writeFileSync(path.join(rd, 'rollout.json'), JSON.stringify({natural_agent_version: 'natural-agent-v1', jail_policy: 'private-home'}));
// Plays the worker: answers the first new ticket with the given receipt.
function answer(receipt) {
const timer = setInterval(() => {
for (const id of fs.readdirSync(path.join(rd, 'handles'))) {
const dir = path.join(rd, 'handles', id);
if (fs.existsSync(path.join(dir, 'request.json')) && !fs.existsSync(path.join(dir, 'status.json'))) {
assert.strictEqual(JSON.parse(fs.readFileSync(path.join(dir, 'request.json'))).stage, 'terminal');
fs.writeFileSync(path.join(dir, 'status.json'), JSON.stringify(receipt));
clearInterval(timer);
}
}
}, 20);
}
(async () => {
assert.strictEqual(core.context(rd).commands, true);
await assert.rejects(core.run(undefined, {}), /requires a task rollout/);
await assert.rejects(core.run(rd, {command: 'ls'}), /command, target and timeout are required/);
answer({state: 'DONE', result: 'OK', stdout: 'hi'});
assert.strictEqual((await core.run(rd, {target: 'development', command: 'echo hi', timeout: 5})).stdout, 'hi');
answer({state: 'DONE', result: 'FAILED', exit_code: 2});
await assert.rejects(core.run(rd, {target: 'development', command: 'false', timeout: 5}), /"exit_code":2/);
await assert.rejects(core.run(rd, {wait_handle: 'h1'}), /Protected execution state unavailable/);
await assert.rejects(core.run(rd, {wait_handle: 'h1', command: 'ls'}), /cannot include command parameters/);
fs.writeFileSync(path.join(rd, 'rollout.json'), '{}');
await assert.rejects(core.run(rd, {target: 'development', command: 'ls', timeout: 5}), /Command execution is disabled/);
fs.rmSync(rd, {recursive: true});
console.log('terminal-core ok');
})();

View File

@ -1,14 +1,12 @@
/** One SDK call waits for a protected worker receipt; no model polling. */
import fs from 'node:fs';
import path from 'node:path';
import crypto from 'node:crypto';
import { createRequire } from 'node:module';
import { Type } from '@sinclair/typebox';
const core = createRequire(__filename)('./terminal-core.js'); // shared with agent/opencode/bench.ts
export default function (pi: any) {
const rd = process.env.BENCH_ROLLOUT_DIR;
const read = (file: string) => JSON.parse(fs.readFileSync(file, 'utf8'));
const metadata = rd && fs.existsSync(path.join(rd, 'rollout.json')) ? read(path.join(rd, 'rollout.json')) : {};
const commands = metadata.natural_agent_version === 'natural-agent-v1' && metadata.jail_policy === 'private-home';
const {commands} = core.context(rd);
const wait = Type.String({pattern: '^[a-zA-Z0-9_-]+$', description: 'Existing stage handle from this rollout; no new submission'});
pi.registerTool({
name: 'terminal_exec', label: 'Managed terminal',
@ -23,79 +21,9 @@ export default function (pi: any) {
source: Type.Optional(Type.String({description: 'Workspace subdirectory to freeze for board/formal execution; defaults to .'})),
}, {additionalProperties: false}) : Type.Object({wait_handle: wait}, {additionalProperties: false}),
async execute(_id: string, params: any, signal: AbortSignal) {
if (!rd) throw new Error('Managed terminal requires a task rollout');
const waiting = Object.hasOwn(params, 'wait_handle');
if (waiting && (Object.keys(params).length !== 1 || !/^[a-zA-Z0-9_-]+$/.test(params.wait_handle))) {
throw new Error('wait_handle must be a local handle and cannot include command parameters');
}
if (!waiting && !commands) throw new Error('Command execution is disabled for this task');
if (!waiting && (!params.command || !params.target || !Number.isFinite(params.timeout))) throw new Error('command, target and timeout are required');
const id = waiting ? params.wait_handle : 'terminal-' + crypto.randomUUID();
const dir = path.join(rd, waiting ? 'stages/_queue' : 'handles', id);
if (!waiting) {
fs.mkdirSync(dir);
fs.writeFileSync(path.join(dir, 'request.tmp'), JSON.stringify({stage: 'terminal', ...params}));
fs.renameSync(path.join(dir, 'request.tmp'), path.join(dir, 'request.json'));
}
const monotonic = () => Number(process.hrtime.bigint()) / 1e9;
const admissionUntil = monotonic() + 1; // Worker polls new stage tickets every 0.5s.
for (;;) {
if (signal?.aborted) throw new Error('Terminal wait cancelled; execution owner performs cleanup');
try {
let result, receiptClosed = !waiting;
if (waiting) {
let state;
try { state = read(path.join(rd, 'execution.json')); }
catch { throw new Error('Protected execution state unavailable'); }
let operation;
try { operation = read(path.join(dir, 'operation.json')); }
catch (error: any) {
if (error.code !== 'ENOENT' || monotonic() >= admissionUntil) throw new Error('Unknown protected stage handle');
}
const ledger = state.operations?.[id];
if (operation && ledger) {
const keys = ['operation_id', 'payload_sha256', 'execution_id', 'epoch'];
const matches = (value: any) => value && keys.every(key => operation[key] !== undefined && operation[key] === value[key]);
if (!matches(ledger) || operation.operation_id !== id || operation.execution_id !== state.execution_id ||
metadata.execution_id !== state.execution_id) throw new Error('Stage operation identity mismatch');
try { result = read(path.join(dir, 'status.json')); }
catch (error: any) { if (error.code !== 'ENOENT') throw error; }
if (result && !matches(result)) throw new Error('Stage receipt identity mismatch');
receiptClosed = operation.state === 'DONE' && ledger.state === 'DONE';
if (operation.epoch !== state.epoch && !(result?.state === 'DONE' && operation.state === 'DONE')) {
throw new Error('Stage operation owner fenced');
}
if (result?.state !== 'DONE') {
if (state.cancel_requested || state.cleanup_state === 'QUARANTINED' || !['ACTIVE', 'PAUSED_INFRA'].includes(state.execution_state)) {
throw new Error(state.stop_reason || 'Execution stopped');
}
const phase = state.phases?.[id];
let deadline = state.deadline_monotonic;
if (phase) {
if (phase.epoch !== state.epoch || phase.boot_id !== state.boot_id) throw new Error('Stage phase identity mismatch');
const phaseDeadline = phase.state === 'QUEUED' ? phase.queue_deadline_monotonic : phase.execution_deadline_monotonic;
if (phase.state !== 'DONE') deadline = Math.min(deadline, phaseDeadline);
} else if (operation.state === 'PREPARING') {
// Before request preparation finishes there is no phase yet;
// do not invent/reset one. Once saved, use its original policy.
let request;
try { request = read(path.join(dir, 'request.json')); }
catch (error: any) { if (error.code !== 'ENOENT') throw error; }
if (request) deadline = Math.min(deadline, operation.received_monotonic + state.config.phases[request.stage].queue_deadline_s);
} else throw new Error('Stage phase missing');
if (!Number.isFinite(deadline) || monotonic() >= deadline) throw new Error('Stage or execution deadline exceeded');
}
} else if (monotonic() >= admissionUntil) throw new Error('Unknown protected stage handle');
} else result = read(path.join(dir, 'status.json'));
if (result?.state === 'DONE' && receiptClosed) {
// Pi marks a tool failure from a thrown error, not a returned isError
// field. Preserve the actual receipt in that real error message.
if (result.result !== 'OK' && !(waiting && result.result === 'SKIPPED')) throw new Error(JSON.stringify(result));
return {content: [{type: 'text', text: JSON.stringify(result)}], details: result};
}
} catch (error: any) { if (error.code !== 'ENOENT') throw error; }
await new Promise(resolve => setTimeout(resolve, 250));
}
// Pi marks a tool failure from a thrown error, not a returned isError field; core throws with the receipt.
const result = await core.run(rd, params, signal);
return {content: [{type: 'text', text: JSON.stringify(result)}], details: result};
},
});
}

View File

@ -0,0 +1,17 @@
## 输入输出约定(单目深度:Depth Anything / MiDaS / DPT / ZoeDepth / UniDepth / Metric3D / DepthPro)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出,在 NYUv2 上评测。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,形状见 job.json 的 `input_spec`。预处理在主机侧,图里不要再做;缩放方式、通道顺序、mean/std 等数值见 job.json 的 `model_spec.preprocess`。
**输出**:1 个,`[1, H, W]` float32(没有通道维),H×W 等于输入的 H×W,只有 Metric3D v2 是 `[1, 516, 516]`。数值必须有限、非负,含义随模型家族不同:
| 家族 | 输出是什么 |
|---|---|
| Depth Anything v1/v2(相对)、MiDaS、DPT | 官方网络 `forward` 的输出:相对逆深度(视差),越近越大,不是米 |
| Depth Anything v2 metric | 官方 `metric_depth` 版网络 `forward` 的输出:米制深度(sigmoid 头 × max_depth) |
| ZoeDepth | 官方模型输出字典里的 `metric_depth`,取第 0 个通道:米制深度 |
| UniDepth | 官方输出 3D 点云的 z 分量(`points[:, -1]`):米制深度 |
| Metric3D | 官方输出 `prediction` 的第 0 个通道,乘以官方从规范焦距换算到真实焦距的比例:米制深度 |
| DepthPro | 官方 FOV 头算出焦距后,由规范逆深度换算的米制深度:`1 / clamp(逆深度 × W / f_px, 1e-4, 1e4)` |
**平台后处理**:先把输出插值到原图大小(插值方式按各家官方的做法),再在 NYUv2 的有效区域内,对每张图用最小二乘拟合一个 scale 和 shift,然后计算 AbsRel 等指标。FP32 基线也用完全相同的方法,所以输出的绝对尺度不影响结果,但输出必须和上表的量成线性关系。

View File

@ -0,0 +1,8 @@
## 输入输出约定(MIT EfficientViT 分类)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。
**输入**:1 个,`1x3x224x224` float32。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):RGB,短边双三次缩放到 236,中心裁出 224,`/255` 后按 ImageNet 的 mean/std 归一化。
**输出**:1 个,`[1, 1000]`,是官方 `create_cls_model(...)(x)` 的 logits,类别顺序是 ImageNet-1K 的标准顺序。做不做 softmax 都可以,平台只按大小排序。
**平台后处理**:按分数从大到小排序,算 top-1 和 top-5。

View File

@ -0,0 +1,8 @@
## 输入输出约定(MIT EfficientViT 语义分割)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x512x1024` float32。预处理在主机侧,图里不要再做:RGB,用 cv2 双三次插值直接拉伸到 1024×512,`/255` 后按 ImageNet 的 mean/std 归一化。
**输出**:1 个,`[1, C, h, w]`,是官方分割模型 `forward` 的原始 logits。C 是类别数(Cityscapes 19,ADE20K 150,见 job.json 的 `dataset`),h、w 是官方 head 的分辨率,不用在图里放大。不做 softmax,也不在图里 argmax。
**平台后处理**:双三次插值(align_corners=False)放大到原图大小,再取 argmax。

View File

@ -0,0 +1,18 @@
## 输入输出约定(局部特征:SuperPoint / DISK / ALIKED / D2-Net / R2D2 / DeDoDe v2 / Key.Net+HardNet)
评测时平台在主机上做预处理,把图喂给你的模型,再用各家官方的稀疏后处理解读输出,在 HPatches 上评测匹配效果(每张图最多 1024 个点)。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,形状见 job.json 的 `input_spec`(480×640;SuperPoint 和 Key.Net 是 1 通道灰度图,其余是 3 通道)。预处理在主机侧,图里不要再做:cv2 线性插值缩放到 640×480;颜色、`/255`、mean/std 等数值见 job.json 的 `model_spec.preprocess`。
**输出**:按下表,顺序必须一致:
| 模型 | 输出 |
|---|---|
| SuperPoint | 2 个。`scores [1,480,640]`:关键点头 65 通道做 softmax,去掉 dustbin,再把每个 8×8 格子展开成全分辨率;`descriptors [1,256,60,80]`:描述子头输出,沿通道做 L2 归一化。这和官方 SuperPoint 网络在 NMS 之前的两个量一致 |
| DISK | 1 个。`[1,129,480,640]`:官方 `unet(x)` 的原始输出,前 128 通道是描述子,最后 1 通道是关键点热力图 |
| ALIKED | 3 个,在图里跑完官方的 dense map、DKD 和描述子头:`keypoints [1,1024,2]`(像素坐标 x, y)、`scores [1,1024]`、`descriptors [1,1024,128]` |
| D2-Net | 1 个。`[1,512,119,159]`:官方 `dense_feature_extraction` 的输出 |
| R2D2 | 3 个,都是官方网络输出:`descriptors [1,128,480,640]`、`reliability [1,1,480,640]`、`repeatability [1,1,480,640]` |
| DeDoDe v2 | 2 个。`keypoint_logits [1,1,480,640]`:官方 detector 的输出;`description_grid [1,256,480,640]`:官方 descriptor 的输出 |
| Key.Net+HardNet | 3 个,在图里跑完官方三层金字塔检测、15×15 NMS、取前 1024 个点、32×32 取块和 HardNet 描述:`keypoints [1,1024,2]`(像素坐标)、`scores [1,1024]`(无效点为 0)、`descriptors [1,1024,128]` |
**平台后处理**:各家官方的稀疏化(NMS、阈值、取前 1024 个点、采样描述子、L2 归一化等),然后做匹配评测。在图里已经输出稀疏结果的模型,平台只去掉分数 ≤ 0 的点。

View File

@ -0,0 +1,8 @@
## 输入输出约定(光流:RAFT / GMFlow / UniMatch / GMA / SEA-RAFT / Flow1D / FlowFormer / FlowNet2 / MemFlow)
评测时平台在主机上做预处理,把一对图喂给你的模型,再用平台自己的后处理解读输出,在 KITTI 上评测。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x6xHxW` float32(H、W 见 job.json 的 `input_spec`)。两帧 RGB 在通道维拼在一起:前 3 个通道是第一帧,后 3 个通道是第二帧。两帧各自双线性缩放到 H×W(align_corners=False,无抗锯齿)。数值范围和归一化按各家官方的数据加载方式,见 job.json 的 `model_spec.preprocess`:有的家族在官方 `forward` 里自己做 ImageNet 归一化,输入就是 0–255;RAFT 一类输入是归一化到 [-1, 1] 的值。
**输出**:1 个,`[1, 2, H, W]`,是官方模型最后一次迭代的光流 `(u, v)`。单位是输入图(H×W)上的像素位移,u 是水平方向,v 是竖直方向。只输出最终结果,不输出中间迭代。
**平台后处理**:双线性插值回原图大小,u 乘以 原图宽/W,v 乘以 原图高/H,再在 KITTI 的有效像素上计算 EPE 和 F1。

View File

@ -0,0 +1,141 @@
{
"aliked": "features.md",
"atss_r50_fpn": "mmdet_dense_common.md",
"bisenetv1_r18": "mmseg_common.md",
"bisenetv2": "mmseg_common.md",
"conditional_detr_r50": "mmdet_query_iseg.md",
"d2_net": "features.md",
"dab_detr_r50": "mmdet_query_iseg.md",
"ddrnet_23": "mmseg_common.md",
"ddrnet_23_slim": "mmseg_common.md",
"dedode_v2": "features.md",
"deeplabv3_resnet101": "mmseg_common.md",
"deeplabv3_resnet50": "mmseg_common.md",
"deeplabv3plus_resnet101": "mmseg_common.md",
"deeplabv3plus_resnet50": "mmseg_common.md",
"deformable_detr_r50": "mmdet_query_iseg.md",
"depth_anything_v1_base": "depth.md",
"depth_anything_v1_large": "depth.md",
"depth_anything_v1_small": "depth.md",
"depth_anything_v2_base": "depth.md",
"depth_anything_v2_large": "depth.md",
"depth_anything_v2_metric_hypersim_base": "depth.md",
"depth_anything_v2_metric_hypersim_large": "depth.md",
"depth_anything_v2_metric_hypersim_small": "depth.md",
"depth_anything_v2_metric_vkitti_base": "depth.md",
"depth_anything_v2_metric_vkitti_large": "depth.md",
"depth_anything_v2_metric_vkitti_small": "depth.md",
"depth_anything_v2_small": "depth.md",
"depthpro": "depth.md",
"detr_r50": "mmdet_query_iseg.md",
"disk": "features.md",
"dpt_hybrid": "depth.md",
"dpt_large": "depth.md",
"efficientvit_b0": "efficientvit_common.md",
"efficientvit_b1": "efficientvit_common.md",
"efficientvit_b2": "efficientvit_common.md",
"efficientvit_b3": "efficientvit_common.md",
"efficientvit_seg_b0": "efficientvit_seg.md",
"efficientvit_seg_b1": "efficientvit_seg.md",
"efficientvit_seg_b2": "efficientvit_seg.md",
"efficientvit_seg_b3": "efficientvit_seg.md",
"fast_scnn": "mmseg_common.md",
"fcn_resnet101": "mmseg_common.md",
"fcn_resnet50": "mmseg_common.md",
"fcos_r50_fpn": "mmdet_dense_common.md",
"flow1d": "flow.md",
"flowformer": "flow.md",
"flowformerplusplus": "flow.md",
"flownet2": "flow.md",
"foveabox_r50_fpn": "mmdet_dense_common.md",
"fsaf_r50_fpn": "mmdet_dense_common.md",
"gfl_r50_fpn": "mmdet_dense_common.md",
"gma": "flow.md",
"gmflow": "flow.md",
"hrnet_w18": "mmseg_common.md",
"hrnet_w32": "topdown_pose_batch8.md",
"hrnet_w48": "mmseg_common.md",
"hrnet_w48_2": "topdown_pose_batch8.md",
"keynetplushardnet": "features.md",
"litehrnet_18": "topdown_pose_batch8.md",
"litehrnet_30": "topdown_pose_batch8.md",
"mask2former_swin_b_instance": "mmdet_query_iseg.md",
"mask2former_swin_s_instance": "mmdet_query_iseg.md",
"mask2former_swin_t_instance": "mmdet_query_iseg.md",
"memflow": "flow.md",
"metric3d_v1_convnext_large": "depth.md",
"metric3d_v1_convnext_tiny": "depth.md",
"metric3dv2_vit_giant2": "depth.md",
"metric3dv2_vit_large": "depth.md",
"metric3dv2_vit_small": "depth.md",
"midas_small": "depth.md",
"mspn_r50": "mspn_common.md",
"ocrnet_hrnet_w18": "mmseg_common.md",
"ocrnet_hrnet_w48": "mmseg_common.md",
"pidnet_l": "mmseg_common.md",
"pidnet_m": "mmseg_common.md",
"pidnet_s": "mmseg_common.md",
"pspnet_resnet101": "mmseg_common.md",
"pspnet_resnet50": "mmseg_common.md",
"r2d2": "features.md",
"raft_large": "flow.md",
"raft_small": "flow.md",
"reppoints_r50_fpn": "mmdet_dense_common.md",
"retinanet_r101_fpn": "mmdet_dense_common.md",
"retinanet_r50_fpn": "mmdet_dense_common.md",
"rtmdet_l": "rtmdet_common.md",
"rtmdet_m": "rtmdet_common.md",
"rtmdet_s": "rtmdet_common.md",
"rtmdet_tiny": "rtmdet_common.md",
"rtmdet_x": "rtmdet_common.md",
"rtmo_l": "rtmo_common.md",
"rtmo_m": "rtmo_common.md",
"rtmo_s": "rtmo_common.md",
"rtmpose_l": "rtmpose_common.md",
"rtmpose_m": "rtmpose_common.md",
"rtmpose_s": "rtmpose_common.md",
"rtmpose_tiny": "rtmpose_common.md",
"rtmpose_x": "rtmpose_common.md",
"sea_raft": "flow.md",
"segformer_b0": "mmseg_common.md",
"segformer_b1": "mmseg_common.md",
"segformer_b2": "mmseg_common.md",
"segformer_b3": "mmseg_common.md",
"segformer_b4": "mmseg_common.md",
"segformer_b5": "mmseg_common.md",
"segnext_base": "mmseg_common.md",
"segnext_large": "mmseg_common.md",
"segnext_small": "mmseg_common.md",
"segnext_tiny": "mmseg_common.md",
"simcc_resnet50": "rtmpose_common.md",
"simplebaseline_r101": "topdown_pose_batch8.md",
"simplebaseline_r152": "topdown_pose_batch8.md",
"simplebaseline_r50": "topdown_pose_batch8.md",
"solo_r50": "mmdet_query_iseg.md",
"solov2_r50": "mmdet_query_iseg.md",
"ssd300_vgg16": "ssdlite_common.md",
"ssdlite320_mobilenetv3_large": "ssdlite_common.md",
"stdc1_seg": "mmseg_common.md",
"stdc2_seg": "mmseg_common.md",
"superpoint": "features.md",
"unidepth_v1_convnext_l": "depth.md",
"unidepth_v1_vit_l": "depth.md",
"unidepth_v2_vit_b": "depth.md",
"unidepth_v2_vit_l": "depth.md",
"unidepth_v2_vit_s": "depth.md",
"unimatch_flow": "flow.md",
"upernet_resnet50": "mmseg_common.md",
"upernet_swin_b": "mmseg_common.md",
"upernet_swin_s": "mmseg_common.md",
"upernet_swin_t": "mmseg_common.md",
"vfnet_r50_fpn": "mmdet_dense_common.md",
"xfeat": "xfeat.md",
"yolox_l": "yolox_common.md",
"yolox_m": "yolox_common.md",
"yolox_s": "yolox_common.md",
"yolox_tiny": "yolox_common.md",
"yolox_x": "yolox_common.md",
"zoedepth_k": "depth.md",
"zoedepth_n": "depth.md",
"zoedepth_nk": "depth.md"
}

View File

@ -0,0 +1,25 @@
## 输入输出约定(MMDetection 单阶段密集检测头:RetinaNet / FCOS / ATSS / GFL / VFNet / FoveaBox / FSAF / RepPoints)
评测时平台在主机上做预处理,把图喂给你的模型,再用 MMDetection 官方的后处理(`predict_by_feat`)解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x640x640` float32。预处理在主机侧,图里不要再做(具体数值见 job.json 的 `model_spec.preprocess`):
- 等比缩放到长边 640(`int(边长*比例+0.5)`,cv2 双线性);
- 按官方 data_preprocessor 的通道顺序和 mean/std 归一化;
- 归一化之后在右侧和下方补 0,补到 640×640。
**输出**:官方 bbox head 的原始输出,也就是 `model._forward(x)` 返回的各组张量,**按组、再按层展开**成一串:
- 先 5 个分类:`cls_s8, cls_s16, cls_s32, cls_s64, cls_s128`;
- 再 5 个回归:`bbox_s8 … bbox_s128`;
- FCOS 和 ATSS 还有 5 个 centerness:`centerness_s8 … centerness_s128`。
每个张量的形状是 `[1, C, 640/s, 640/s]`,s 是该层的 stride(8, 16, 32, 64, 128):
| 模型 | 分类 C | 回归 C | centerness C |
|---|---|---|---|
| retinanet | 720(9 个锚 × 80 类) | 36 | 无 |
| fcos、atss | 80 | 4 | 1 |
| gfl | 80 | 68(4 × 17 个分布 bin) | 无 |
| vfnet、foveabox、fsaf、reppoints | 80 | 4 | 无 |
全部是原始值:分类和 centerness 不过 sigmoid,回归不解码,图里也不做 NMS。
**平台后处理**:MMDetection 官方 `predict_by_feat`,包括先验框/点、框解码、sigmoid、分数阈值 0.05、每层前 1000、NMS 0.5(atss/gfl/vfnet 为 0.6)、每张图最多 100 个框,再还原到原图。

View File

@ -0,0 +1,22 @@
## 输入输出约定(MMDetection:DETR 系列 / Mask2Former / SOLO 系列)
评测时平台在主机上做预处理,把图喂给你的模型,再用 MMDetection 官方的、不含可学习参数的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。各张量的确切形状可以用 `bench stage run export` 核对。
**输入**:1 个,`1x3x640x640` float32。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- 等比缩放到长边 640(`int(边长*比例+0.5)`,cv2 双线性);
- RGB,按官方 mean/std 归一化;
- 归一化之后在右侧和下方补 0,补到 640×640。
DETR 系列的 padding mask 要在图里自己算:归一化后像素恰好全为 0 的位置就是补的边。
**输出**:
| 模型 | 输出(按顺序) |
|---|---|
| detr.r50 | `class_logits [1,100,81]`:最后一层 decoder 的分类 logits,未 softmax,第 81 类是"无目标";`boxes [1,100,4]`:归一化的 `cx, cy, w, h`(官方 bbox head 已过 sigmoid) |
| deformable.detr.r50、dab.detr.r50、conditional.detr.r50 | `class_logits [1,300,80]`:最后一层 decoder 的分类 logits,未 sigmoid;`boxes [1,300,4]`:归一化的 `cx, cy, w, h` |
| mask2former.swin.t/s.instance | `cls_logits [1,100,81]`:最后一层 decoder 每个 query 的分类 logits(含"无目标");`mask_logits [1,100,160,160]`:在 stride 4 的 mask 特征图上的原始 mask logits |
| mask2former.swin.b.instance | 同上,但分类是 `[1,100,134]`(133 类加"无目标") |
| solo.r50 | 10 个:`mask_g40, mask_g36, mask_g24, mask_g16, mask_g12`(官方 mask head 各层原始输出),再 `cls_g40 … cls_g12`(`[1,80,G,G]` 分类 logits,未 sigmoid) |
| solov2.r50 | 11 个:`kernel_g40 … kernel_g12`(官方 kernel head 各层原始输出),再 `cls_g40 … cls_g12`(`[1,80,G,G]`),最后是 `mask_feats`(统一的 mask 特征图) |
**平台后处理**:MMDetection 官方 head 的 `predict` / `predict_by_feat` 逻辑,包括 DETR 的 top-k 选框、Mask2Former 的 mask 上采样和实例后处理、SOLO 的 matrix NMS 和动态卷积,再还原到原图。

View File

@ -0,0 +1,13 @@
## 输入输出约定(MMSegmentation 语义分割)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,形状见 job.json 的 `input_spec`。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- 直接拉伸到输入大小(不保持比例,cv2 双线性);
- 按官方 data_preprocessor 的通道顺序和 mean/std 归一化。
**输出**:1 个,`[1, C, h, w]` float32,是官方 `model._forward(x)` 返回的 decode head 原始 logits:
- C 是类别数:ADE20K 是 150,Cityscapes 是 19,类别顺序同官方数据集定义;
- `h, w` 可以是 head 自己的分辨率(通常是输入的 1/4 或 1/8),不必在图里放大;
- 不做 softmax,也不在图里 argmax。
**平台后处理**:双线性插值(align_corners=False),先放大到输入大小,再放大到原图,然后取 argmax。

View File

@ -0,0 +1,10 @@
## 输入输出约定(MMPose MSPN)
这是自顶向下的姿态估计:平台用固定的官方人体检测框(HRNet 在 val2017 上的检测结果)从原图裁出每个人,喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x256x192` float32,也就是一个人的裁剪图。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- 用检测框算中心和尺度(padding 1.25,宽高比固定为 192:256),做仿射变换,不旋转、不用 UDP,边界补 0;
- RGB,再按 mean/std 归一化。
**输出**:4 个,每个都是 `[1, 17, 64, 48]`,是官方 MSPN head(1 个 stage、4 个 unit)按 unit 顺序输出的热力图,原始值。平台只用最后一个(第 4 个),但 4 个都必须输出,形状要对、数值要有限。
**平台后处理**:翻转测试(另跑一张水平翻转的裁剪图,取最后一个 unit,翻转时不平移,结果取平均),官方 MegviiHeatmap 解码,映射回原图。官方配置不做 OKS NMS。

View File

@ -0,0 +1,13 @@
## 输入输出约定(MMDetection RTMDet)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x640x640` float32。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- **BGR** 通道顺序,不转 RGB;
- 等比缩放到长边 640(`int(边长*比例+0.5)`,cv2 双线性),右侧和下方用 114 补到 640×640(在归一化之前补);
- 再按 mean/std 归一化。
**输出**:6 个,是官方 `model._forward(x)` 返回的 `(cls_scores, bbox_preds)` 按组展开:
1. `cls_s8` `[1,80,80,80]`、`cls_s16` `[1,80,40,40]`、`cls_s32` `[1,80,20,20]`:分类 logits,不过 sigmoid;
2. `reg_s8` `[1,4,80,80]`、`reg_s16` `[1,4,40,40]`、`reg_s32` `[1,4,20,20]`:每个格点到框四边的距离(左、上、右、下),单位是 640 输入图上的像素。这和官方 `RTMDetSepBNHead` 的输出一致,已经乘过 stride。格点位置是 `(x*stride, y*stride)`,offset 为 0。
**平台后处理**:sigmoid、分数阈值 0.001、前 30000、按距离解码、NMS 0.65、每张图最多 300 个框,再还原到原图。

View File

@ -0,0 +1,14 @@
## 输入输出约定(MMPose RTMO,单阶段多人姿态)
评测时平台在主机上做预处理,把整张图喂给你的模型,再用官方 RTMOHead 的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x640x640` float32。预处理在主机侧,图里不要再做:官方 `BottomupResize`(resize_mode=fit,保持比例、居中放置,边缘补 114),BGR,像素值 0–255,不减均值、不除方差。
**输出**:8 个,是官方 RTMOHead 在 tensor 模式下 `forward` 的输出,按组、再按层(stride 16、32)展开:
1. `cls` × 2:`[1,1,H,W]`,目标分数 logits;
2. `bbox` × 2:`[1,4,H,W]`,框回归原始值;
3. `vis` × 2:`[1,17,H,W]`,关键点可见性 logits;
4. `pose_vec` × 2:`[1,P,H,W]`,送进官方 DCC(动态坐标分类器)的姿态特征,P 由模型决定。
H、W 是 640 除以该层 stride。全部是原始值,不在图里解码,也不做 NMS。
**平台后处理**:官方 `RTMOHead.predict`:用官方权重的 DCC 由 `pose_vec` 得到关键点,分数阈值 0.1、NMS 0.65,再映射回原图。

View File

@ -0,0 +1,14 @@
## 输入输出约定(MMPose SimCC 头:RTMPose / SimCC-ResNet50)
这是自顶向下的姿态估计:平台用固定的官方人体检测框(HRNet 在 val2017 上的检测结果)从原图裁出每个人,喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x256x192` float32(rtmpose.x 是 `1x3x384x288`),也就是一个人的裁剪图。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- 用检测框算中心和尺度(padding 1.25,宽高比固定为输入的比例),做仿射变换,不旋转、不用 UDP,边界补 0;
- RGB,再按 mean/std 归一化。
**输出**:2 个,是官方 `model._forward(x)` 返回的 `(pred_x, pred_y)`,顺序是先 x 后 y:
- `simcc_x` `[1, 17, 2W]`:256×192 输入时是 `[1,17,384]`;
- `simcc_y` `[1, 17, 2H]`:256×192 输入时是 `[1,17,512]`。
两个都是 SimCC 头的**原始 logits,不要加 softmax**。平台取最大值的位置当坐标,取最大值本身当关键点分数,而这个分数会参与实例打分和 0.2 的关键点阈值,所以数值的尺度会影响精度。
**平台后处理**:翻转测试(另跑一张水平翻转的裁剪图,结果取平均),argmax ÷ 2(split ratio)得到坐标,映射回原图,再做 OKS NMS(阈值 0.9)。

View File

@ -0,0 +1,10 @@
## 输入输出约定(Torchvision SSD:SSDLite320 / SSD300-VGG16)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,SSDLite320 是 `1x3x320x320`,SSD300 是 `1x3x300x300`,float32。预处理在主机侧,图里不要再做:RGB,先 `/255`,再按 job.json 的 `model_spec.preprocess` 减均值、除方差(SSDLite 是 `(x-0.5)/0.5`),然后双线性(align_corners=False,无抗锯齿)拉伸到输入大小,不保持比例。
**输出**:1 个,SSDLite320 是 `[1, 3234, 95]`,SSD300 是 `[1, 8732, 95]`,float32。每行对应一个官方锚框,顺序同 torchvision `anchor_generator` 在输入大小上生成的锚框:
- 前 4 维:用官方 `box_coder.decode_single(bbox_regression, anchors)` 解码出的框 `[x1, y1, x2, y2]`,单位是输入图上的像素;
- 后 91 维:`softmax(cls_logits)` 后的概率。下标 0 是背景,1–90 是 COCO 的 category id(中间有空号),和官方 91 类头一致。
**平台后处理**:逐类阈值 0.001,每类取前 300,NMS 0.55,每张图最多 300 个框,再按宽高分别缩放回原图。

View File

@ -0,0 +1,10 @@
## 输入输出约定(MMPose 自顶向下热力图头:SimpleBaseline / LiteHRNet / HRNet)
这是自顶向下的姿态估计:平台用固定的官方人体检测框(HRNet 在 val2017 上的检测结果)从原图裁出每个人,喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3x256x192` float32,也就是一个人的裁剪图。预处理在主机侧,图里不要再做(数值见 job.json 的 `model_spec.preprocess`):
- 用检测框算中心和尺度(padding 1.25,宽高比固定为 192:256),做仿射变换,不旋转、不用 UDP,边界补 0;
- RGB,再按 mean/std 归一化。
**输出**:1 个,`[1, 17, 64, 48]`,是官方 `model._forward(x)` 返回的热力图:17 个 COCO 关键点,顺序同官方;原始值,不过 sigmoid,也不在图里取 argmax。
**平台后处理**:翻转测试(另跑一张水平翻转的裁剪图,热力图按官方方式翻转、平移后取平均),MSRAHeatmap 解码(argmax 加四分之一像素偏移),分数取热力图最大值,映射回原图,再做 OKS NMS(阈值 0.9)。

View File

@ -0,0 +1,11 @@
## 输入输出约定(XFeat 稀疏特征)
评测时平台在主机上做预处理,把图喂给你的模型,再用官方 XFeat 的稀疏后处理解读输出,在 HPatches 上评测匹配效果。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x1x480x640` float32。预处理在主机侧,图里不要再做:RGB 用 cv2 线性插值缩放到 640×480,`/255`,再对 3 个通道求平均,得到灰度图。官方网络内部自带的 InstanceNorm 等仍然留在图里。
**输出**:3 个,和官方 `XFeatModel.forward`(`modules/model.py`)的返回值完全一致,顺序如下:
1. `feats` `[1, 64, 60, 80]`:稠密描述子,原始值,不做 L2 归一化;
2. `keypoints` `[1, 65, 60, 80]`:关键点 logits(每个格子 8×8=64 个位置,加 1 个 dustbin),不做 softmax;
3. `heatmap` `[1, 1, 60, 80]`:可靠性图,就是官方 heatmap head 的输出。
**平台后处理**:官方 `detectAndCompute`(top_k 1024,detection_threshold 0.05),包括 softmax、上采样 8 倍、NMS、乘以可靠性、取前 1024 个点、采样描述子并做 L2 归一化。

View File

@ -0,0 +1,15 @@
## 输入输出约定(YOLOX)
评测时平台在主机上做预处理,把图喂给你的模型,再用平台自己的后处理解读输出。图的输入输出必须严格按下面的约定,形状对、含义错,精度会直接崩,而且没有任何报错。
**输入**:1 个,`1x3xSxS` float32(S 见 job.json 的 `input_spec`,tiny 是 416,其余 640)。预处理在主机侧,图里不要再做:
- BGR 通道顺序,像素值 0–255,不减均值、不除方差;
- 等比缩放到长边 S,放在左上角,其余用 114 填充(官方 `ValTransform(legacy=False)`)。
**输出**:1 个,`[1, N, 85]` float32,N = (S/8)² + (S/16)² + (S/32)²(640 时是 8400)。
- 行的顺序:先 stride 8 的所有格子,再 16,再 32;每层内按行优先(先 y 后 x)。
- 每行:`[cx, cy, w, h, obj, cls_0 … cls_79]`。
- `cx, cy, w, h` 是已经解码好的框,单位是输入图(S×S)上的像素:`cx = (tx + grid_x) * stride`,`w = exp(tw) * stride`。
- `obj` 和 80 个类别分数都已经过 sigmoid,是 0–1 的概率。
- 这和官方 YOLOX 在 `model.head.decode_in_inference = True` 时 `model(x)` 的输出一致。
**平台后处理**:分数 = obj × 类别概率,阈值 0.01,NMS 0.65,再按缩放比例还原到原图。

View File

@ -1,5 +1,5 @@
{
"_comment": "渲染到 ~/.pi/agent/models.json(chmod 600)。{TEACHER_API_KEY}/{STUDENT_*} 由 `bench agent setup` 从 bench/.env.local 填。字段名对照 pi 版本文档(P3 核对:providers.<name>.{baseUrl, api, apiKey, models[]})。",
"_comment": "渲染到 ~/.pi/agent/models.json(chmod 600)。{TEACHER_API_KEY}/{STUDENT_*} 由 `bench agent setup` 从 bench/.env.local 填。字段名对照 pi 版本文档(P3 核对:providers.<name>.{baseUrl, api, apiKey, models[]})。contextWindow 故意写大:Pi 只在服务端报上下文超长时才压缩并续跑,不会在暂停退出前按估算先压缩(那样续跑的请求就和原来对不上)。",
"providers": {
"dr-gateway": {
"baseUrl": "{TEACHER_BASE_URL}",
@ -11,7 +11,7 @@
"name": "{TEACHER_MODEL} (teacher)",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"contextWindow": 10000000,
"maxTokens": 16384,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
@ -27,7 +27,7 @@
"name": "student (vLLM)",
"reasoning": false,
"input": ["text"],
"contextWindow": 65536,
"contextWindow": 10000000,
"maxTokens": 8192,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}

View File

@ -3,6 +3,42 @@ import { Schema } from "effect";
import fs from "node:fs";
import path from "node:path";
import { execFileSync } from "node:child_process";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const terminal = require("../extensions/terminal-core.js"); // same core as Pi's terminal.ts
const {makeGuard, forbiddenCommand, rootFind} = require("../extensions/guard-core.js");
// Pi's path-guard in its private-home branch (the only mode OpenCode runs in): file tools are judged
// against the read/write allowlist; bash is left to the mount jail apart from root scans and direct
// shared-resource commands. Same core, same messages, same guard.log.
function pathGuard(rd: string, workspace: string) {
const bench = process.env.BENCH_ROOT!, split = (k: string) => (process.env[k] ?? "").split(":").filter(Boolean);
const guard = makeGuard({WORKSPACE: workspace, ROLLOUT: rd, JOB_DIR: path.resolve(rd, "..", ".."), BENCH_ROOT: bench,
PROJECT_ROOT: path.resolve(bench, ".."), HOME: process.env.HOME ?? "", MODE: process.env.BENCH_MODE ?? "e2e",
DENY_EXTRA: split("BENCH_GUARD_DENY"), ALLOW_EXTRA: split("BENCH_GUARD_ALLOW")});
const forbidden = ["hb_compile", "hb_mapper", "hb_verifier", "hrt_model_exec", "hb_perf", "ssh", "scp"];
const hint = "请在任务获准的路径内操作;使用工具结果给出的日志路径。";
const deny = (kind: string, detail: string, reason: string) => {
try { fs.appendFileSync(path.join(workspace, "guard.log"), JSON.stringify({ts: Date.now() / 1000, kind, detail: detail.slice(0, 500)}) + "\n"); } catch {}
throw new Error(reason);
};
return (tool: string, args: any) => {
if (["read", "grep", "glob", "write", "edit"].includes(tool)) {
const p = args?.filePath ?? args?.path;
const write = tool === "write" || tool === "edit";
if (!p && write) deny("deny-" + tool, "", "path-guard: 缺少 path");
const v = p && guard.judgePath(p, {write});
if (v) deny("deny-" + tool, p, `path-guard: ${v.reason}${write ? "" : "。" + hint}`);
} else if (tool === "bash") {
const cmd = args?.command ?? "";
if (rootFind(cmd)) deny("deny-bash-root-find", cmd, "不要从 / 扫描服务器;在 workspace、任务返回的日志目录或 $BENCH_ROOT/harness/adapters 内限定搜索。");
const f = forbiddenCommand(cmd, forbidden);
if (f?.uncertain) deny("deny-bash-resource", cmd, "无法静态定位这条命令的共享资源操作;请通过 terminal_exec 的受管入口执行。");
if (f?.command) deny("deny-bash-resource", cmd, `共享资源通过 bench stage run 调度:${f.command}`);
}
};
}
// Only attempt-local evidence is writable; the outer worker owns stages/verdicts.
export default async () => {
@ -11,6 +47,7 @@ export default async () => {
const definitions: Record<string, unknown> = {};
let turns = 0, tokens = 0;
const seen = new Set<string>();
const guard = pathGuard(process.env.BENCH_ROLLOUT_DIR!, workspace);
const exhausted = () => turns >= Number(process.env.BENCH_MAX_TURNS) || tokens >= Number(process.env.BENCH_MAX_TOKENS);
return {
"tool.definition": async (input: any, output: any) => {
@ -27,15 +64,16 @@ export default async () => {
"chat.params": async () => {
if (exhausted()) throw new Error("bench budget exhausted; no further model request");
},
"tool.execute.before": async (input: any) => {
"tool.execute.before": async (input: any, output: any) => {
if (exhausted() && !["claim", "oe_doc"].includes(input.tool)) throw new Error("bench budget exhausted; finish with a natural final answer");
guard(input.tool, output?.args);
},
event: async ({event}: any) => {
const part = event.properties?.part;
if (part?.type === "step-finish" && !seen.has(part.id)) {
seen.add(part.id); turns++;
const usage = part.tokens || {};
tokens += (usage.input || 0) + (usage.output || 0) + (usage.reasoning || 0) + (usage.cache?.read || 0) + (usage.cache?.write || 0);
tokens += (usage.input || 0) + (usage.output || 0) + (usage.reasoning || 0); // cache reads excluded, as in Pi
}
},
tool: {
@ -51,7 +89,23 @@ export default async () => {
}}),
oe_doc: tool({description:"Read OpenExplorer documentation.",args:{query:tool.schema.string()},
execute:async ({query}) => execFileSync(path.join(process.env.BENCH_ROOT!,"agent/oe-doc.sh"),[query],
{encoding:"utf8",timeout:60000,maxBuffer:4<<20}).slice(0,8000)})
{encoding:"utf8",timeout:60000,maxBuffer:4<<20}).slice(0,8000)}),
terminal_exec: (() => {
// Same description and parameters as Pi's terminal.ts; a thrown receipt is OpenCode's tool error.
const {commands} = terminal.context(process.env.BENCH_ROLLOUT_DIR);
const z = tool.schema, wait = z.string().regex(/^[a-zA-Z0-9_-]+$/).describe("Existing stage handle from this rollout; no new submission");
return tool({
description: "Wait for an existing stage with wait_handle, without model polling or resubmission. Returns the protected Worker receipt under the original phase/execution deadlines." + (commands ? " Alternatively run a command in the task development environment or assigned board. Paths: /workspace, /out, /input. Formal evaluation uses evaluate=true and predictions JSONL sample_id/top5. Select only an authorized target; CPU tasks use development. Unknown HBM provenance remains UNVERIFIED." : " This task only permits waiting; command execution is disabled."),
args: commands ? {wait_handle: wait.optional(), target: z.enum(["development", "board"]).optional(),
command: z.string().optional(), cwd: z.string().optional(), timeout: z.number().min(1).optional(),
evaluate: z.boolean().optional(), predictions: z.string().optional(),
source: z.string().describe("Workspace subdirectory to freeze for board/formal execution; defaults to .").optional()}
: {wait_handle: wait},
execute: async (args: any, context: any) => {
const params = Object.fromEntries(Object.entries(args).filter(([, v]) => v !== undefined));
return JSON.stringify(await terminal.run(process.env.BENCH_ROLLOUT_DIR, params, context?.abort));
}});
})()
}
};
};

401
agent/opencode/config/package-lock.json generated Normal file
View File

@ -0,0 +1,401 @@
{
"name": "opencode",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@opencode-ai/plugin": "1.18.31"
}
},
"node_modules/@ai-sdk/provider": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.8.tgz",
"integrity": "sha512-oGMAgGoQdBXbZqNG0Ze56CHjDZ1IDYOwGYxYjO5KLSlz5HiNQ9udIXsPZ61VWaHGZ5XW/jyjmr6t2xz2jGVwbQ==",
"license": "Apache-2.0",
"dependencies": {
"json-schema": "^0.4.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz",
"integrity": "sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.4.tgz",
"integrity": "sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.4.tgz",
"integrity": "sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.4.tgz",
"integrity": "sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.4.tgz",
"integrity": "sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.4.tgz",
"integrity": "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@opencode-ai/plugin": {
"version": "1.18.31",
"resolved": "https://registry.npmjs.org/@opencode-ai/plugin/-/plugin-1.18.31.tgz",
"integrity": "sha512-Rdc1bPK06PByaGyGd0kf7JUZ4pTkexz2OOUNlqZWLpHOiMEZ+/rFGjt46ypZ3QwA697gNdWwwwQbHbKG5NMwGA==",
"license": "MIT",
"dependencies": {
"@ai-sdk/provider": "3.0.8",
"@opencode-ai/sdk": "1.18.31",
"effect": "4.0.0-beta.83",
"zod": "4.1.8"
},
"peerDependencies": {
"@opentui/core": ">=0.4.5",
"@opentui/keymap": ">=0.4.5",
"@opentui/solid": ">=0.4.5"
},
"peerDependenciesMeta": {
"@opentui/core": {
"optional": true
},
"@opentui/keymap": {
"optional": true
},
"@opentui/solid": {
"optional": true
}
}
},
"node_modules/@opencode-ai/sdk": {
"version": "1.18.31",
"resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.18.31.tgz",
"integrity": "sha512-Raouthf8Lhe9edjvYeeSK7SgvdoU6bBjH9qV3f70dHoa6h+z0X2TMz/e22/wKp/StlFUZ4kIRpYYxFnY8/k01w==",
"license": "MIT",
"dependencies": {
"cross-spawn": "7.0.6"
}
},
"node_modules/@standard-schema/spec": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
"license": "MIT"
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/detect-libc": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"license": "Apache-2.0",
"optional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/effect": {
"version": "4.0.0-beta.83",
"resolved": "https://registry.npmjs.org/effect/-/effect-4.0.0-beta.83.tgz",
"integrity": "sha512-0wsak8RtgGAr9UWSbVDgJHZcUqMSvicHcvaZv1MbMM7MCGgW4Rn/137J1MHQbwYPcwYGxT/IqehFd+UbYuj78w==",
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.1.0",
"fast-check": "^4.8.0",
"find-my-way-ts": "^0.1.6",
"ini": "^7.0.0",
"kubernetes-types": "^1.30.0",
"msgpackr": "^2.0.1",
"multipasta": "^0.2.7",
"toml": "^4.1.1",
"uuid": "^14.0.0",
"yaml": "^2.9.0"
}
},
"node_modules/fast-check": {
"version": "4.10.2",
"resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.10.2.tgz",
"integrity": "sha512-iK2f+YrcmoeGqk6fA0ea2bptcu/itMIm4NfEozq6N25+aG6h7s5HZbB/k1aV7b5w5sFLMCbbtRUsTVR+BgC3xw==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/dubzzz"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fast-check"
}
],
"license": "MIT",
"dependencies": {
"pure-rand": "^8.0.0"
},
"engines": {
"node": ">=12.17.0"
}
},
"node_modules/find-my-way-ts": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz",
"integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==",
"license": "MIT"
},
"node_modules/ini": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/ini/-/ini-7.0.0.tgz",
"integrity": "sha512-ifK0CgjALofS5bkrcTy4RaQ9Vx2Knf/eLeIO+NaswQEpH1UblrtTSCIvN71qQDMq0PeQ/SSPojvEJp9vvvfr+w==",
"license": "ISC",
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"license": "ISC"
},
"node_modules/json-schema": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
"license": "(AFL-2.1 OR BSD-3-Clause)"
},
"node_modules/kubernetes-types": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/kubernetes-types/-/kubernetes-types-1.30.0.tgz",
"integrity": "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==",
"license": "Apache-2.0"
},
"node_modules/msgpackr": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-2.1.2.tgz",
"integrity": "sha512-JHAdwubWNEadHQsFAib6uXOzKFxY8QOWHu9LCCksOINMC+TjgaKS2Tdrw7dW5SY0LLz8YK2/YqLSi2vigQt05w==",
"license": "MIT",
"optionalDependencies": {
"msgpackr-extract": "^3.0.4"
}
},
"node_modules/msgpackr-extract": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.4.tgz",
"integrity": "sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"dependencies": {
"node-gyp-build-optional-packages": "5.2.2"
},
"bin": {
"download-msgpackr-prebuilds": "bin/download-prebuilds.js"
},
"optionalDependencies": {
"@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.4",
"@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.4",
"@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.4",
"@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.4",
"@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.4",
"@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4"
}
},
"node_modules/multipasta": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.8.tgz",
"integrity": "sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==",
"license": "MIT"
},
"node_modules/node-gyp-build-optional-packages": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz",
"integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==",
"license": "MIT",
"optional": true,
"dependencies": {
"detect-libc": "^2.0.1"
},
"bin": {
"node-gyp-build-optional-packages": "bin.js",
"node-gyp-build-optional-packages-optional": "optional.js",
"node-gyp-build-optional-packages-test": "build-test.js"
}
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/pure-rand": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.2.tgz",
"integrity": "sha512-vvuOGgcuPJAirlHvuQw1TrOiw7ptaIXXmIbNuiNOY6lNGJJH49PQ1Kj4nd783nPdQhQdicgOjVI2yI/9BD6/Ng==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/dubzzz"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fast-check"
}
],
"license": "MIT"
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/toml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/toml/-/toml-4.3.0.tgz",
"integrity": "sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==",
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/uuid": {
"version": "14.0.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
"integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist-node/bin/uuid"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/yaml": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
"integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14.6"
},
"funding": {
"url": "https://github.com/sponsors/eemeli"
}
},
"node_modules/zod": {
"version": "4.1.8",
"resolved": "https://registry.npmjs.org/zod/-/zod-4.1.8.tgz",
"integrity": "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

View File

@ -0,0 +1,5 @@
{
"dependencies": {
"@opencode-ai/plugin": "1.18.31"
}
}

View File

@ -9,6 +9,20 @@ const {createBudget} = require('./runner-budget.js');
const {installBrokerTransport} = require('./broker-transport.js');
const hash = value => crypto.createHash('sha256').update(value).digest('hex');
// The answer a tool call gets when the collector died while it ran (agent/pi_session.js recovered resume).
const INTERRUPTED = '【平台】执行这个工具调用期间,平台的调度程序重启了,这次调用被中断、没有拿到结果(命令可能已经执行了一部分)。' +
'正式阶段和开发命令被打断的不计编译次数,它们的 handle 会显示被打断。需要的话先检查当前状态,再决定是否重新执行。';
/** Close the tool calls a dead collector left open: every call of the last assistant message without a result. */
function interruptedResults(messages) {
const last = messages.findLastIndex(message => message.role === 'assistant');
if (last < 0) return [];
const answered = new Set(messages.slice(last + 1).filter(m => m.role === 'toolResult').map(m => m.toolCallId));
return (Array.isArray(messages[last].content) ? messages[last].content : [])
.filter(block => block.type === 'toolCall' && !answered.has(block.id))
.map(block => ({role: 'toolResult', toolCallId: block.id, toolName: block.name,
content: [{type: 'text', text: INTERRUPTED}], isError: true, timestamp: Date.now()}));
}
const encode = value => JSON.stringify(value) + '\n';
function syncFile(file) {
@ -116,10 +130,11 @@ async function main(configFile) {
session.agent.state.systemPrompt = config.system_prompt;
}
const file = path.join(cwd, '.bench-session.json');
let lastEvent = null;
let lastEvent = null, lastPhase = 'STARTING';
let toolStop = null;
const activeTools = new Map();
const checkpoint = (phase, complete = false, resumable = false) => {
lastPhase = phase;
const sessionPath = manager.getSessionFile();
let sessionHash = null;
if (sessionPath && fs.existsSync(sessionPath)) {
@ -133,12 +148,14 @@ async function main(configFile) {
};
// Pi's append is synchronous but does not fsync. Persist the session before
// the pre-tool hook can admit a side effect; leave original errors untouched.
for (const name of ['appendMessage', 'appendCustomMessageEntry']) {
for (const name of ['appendMessage', 'appendCustomMessageEntry', 'appendCompaction']) {
const append = manager[name].bind(manager);
manager[name] = (...args) => {
const id = append(...args);
const sessionPath = manager.getSessionFile();
if (sessionPath && fs.existsSync(sessionPath)) syncFile(sessionPath);
// Every saved message is a boundary a crashed collector can resume from (collection_runtime.crash_checkpoint).
checkpoint(lastPhase);
return id;
};
}
@ -146,6 +163,8 @@ async function main(configFile) {
fs.writeSync(1, encode(event));
try { fs.fsyncSync(1); } catch (error) { if (!['EINVAL', 'ENOTSUP'].includes(error.code)) throw error; }
};
// Marks the end of a segment the dead collector never closed (export/trajectory.py).
if (config.recovered) output({type: 'bench_recovery', execution_id: config.execution_id, epoch: config.epoch ?? 1});
output({...manager.getHeader(), bench: {runner_version: 'pi-sdk-v1', execution_id: config.execution_id,
system_prompt: session.systemPrompt, tools: session.agent.state.tools.map(toFunction)}});
const monotonic = () => Number(process.hrtime.bigint()) / 1e9;
@ -234,8 +253,17 @@ async function main(configFile) {
},
};
};
let compactedRetry = false;
session.subscribe(event => {
lastEvent = event.type;
let compaction;
if (event.type === 'compaction_end' && event.willRetry) {
// Pi compacted after a context overflow and resends: the failed generation's ID is spent. kept_messages is
// how many earlier messages the model still sees after the summary (export/trajectory.py builds that view).
generation += 1; compactedRetry = true;
compaction = {kept_messages: session.agent.state.messages
.filter(m => m.role !== 'compactionSummary' && !emptyProviderError(m)).length};
}
if (event.type === 'message_update') {
const delta = event.assistantMessageEvent;
if (delta?.type?.endsWith('_delta') && delta.delta) nonemptyDelta = true;
@ -260,20 +288,40 @@ async function main(configFile) {
activeTools.delete(event.toolCallId);
}
}
// message_update repeats the whole message twice (message, assistantMessageEvent.partial) on every
// token, ~800MB of events.jsonl per rollout; readers use only its type and delta, message_end has the text.
const written = event.type === 'message_update'
? {...event, message: undefined, assistantMessageEvent: {...event.assistantMessageEvent, partial: undefined}}
: event;
// Metadata decorates real native boundaries; it never adds conversation text.
output(boundary ? {...event, bench_tool: {...boundary, execution_id: config.execution_id,
epoch: config.epoch ?? 1, observed_monotonic: monotonic()}} : event);
output(boundary ? {...written, bench_tool: {...boundary, execution_id: config.execution_id,
epoch: config.epoch ?? 1, observed_monotonic: monotonic()}} : compaction ? {...written, bench_compaction: compaction} : written);
});
const stop = () => session.agent.abort();
process.on('SIGTERM', stop); process.on('SIGINT', stop);
try {
if (config.resume) {
if (config.system_sha256 !== hash(session.systemPrompt)) throw new Error('CHECKPOINT_SYSTEM_CHANGED');
if (config.nonempty_delta) throw new Error('UNSAFE_CONTINUATION');
// A paused generation that already streamed must not be replayed. A crash checkpoint is taken after a saved
// message (complete by construction); whatever was streaming then was never saved, so nothing is replayed.
if (config.nonempty_delta && !config.recovered) throw new Error('UNSAFE_CONTINUATION');
// Every earlier continuation required the same complete, empty-error
// checkpoint. Native errors remain append-only; exclude those proved
// fragments from working context even after several pauses/tool rounds.
const messages = session.state.messages.filter(message => !emptyProviderError(message));
if (config.recovered) {
// A collector killed mid-reply (or its reaper's SIGTERM aborting Pi) leaves an unfinished assistant message;
// the model never completed it, so it is dropped like an empty provider error, not continued.
while (messages.at(-1)?.role === 'assistant' && ['aborted', 'error'].includes(messages.at(-1).stopReason) &&
!(Array.isArray(messages.at(-1).content) ? messages.at(-1).content : []).some(block => block.type === 'toolCall')) {
messages.pop();
}
for (const result of interruptedResults(messages)) {
manager.appendMessage(result);
messages.push(result);
output({type: 'message_end', message: result});
}
}
if (!closed(messages) || !continuationBoundary(messages)) throw new Error('UNSAFE_CONTINUATION');
session.agent.state.messages = messages;
await session.agent.continue();
@ -281,6 +329,13 @@ async function main(configFile) {
await session.prompt(fs.readFileSync(config.prompt_path, 'utf8'));
}
await session._agentEventQueue;
// Pi resumes 100 ms after an overflow compaction (agent-session.js _runAutoCompaction): wait for that run too.
while (compactedRetry) {
compactedRetry = false;
await new Promise(resolve => setTimeout(resolve, 300));
await session.agent.waitForIdle();
await session._agentEventQueue;
}
const last = session.state.messages.at(-1);
const complete = last?.role === 'assistant' && last.stopReason === 'stop' && closed(session.state.messages);
const safeResume = !nonemptyDelta && emptyProviderError(last) && closed(session.state.messages) &&

1
agent/pipe-note.sh Normal file
View File

@ -0,0 +1 @@
trap '__s=("${PIPESTATUS[@]}"); for __i in "${!__s[@]}"; do ((__i < ${#__s[@]} - 1)) && [[ ${__s[__i]} != 0 && ${__s[__i]} != 141 ]] && echo "[bench] 管道第 $((__i + 1)) 步退出码 ${__s[__i]};整条命令的退出码只取最后一步" >&2; done; true' EXIT;

View File

@ -3,26 +3,23 @@
job:`{job_id}` run:`{run_id}`
job.json:`{job_json}`(只读) 数据:`{data_dir}`(只读) 你的可写区:当前目录
## 目标
1. G1 compile:产出 `.hbm`,march = {march},输入 {input_spec},`hb_verifier` 通过
2. G2 numeric:记录校准外样本逐输出余弦,参考阈值 {g2_threshold},用于诊断
3. G3 task:真实板端 T1 的 {g3_metric} 与同一子集 FP32 基线比较;容差 {g3_tol}({g3_kind}),以 job.json 的判定规则为准
4. G4 perf:只记录,不判
## 验收(以 job.json 的 `gates.required` 和阈值为准)
1. G1 编译:产出 `.hbm`,march = {march},输入 {input_spec},`hb_verifier` 通过
2. G2 数值:校准外样本的逐输出余弦,参考阈值 {g2_threshold},只作诊断
3. G3 任务精度:板上 T1 子集({t1_n} 张)的 {g3_metric} 与同一子集的 FP32 基线比较,容差 {g3_tol}({g3_kind})
4. G4 速度:以 job.json 的 `gates.G4` 为准。`cpu_fp32_latency_ms` 是原始 FP32 模型在本题板卡 CPU 上(onnxruntime、全部核)的延迟,你的模型板上实测必须比它快。没有这个字段的题不判速度。
必选项以 job.json 的 `gates.required` 为准。
三条硬规定,违反任何一条都不算通过:
- 本题是 int8 量化。`all_node_type`,或者整类计算算子(Conv、MatMul、Gemm 等;用 op_config,或者逐节点列出超过同类节点的一半)设成 int16、float16 或 float32,都判不通过。只把少数敏感节点设成 int16 可以。
- 不能全放 CPU:hb_compile 节点表 `ON` 一列里,卷积、矩阵乘(Conv、ConvTranspose、MatMul、Gemm)一个 `BPU` 都没有,G1 判不通过。哪些放 BPU、哪些放 CPU 由你决定。
- 板上实测延迟不比 `cpu_fp32_latency_ms` 快,G4 判不通过。
缺少板上精度结果不能报完整 PASS;缺权重、工具或材料时如实保留实际错误。
## 输入和可复用缓存
- 权重来源、模型身份和输入约定:见 job.json 的 model_spec
- ONNX 缓存位置:`{onnx}`(可能尚未生成)
- FP32 基线缓存位置:`{baseline_dir}/metrics.json`(可能尚未生成或属于旧子集)
- 校准集位置:`{calib_dir}`(目标 {calib_n} 个 npy,与 val 零交集)
- T1 评测子集:`{t1_tar}`({t1_n} 张)
- 权重、模型身份和输入约定见 job.json 的 `model_spec`;`bench stage run fetch` 获取正式权重。
- FP32 基线:`bench stage run baseline` 生成,缓存在 `{baseline_dir}/metrics.json`(可能还没有,或属于旧子集)。
- `bench stage run export` 是平台参考导出:图不给你,只用来核对你的图的输入输出。
- 校准图片在开发环境的 `$BENCH_CALIB_IMAGES`({calib_n} 张);T1 评测子集 {t1_n} 张,不对你开放。
## 流程
阅读 job.json 后按需要调用工具:`bench stage run fetch` 获取权重,`bench stage run export` 导出图,`bench stage run baseline` 生成参考基线。已有有效缓存可直接复用;这些操作没有强制的探索顺序。
图与校准输入可用时,用 `bench stage run compile --config <你的>.yaml` 尝试编译。各阶段返回 handle,使用其结果前先调用 `terminal_exec({"wait_handle": "<handle>"})` 等待完成,再读取实际日志。`hbm` 收集编译结果;`board` 记录性能;`eval` 需要 HBM 和独立基线,执行固定板端精度评测。失败后可继续改图、改配置或更换方法,但本轨迹最多启动 5 次编译(首次 1 次 + 重试 4 次);精度不达标后的重编译也计入,排队超时未开始的不计,续跑不清零。用完后再提交编译会直接返回 `COMPILE_BUDGET_EXHAUSTED`,此时用最后一次产物完成 board/eval 并如实报告。
最后自然语言如实报告。缺少真实板端精度不能报完整 PASS;缺权重、工具或材料时保留实际错误,不能把材料缺口说成量化失败。
预算:{max_turns} 轮、{max_tokens} tokens。后台编译的等待时间不计模型轮数,每次模型生成仍计一轮。预算收尾时停止新工作并给出实际状态。
预算:本轨迹最多启动 5 次编译(排队超时没开始的不算,续跑不清零),用完后再提交编译会返回 `COMPILE_BUDGET_EXHAUSTED`,此时用最后一次产物跑完 board/eval。{max_turns} 轮、{max_tokens} tokens;等待阶段完成不计轮数,每次模型生成计一轮。

View File

@ -1,8 +1,7 @@
{
"_comment": "渲染到 <rollout>/workspace/.pi/settings.json。{PROJECT_ROOT}/{BENCH_ROOT}/{MODEL} 由 harness/rollout.py 替换。compaction 关:训练数据里出现 CompactionSummaryMessage 是脏的,上下文靠 max_turns 控制。",
"_comment": "渲染到 <rollout>/workspace/.pi/settings.json。{PROJECT_ROOT}/{BENCH_ROOT}/{MODEL} 由 harness/rollout.py 替换。上下文超长时 Pi 自己压缩后接着跑(默认开);导出按 compactions 还原模型实际看到的内容(export/trajectory.py)。",
"defaultProvider": "dr-gateway",
"defaultModel": "{MODEL}",
"compaction": { "enabled": false },
"retry": { "enabled": false, "provider": { "maxRetries": 0 } },
"skills": [
"{PROJECT_ROOT}/.horizon/skills/*/*",
@ -15,5 +14,6 @@
"{BENCH_ROOT}/agent/extensions/oe-doc.ts",
"{BENCH_ROOT}/agent/extensions/terminal.ts"
],
"shellPath": "{BENCH_ROOT}/agent/shell",
"tools": ["read", "edit", "write", "bash", "grep"]
}

6
agent/shell Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Pi's bash tool runs commands through this (settings shellPath); bench dev and the board terminal prepend the
# same pipe-note.sh. Exit code is unchanged (no pipefail: `| head` stays 0); when an earlier step of the final
# pipeline failed, one line on stderr says so. 141 = the reader closed the pipe early, which is normal.
[ "$1" = -c ] && shift
exec /bin/bash -c "$(<"${0%/*}/pipe-note.sh") $1"

77
baseline.summary Normal file
View File

@ -0,0 +1,77 @@
scripts.test_acceptance_edges JOINT_RECEIPT {"accepted": 0, "case": "DATA-012", "excluded_empty_errors": 3, "input_attempts": 3, "publication": "NO_ACCEPTED_SAMPLES", "source_unchanged": true, "unique_dispositions": 3}
scripts.test_accuracy_policy OK
scripts.test_adapter_recipes OK
scripts.test_agent_first {"run_id": "run"}
scripts.test_board_cleanup_order FAILED (failures=1)
scripts.test_board_guard OK (skipped=12)
scripts.test_board_pipeline OK
scripts.test_board_probe FAILED (failures=1)
scripts.test_board_runtime OK
scripts.test_bpu_speed_gates OK
scripts.test_cache_identity OK
scripts.test_classification_predictions OK
scripts.test_coco_extra FAILED (errors=2)
scripts.test_codex snapshot
scripts.test_collection OK
scripts.test_collection_control OK
scripts.test_collection_crash OK (skipped=3)
scripts.test_collection_joint OK (skipped=7)
scripts.test_compile_budget OK
scripts.test_completion OK
scripts.test_container_site OK
scripts.test_content_review_integration OK
scripts.test_continuation OK
scripts.test_controller_restart OK (skipped=4)
scripts.test_coverage OK
scripts.test_depth_gate OK
scripts.test_eval_provenance OK
scripts.test_eval_subset OK
scripts.test_execution FAILED (failures=5, skipped=5)
scripts.test_execution_parent_receipt OK
scripts.test_explicit_batch OK
scripts.test_extensions OK
scripts.test_generation OK
scripts.test_hbm_provenance OK
scripts.test_lease_recovery OK (skipped=2)
scripts.test_lifecycle_joint OK (skipped=3)
scripts.test_metric_direction OK
scripts.test_migration_paths OK
scripts.test_mmseg_static_pool FAILED (errors=1)
scripts.test_monitor OK
scripts.test_multiboard OK
scripts.test_natural_jail OK (skipped=10)
scripts.test_natural_repair_acceptance OK
scripts.test_oe_doc FAILED (failures=2)
scripts.test_ordinary_tool_deadline OK (skipped=14)
scripts.test_own_graph OK (skipped=3)
scripts.test_path_guard NO TESTS RAN
scripts.test_pi_session OK (skipped=20)
scripts.test_pipe_note OK
scripts.test_plan_publication FAILED (errors=1)
scripts.test_pose_gate FAILED (errors=2)
scripts.test_preflight_extensions OK
scripts.test_quota FAILED (failures=1)
scripts.test_quota_abandon OK
scripts.test_quota_auto_abandon OK
scripts.test_recipe_calibration OK
scripts.test_recipe_pipeline OK (skipped=11)
scripts.test_recipe_provenance OK
scripts.test_recipe_runtime OK (skipped=2)
scripts.test_recipe_submission OK
scripts.test_recovery OK
scripts.test_reward_board_offline OK
scripts.test_rollout_backfill OK
scripts.test_runner_isolation OK (skipped=1)
scripts.test_runtime_rollback OK (skipped=1)
scripts.test_salty_client OK
scripts.test_salty_offload NO TESTS RAN
scripts.test_salty_remote NO TESTS RAN
scripts.test_salty_stage OK
scripts.test_settle_interrupted OK
scripts.test_stage_joint OK (skipped=7)
scripts.test_stage_registration OK (skipped=14)
scripts.test_stage_wait OK
scripts.test_sync_patch OK
scripts.test_target_resources OK
scripts.test_terminal OK (skipped=7)
scripts.test_watchdog_stop OK (skipped=14)

View File

@ -6,7 +6,8 @@
"job_suffix": "--nash-m--ptq--int8",
"protocol": {
"rollouts_per_job": 2,
"count_rollouts_started_after": "2026-10-08T07:30:00+08:00",
"count_rollouts_started_after": "2026-09-29T00:00:00+08:00",
"count_rule_note": "2026-10-12 user decision: base-Qwen PASS/FAIL from all of r20260929-04 counts, incl. results before 2026-10-08 07:30.",
"harness_commit": "10b070e",
"agent_version": 15,
"system_interrupted": "not a model failure; excluded and rerun",

View File

@ -4,6 +4,7 @@ import argparse
import json
import os
import re
import shlex
import sys
import time
import uuid
@ -51,33 +52,38 @@ def submit(stage, config, poll_hint=60, *, recipe=None, submission=None):
tmp.rename(hd / 'request.json')
print(hid)
print('# Pi wait: terminal_exec(' + json.dumps({'wait_handle': hid}) + ')')
print(f'# wait: bench stage wait {hid} --poll {poll_hint}')
return hid
def wait(handle: str, poll: int = 60, quiet: bool = False, max_wait_s: float = 60) -> int:
"""单次最多等 60 秒;返回 2 表示仍在排队/运行,阶段继续执行。"""
if not 0 < max_wait_s <= 60:
raise ValueError("stage wait budget must be in (0, 60] seconds")
def dev(command, timeout=3600, cwd=None):
"""bench dev: run one command in the development environment (Salty container with the toolchain)."""
rd = rollout_dir()
ws = (rd / 'workspace').resolve()
here = Path.cwd().resolve()
cwd = cwd or (str(here.relative_to(ws)) if here.is_relative_to(ws) else '.')
hid = 'terminal-' + uuid.uuid4().hex
hd = rd / 'handles' / hid
hd.mkdir()
(hd / 'status.json').write_text(json.dumps({'state': 'QUEUED', 'queued_at': time.time()}))
tmp = hd / 'request.tmp'
tmp.write_text(json.dumps({'stage': 'terminal', 'target': 'development', 'command': command,
'timeout': timeout, 'cwd': cwd}))
tmp.rename(hd / 'request.json')
print(hid)
print('# Pi wait: terminal_exec(' + json.dumps({'wait_handle': hid}) + ')')
return hid
def wait(handle: str, poll: int = 60) -> int:
"""不再轮询,看一眼就返回:结束了打印结果;没结束返回 2,并指向 terminal_exec wait_handle(一次等到阶段结束、不占轮数)。
10-16:efficientvit.b0 400 轮里 307 轮是 bench stage wait,每次还往上下文里加一段输出。"""
hd = rollout_dir() / "handles" / handle
if not hd.exists():
raise SystemExit(f"handle 不存在:{handle}")
t0 = time.time()
deadline = time.monotonic() + max_wait_s
while True:
st = json.loads((hd / "status.json").read_text())
if st.get("state") == "DONE":
break
if not quiet:
since = st.get("started_at") or st.get("queued_at") or t0
print(f"[{time.strftime('%H:%M:%S')}] {handle}: {st.get('state')}"
f"{'(等 ' + st.get('pool', '?') + ' 池槽位)' if st.get('state') == 'QUEUED' else ''}"
f"{'(阶段计算已结束,等待数据库登记;无需重跑)' if st.get('registration') == 'PENDING' else ''}"
f" 已 {int(time.time() - since)}s", flush=True)
remaining = deadline - time.monotonic()
if remaining <= 0:
print(f"(已等 {int(max_wait_s - remaining)}s 仍未结束;这不是失败,再调一次 bench stage wait {handle} 继续等)")
return 2
time.sleep(min(max(1, poll), remaining))
st = json.loads((hd / "status.json").read_text())
if st.get("state") != "DONE":
print(f"{handle}: {st.get('state')}"
f"{'(阶段计算已结束,等待数据库登记;无需重跑)' if st.get('registration') == 'PENDING' else ''}"
f"。不要反复查:调用 terminal_exec({json.dumps({'wait_handle': handle})}),它一次等到这个阶段结束,不占轮数。")
return 2
_print_status(st)
return 0 if st["result"] in ("OK", "SKIPPED") else 1
@ -94,6 +100,9 @@ def _print_status(st: dict) -> None:
print(json.dumps(st)); return
print(f"result: {st['result']} exit_code: {st['exit_code']} error_class: {st['error_class']} {st['duration_s']}s")
print(f"stdout: {st['stdout']}\nstderr: {st['stderr']}\nmeta: {st['meta']}")
for name in ('stdout_tail', 'stderr_tail'):
if st.get(name):
print(f"--- {name} ---\n{st[name]}")
if st.get("measurements"):
print("measurements: " + json.dumps(st["measurements"], ensure_ascii=False))
if st["result"] != "OK":
@ -105,6 +114,20 @@ def _print_status(st: dict) -> None:
def main():
if sys.argv[1:2] == ['dev']:
p = argparse.ArgumentParser(prog='bench dev', description='Run a command in the development environment')
p.add_argument('--timeout', type=int, default=3600, help='seconds, at most 43200')
p.add_argument('--cwd', help='workspace-relative directory; default: the current one')
p.add_argument('--board', action='store_true', help='run on the task board instead (S100P tasks): this directory, '
'with files that only exist in the development workspace such as a compiled HBM, at most 30 min')
p.add_argument('command', nargs=argparse.REMAINDER)
a = p.parse_args(sys.argv[2:])
words = a.command[1:] if a.command[:1] == ['--'] else a.command
if not words:
p.error('command required')
command = words[0] if len(words) == 1 else shlex.join(words)
dev(('#bench:board\n' if a.board else '') + command, a.timeout, a.cwd) # harness/terminal.py BOARD_MARK
return 0
p = argparse.ArgumentParser()
p.add_argument('command', choices=['stage'])
p.add_argument('op', choices=['run', 'wait', 'status'])

119
docs/memory/AGENTS.md Normal file
View File

@ -0,0 +1,119 @@
# 经验记忆
这里是在本项目上工作的 agent(Claude、Codex 等)积累下来的经验:用户的偏好和纠正、项目现场的事实、踩过的坑。代码和 git 历史里能直接查到的东西不放在这里。
## 怎么用
- 开始工作前先扫一遍下面的索引,按每行的提示挑相关的文件读。
- 记忆只代表写下那一刻的情况。里面提到的路径、进程、配置、机器,用之前先到现场核实;和现场不符时以现场为准,并更新或删掉那条记忆。
## 怎么写
1. 一个文件只记一件事。文件名用英文小写加短横线,例如 `bench-restart-hazards.md`。
2. 文件开头写 frontmatter:
```markdown
---
name: <和文件名相同,不带 .md>
description: <一句话,别人靠它判断要不要读这个文件>
metadata:
type: user | feedback | project | reference
---
```
| type | 记什么 |
| --- | --- |
| user | 用户是谁、懂什么、偏好什么 |
| feedback | 用户的要求和纠正;做对了被肯定的做法也记 |
| project | 进行中的工作、现场事实、约束,代码里看不出来的 |
| reference | 外部资源在哪:地址、看板、工单 |
3. 正文先写事实。feedback 和 project 类再加两行:`**Why:**` 写原因,`**How to apply:**` 写以后具体怎么做。
4. 时间一律写绝对日期(2026-10-11),不写"昨天""下周"。
5. 相关的记忆用 `[[name]]` 互相链接。目标文件还没写也可以先留着链接。
6. 新写之前先查有没有已经覆盖这件事的文件。有就改那个文件,不要另起一份。发现某条记错了,就地改正并注明"更正(日期)",或者整个删掉。
7. 写完在下面的索引里加一行:`- [标题](文件名.md) — 一句话提示`。索引只放链接和提示,不放内容。
## 不能写的
- 密码、API key、token、私钥,连前几位、后几位都不写。只写变量名或存放位置。
- 代码结构、git 历史,以及 README、CONTRACT、HANDBOOK 里已经写了的东西。
- 只对当前这一次对话有用的临时状态。
## 存放和同步
- 本目录 `docs/memory/` 是共享的记忆库,跟着 `feature/salty-20261009` 分支提交和推送。不要推到 `main` 或生产分支。
- Claude 在本机另有一份工作副本(`~/.claude/projects/<项目>/memory/`,索引文件叫 `MEMORY.md`)。两边内容保持一致:改了一边,同步到另一边再提交。
- 推送前 grep 一遍新增内容,确认没有密钥或密钥片段。
## 索引
- [优先做减法而非加法](prefer-subtraction-over-addition.md) — 修 bug 先想能删什么,别动辄加钩子和配置项
- [汇报说人话](plain-language-no-jargon.md) — 不要行话、不造词;总分三段、500 字内;方案两页先放要拍板的事(森哥 10-30)
- [bench 调度程序重启的坑](bench-restart-hazards.md) — 改文件不算换代、kill -9 条件、drain 单向、密钥在旧进程环境、交接停太久续跑即超时(11-08 已修)、启动要 10–20 分钟、导出会卡、全局并发上限要三个一起换、新账号用新组名
- [第一版交付包](delivery-package-v1.md) — 位置、冻结点 62 条、出第二版要避开的坑
- [采集稳定性补丁](quota-unknown-autorecover-fix.md) — 2f54d40→ea0335b:请求不明、板卡锁死、板端隔离、ssh 断连、回执误判、编译上限 5 次、请求结束后补放行试探、bash 超时可恢复、GLM tpm 50万→200万、连坐只挡预算用完和真跑满24h
- [成功率低的真实原因](success-rate-breakdown-20261008.md) — 10-08:真做不到的只有 2 条;GLM/Qwen 同题打平是考卷区分不出(简单题满分、难题被砍或判分卡住)
- [轨迹时间花在哪](rollout-time-breakdown-20261008.md) — 10-08:编译占 33%、编译机 CPU 只用 31%、排队中位 30 秒;04 时长是重复计算;编译上云暂无收益
- [编译机要被回收](compile-server-reclaim.md) — 10-08 晚已回收、换到 36.144.20.182;账本只有 9-28 备份;10-11 起 36 能读写网盘上的旧轨迹;120 已关机清理
- [第二个 GLM 账号与提并发](glm-second-account-20261008.md) — 10-08:05/06 原来同一账号;06 换新账号 B,05/06 各 16 路,04 不变;接续脚本位置
- [Qwen SFT benchmark](qwen-sft-benchmark.md) — 10-08 建 qwen-sft-v1:37 题;04 的 Qwen 轨迹只做训练前基准、不进 SFT;10-12 起 04 的旧结果也算,训练前过 20 败 3、14 题没结果
- [仓库主线整理](git-mainline-20261009.md) — 10-09:main=生产分支 c2c52ed,旧 main 打标签;Salty 在 feature/salty-20261009(10-20 改名 salty-prod / salty-test);本地还剩优雅退出/板卡改动
- [Salty 个人空间迁移](salty-personal-migration-20261009.md) — 10-10 完成:120 的 bench-cache/data 全在 personal:/bench/,逐文件核对通过;Salty 单文件上限 7.3–12.7G、拒软链接、du 会夸大
- [别原地改运行中的脚本](never-edit-running-script.md) — bash 边读边执行;要改就写新文件或新文件+mv 替换
- [Mac mini 主控 + Salty 全阶段执行](mini-salty-controller-20261009.md) — 10-09 至 10-12:salty_remote 设计与踩坑(工作目录、HBM 取回、网络抖动、容器内存超限、重启恢复)、轨迹搬到个人空间、导出挪到 Salty、强停写坏执行文件的处理、各处位置
- [记忆同步到仓库](memory-synced-to-repo.md) — 改完记忆同步到 docs/memory/ 并推 salty-test(上生产时随 salty-prod 快进);入口 docs/memory/AGENTS.md
- [04 的 Qwen 服务速度](qwen-nvfp4-service-speed-20261012.md) — 10-12:单请求中位 6 秒、一次只处理 1 个请求;04 开 5 路只忙 15%,不是瓶颈
- [迁到 Salty 后通过数暴跌](salty-throughput-drop-20261012.md) — 10-12 清查:主因是剩下全是重题(同模型在 Salty 不更慢);系统问题:整批重启、容器被杀占编译次数、连不上 GLM 永不自动恢复、metric3d、Wi-Fi
- [自愈与报警](selfheal-and-alert-20261012.md) — 10-12:系统失败(被杀、执行器退出、超时、卡死)不占编译次数;连不上自动续,但暂停名额仍会被抢;depthpro/metric3d 撤出;健康检查弹通知
- [容器线程被限流](salty-container-threads-20261013.md) — 10-13:容器看到 244 核只给 4–6 核,torch 慢 16 倍、numpy 5 倍;已加线程上限,onnxruntime 未处理
- [验证器核查](verifier-audit-20261012.md) — 10-12:Qwen 20 个通过是真的;但验证器不查是否真 int8(全 int16 也算过)、只抽 100 张;打平是因为系统包办了大半
- [10-13 四个基建漏洞](infra-leaks-20261013.md) — 超时步骤锁死 CPU 名额(32 剩 6)、超时后 Salty 容器不停、续跑必死、领题后重复查额度把题作废;10-13 20:41 重启后全部修复上线,22:26 导出进程加自动清理孤儿容器
- [训练前 Qwen 能力失败题](qwen-ability-failures-20261013.md) — 10-14:34/37 有结果、过 28、能力失败 6 道;短板:配置写错、不先本地诊断、归咎平台
- [Mac mini 流量绕美国](mac-mini-clash-global-proxy-20261013.md) — 10-13:Clash 全局+TUN,Qwen/Salty/GLM 全走洛杉矶 JMS 节点,是断线和 Salty 网络错误的共同根因;要用户改 Clash
- [HBM 步骤成新瓶颈](hbm-step-bottleneck-20261014.md) — 10-14:HBM≡BC 模拟器抽查在 Salty 上 1–2 小时、一夜撞时限 45 次,从没独立判出过问题;DNS_FAILED 暂停不会自动续
- [06-hbm 抽查改为按需](hbm-spotcheck-optional-20261014.md) — 10-14:模拟器抽查不再必跑(已部署);agent 可用配置开启、只作诊断;配置校验/说明与 DNS 续跑等下次重启
- [网络容错与板卡时限](net-resilience-board-deadline-20261014.md) — 10-14:原地重发/免费续跑/结果不明可续跑;板卡时限对齐;19:00 连同开发环境/自带图/速度要求一起重启上线(-v16 配置、脚本在 restart-20261014)
- [智能体自主性核查](agent-autonomy-audit-20261014.md) — 10-14:不让改图、兜底配置多、VM 无工具链;已实现 bench dev(Salty 沙箱)+ 自带图/校准(a92510d,等重启);速度 1.5 倍门槛离线重判 06 翻 37/178;上线 2 小时内还没人自带图,dev 曾能看到评测集(已修)
- [10-15 早上复查](overnight-check-20261015.md) — dev 槽 8→37(配置有缓存,只对新命令生效);S600 板盘满因失败会话目录不删(a263374 已修);暂停名额被新题抢;全 fp16 落 CPU 仍判过;4 条自带图/校准;评测文件被 task_contract 冻结,在跑的 run 不能热改(11:08 改坏三条)
- [v16 轨迹质量对比](v16-quality-20261015.md) — 10-15:dev 52/53 在用、兜底和慢速通过变少但样本少;240 轮上限截断最自主的轨迹;Qwen 3过3败是不再用全 int16 兜底,基准要在 v16 下重测
- [10-15 下午重启](restart-20261015.md) — 重启前清查:回执 15 秒超时、暂停吃掉 24 小时、400 永久暂停、账本忙让出名额、评测一次 12 GB;v17(400 轮)、判分 v0.8;之后热部署:评测分批靠批准的等价改写(不建新 run)、加载卡住检测、容器 onnxruntime 限线程、Salty 失败作业自动清
- [最新三条 SFT 细读](sft-sample-review-20261015.md) — 10-15:真通过但决策含量低;两条是 Qwen 自己的不该进训练;v16 仅 8/315、含评测题、上下文过长
- [v17 自主性实测](v17-autonomy-check-20261015.md) — 10-15 19:40:32 条 GLM 跑 5 小时 0 条结束;自己导图 0、自备校准 0、图手术 1;72% 时间在开发环境,9 条各花 4 小时编默认配置
- [v18–v22 整条链路给 agent](v18-own-inputs-20261015.md) — 自己导图/校准(v21 原图)、速度参考(编不出写 unavailable)、板上自测(≤512 MiB);10-16 16:21 重启:上下文满记预算用完、断线只停 2 分钟、Qwen 省去旧工具输出、GLM token 2M、stage wait 不轮询
- [10-16 17:00 复查](check-20261016-1700.md) — v18–21 自己导图 41/46、真改图约 3 条、0 条通过;05 的 GLM S600 账号 16:00 起全 429,17:22 换 key 和新组名(s600-r05-v22c)恢复
- [PASS/SFT 自主性统计](sft-autonomy-tally-20261016.md) — 10-16:GLM 310 条 PASS 里 71% 只写配置,成品真用自己改的图只有 4 条(3 条进 SFT);v18+ 还没通过;文本搜 onnx_model 会误报
- [第二版 0 通过的原因](v18-zero-pass-why-20261016.md) — 10-16:重启取消 42/90、82/90 是从没过的难题、到评测的都差精度;10 条想找评测集做本地验证被挡、28 条照搬平台导出脚本
- [稳定性体检](stability-sweep-20261016.md) — 10-16:最大问题是生产批次当试验场(3 天 8 版、重启即取消);19:00 复核更正:本机有健康检查但漏报限流、4000 小时实为约 1660、盘不是急事、Qwen 进 SFT/版本混杂不用改代码
- [10-16 断电停机与重启](poweroff-20261016.md) — 停/起/清理脚本在 configs/poweroff-20261016;开机 VM 自起;取消会留 dev lease 占槽;speed_ref 残留要删
- [回复用中文](reply-in-chinese.md) — 汇报、提问一律中文;命令和路径保持原样
- [10-17 02:15 底层复查](check-20261017-0215.md) — v18+ 134 条:真改图约 10、板上自测 6、通过 3(1 条板上 493 ms 没被速度挡住);平台复测不判速度;重启后很稳,只剩 Qwen 续跑必死(context-mask 状态在内存)
- [能否当强化学习环境](rl-readiness-20261017.md) — 10-17:能用,瓶颈是慢不是稳;收尾 5 件后冻结,清单外默认不再改
- [少管过程的删减清单](simplify-agent-rules-20261017.md) — 10-17:交还 Pi 压缩要改 5 处(不是纯减法,导出也要认压缩);提示词逐条分留事实/删规矩/交给系统;并入冻结版本
- [10-17 停 06](stop-06-20261017.md) — 账号 B 没额度,11:30 只 SIGTERM 不取消;原命令/环境在 configs/stop-06-20261017;换 key 要新组名并取消暂停的 ;10-17 v23 上线时用户定 06 继续停,等新 key;后来换账号续跑,10-31 21:09 没题可领才退出
- [重启不丢轨迹的方案](resumable-rollout-design-20261019.md) — 不拆服务,改成状态可续:掉线后从最后完整边界续跑;6 处卡点、改动范围(待确认)
- [别家 rollout 稳定性调研](rollout-infra-survey-20261019.md) — 沙箱用完即毁、rollout 与调度解耦、检查点续跑、基础设施失败丢弃;我们取消占系统原因 54%
- [10-18 全局盘点](overall-tally-20261018.md) — 导出 871、v18+ 自主通过 15(真改结构 1)、系统原因每天 20–89%;已清 36G、加了磁盘报警和 offload 自动清理
- [10-18 VM 盘只读](vm-disk-readonly-20261018.md) — 18:46 系统盘 EIO 转只读,04/05 collector 退出、在跑 21 条全断;库完好;22:10 重启 VM 修好、取消补号 21 条、04/05 v23 重新跑满
- [v22 新数据细读](sft-v22-review-20261018.md) — 10-18:新进 GLM 12 条,v22 明显变好(7/10 评分≥4);量小、上下文过长、开发环境仍能读评测器源码、速度没人管
- [测试 collector](staging-collector-20261019.md) — bench-staging:共用生产状态、单独账号组;VM 上新建批次工具链路径不对要拷 job.json;测试已验证重启接管
- [Salty 删除接口 405](salty-storage-rm-405-20261019.md) — 10-19 16:50 起 storage rm 全 405,旧清理重试 30 分钟挡住结果;45dcce1 只试一次;10-20 测试换 CLI 0.2.4、删除变后台任务仍失败,77031cd 后台按退避重提;上生产要连 CLI 一起换;10-20 14:41 生产已热修一次性清理(先删作业)
- [分支规矩](branch-workflow-20261020.md) — salty-prod=生产在跑的代码,salty-test=测试;改动先进 salty-test 上测试,稳了再快进 salty-prod 上生产;别新建分支
- [10-20 生产换新代码](prod-switch-20261020.md) — 15:05 不排空直接接管:36 条接上、丢 1 条(板上评测中);部署包/备份/launch.py 在 configs/deploy-20261020;板卡租约泄漏 15:26 已热修;遗留 06 的 16 条隔离、04 的 9 条老暂停
- [CLI 换 0.2.6](salty-cli-026-20261021.md) — 10-21 17:46 服务端改作业列表格式,0.2.5 解析失败、步骤成片 REMOTE_UNAVAILABLE;20:08 测试/生产换 0.2.6 恢复,备份在 configs/hotfix-20261021;20:12 服务端 502 约 1 分钟已自愈
- [10-28 下午五处修复](infra-fixes-20261028.md) — 板上自测回执重试+探板、BOARD_CLEANUP 记 INFRA_ERROR、孤儿隔离自动放、429 暂停恢复后自动续、导出放后台;68028a2 11-04 全部上生产;报警脚本关端口转发
- [虚拟机盘每轮见底](vm-disk-export-cycle-20261028.md) — 10-28:清理程序等 Salty 导出(现每次 4–6 小时)期间不清盘;21:18 换成后台导出版已上生产(salty-prod 36b7649);10-29 05:28 仍掉到 596MB,应急把 3 个闲置目录挪到宿主 /Users/amos/work/vm-overflow-20261029;已存档轨迹本地还剩 34G 小文件,4f27d61 存档后删 workspace,10-29 上生产(salty-prod dca5d0e)共腾 31G,盘回到 38G
- [10-28 测试长跑](staging-longrun-20261028.md) — r20261028-st 8 题 2 路、18:26 起,20:50 因盘满暂停、23:18 续上,10-29 10:52 跑完 8/8 PASS、回执全正常但没碰上故障;测试名额上限改 42 才抢得到;看结果用 configs/longrun-20261028/longrun_status.py;formal-qwen 自有存档进程、agent-0 孤儿隔离
- [Qwen 额度组卡半开](qwen-half-open-stuck-20261027.md) — 10-27:半开试探撞上 400 上下文过长,组永远不放行、5 路全停;10-28 上午、23:49 两次手动解卡(顺带续了 7 条全 429 暂停);根治 61d8f54 11-04 已上生产
- [差距拉大的原因](gap-widening-cause-20261029.md) — 10-29:v24 禁整网 int16 堵了 Qwen 老路(同题 80%→59%)、GLM token 10-22 才放开、int16 规则代码不判 GLM 用足余地;严格口径差 21→7 点
- [Qwen 全量批次](qwen-all-20261030.md) — 10-30 18:02 r20261030-qwen-all:204 道 S100P 题×1;11-02 提到 16 路;11-06 停;11-08 拉起只续上 2 条,10 条因停机时限走完判超时、连同 fcn 改到新批次 r20261108-qwen-re 重跑
- [05/06 没题可领了](glm-runs-exhausted-20261031.md) — 10-31:同题互斥规则挡住 171 道(62 道只是用完了 10-16 前的旧 800k 预算);24h 那批六成时间在跑 agent 自己的 dev hb_compile;"调度可能卡住"是误报;11-04 重算:可领 0,但两块板各约 80 道没过,18 道新版没真跑过,264 条轨迹被挡
- [10-31 重开 78 道](reopen-20261031.md) — r20261031-05re 43 道、-06re 35 道;11-01 两个 GLM 账号都断;11-02 换 key 后各 16 路:05re 换新组 account-f(23 条暂停取消补号),06re 沿用组 e、10 条全 429 暂停在账本里改成可续;顺手给 qwen-all 补了存档和清理
- [欠的 129 道题](missing-129-tasks-20261103.md) — 11-03:338 对 209、实缺 126;三档 21/64/41,codex 约 4–6 周、能成 80–100 道,occ 基本做不出
- [data-clean 导出 batch-3](data-clean-b3-20261103.md) — 11-03:36 上 outputs/ultradata-b3,剔违规 29 + 30 道评测题 104 后主池 177 + 消融 172;merged 里还有 52 条评测题没剔;没做模型评审/人工抽检
- [Qwen 评测 30 道题](qwen-bench-30-20261103.md) — 11-03:原版 13/30;题单 runs 记每次结果,record_run.py 追加;训练只用 ultradata-b3(已剔考题)
- [RSI 拆装核对](rsi-disassembly-audit-20261104.md) — 11-04:各部件能不能换、记没记;Skill 没开关没版本、从没不带 Skill 跑过,148 和 76%/55% 都带着我们的东西;森哥 ebd_harness 已有同样分法
- [值班会话 Watchdog](watchdog-mac-mini-20261104.md) — 11-04:放进 bench 虚拟机、用现成的 pi 走智谱 key;Claude Code 被地区限制装不了;拦截出错必须拦;小金和采集报警已改由虚拟机直发、定时任务已开(11-04 12:19);key 池按额度和可用性自动选;8 把智谱 key 已放;值班会话已开;团队额度带 type=2、组织和项目 ID 已查通,按席位算;名单自动判断;11-04 用户定只放开换 key、板子解锁、拉起 collector 三个脚本(MODE=scripts,6 小时一次、一天 3 件),演练通过
- [上生产方案](prod-upgrade-plan-20261104.md) — 11-04 15:25 已上:只挑 5 个恢复类提交,不上门槛改动,不等 Qwen 跑完直接交接,16 条全接上;备份和回退在 configs/upgrade-20261104
- [10-21 至 10-28 系统原因损失](infra-loss-tally-20261028.md) — 322 条结束里约 80 条是系统原因:换 key 取消 32、盘满卡死约 22、板上自测清理没确认 14(10-27 起新冒出来,记成 AGENT_ERROR;10-28 修了,11-04 上生产)
- [板卡平台改成按次借](rdk-sandbox-lease-20261107.md) — 11-07 已上测试和生产:拿板锁后借板、装钥匙、用完就还(重置约 42 秒),隔离和指纹逻辑删了;013 已释放,007/013 都可借

66
docs/memory/MEMORY.md Normal file
View File

@ -0,0 +1,66 @@
- [优先做减法而非加法](prefer-subtraction-over-addition.md) — 修 bug 先想能删什么,别动辄加钩子和配置项
- [汇报说人话](plain-language-no-jargon.md) — 不要用金丝雀这类行话,先给结论和数字
- [bench 调度程序重启的坑](bench-restart-hazards.md) — 改文件不算换代、kill -9 条件、drain 单向、密钥在旧进程环境、启动要 10–20 分钟、导出会卡、全局并发上限要三个一起换、新账号用新组名
- [第一版交付包](delivery-package-v1.md) — 位置、冻结点 62 条、出第二版要避开的坑
- [采集稳定性补丁](quota-unknown-autorecover-fix.md) — 2f54d40→ea0335b:请求不明、板卡锁死、板端隔离、ssh 断连、回执误判、编译上限 5 次、请求结束后补放行试探、bash 超时可恢复、GLM tpm 50万→200万、连坐只挡预算用完和真跑满24h
- [成功率低的真实原因](success-rate-breakdown-20261008.md) — 10-08:真做不到的只有 2 条;GLM/Qwen 同题打平是考卷区分不出(简单题满分、难题被砍或判分卡住)
- [轨迹时间花在哪](rollout-time-breakdown-20261008.md) — 10-08:编译占 33%、编译机 CPU 只用 31%、排队中位 30 秒;04 时长是重复计算;编译上云暂无收益
- [编译机要被回收](compile-server-reclaim.md) — 10-08 晚已回收、换到 36.144.20.182;账本只有 9-28 备份;10-11 起 36 能读写网盘上的旧轨迹;120 已关机清理
- [第二个 GLM 账号与提并发](glm-second-account-20261008.md) — 10-08:05/06 原来同一账号;06 换新账号 B,05/06 各 16 路,04 不变;接续脚本位置
- [Qwen SFT benchmark](qwen-sft-benchmark.md) — 10-08 建 qwen-sft-v1:37 题;04 的 Qwen 轨迹只做训练前基准、不进 SFT;10-12 起 04 的旧结果也算,训练前过 20 败 3、14 题没结果
- [仓库主线整理](git-mainline-20261009.md) — 10-09:main=生产分支 c2c52ed,旧 main 打标签;Salty 在 feature/salty-20261009(10-20 改名 salty-prod / salty-test);本地还剩优雅退出/板卡改动
- [Salty 个人空间迁移](salty-personal-migration-20261009.md) — 10-10 完成:120 的 bench-cache/data 全在 personal:/bench/,逐文件核对通过;Salty 单文件上限 7.3–12.7G、拒软链接、du 会夸大
- [别原地改运行中的脚本](never-edit-running-script.md) — bash 边读边执行;要改就写新文件或新文件+mv 替换
- [Mac mini 主控 + Salty 全阶段执行](mini-salty-controller-20261009.md) — 10-09 至 10-12:salty_remote 设计与踩坑(工作目录、HBM 取回、网络抖动、容器内存超限、重启恢复)、轨迹搬到个人空间、导出挪到 Salty、强停写坏执行文件的处理、各处位置
- [记忆同步到仓库](memory-synced-to-repo.md) — 改完记忆同步到 docs/memory/ 并推 salty-test(上生产时随 salty-prod 快进);入口 docs/memory/AGENTS.md
- [04 的 Qwen 服务速度](qwen-nvfp4-service-speed-20261012.md) — 10-12:单请求中位 6 秒、一次只处理 1 个请求;04 开 5 路只忙 15%,不是瓶颈
- [迁到 Salty 后通过数暴跌](salty-throughput-drop-20261012.md) — 10-12 清查:主因是剩下全是重题(同模型在 Salty 不更慢);系统问题:整批重启、容器被杀占编译次数、连不上 GLM 永不自动恢复、metric3d、Wi-Fi
- [自愈与报警](selfheal-and-alert-20261012.md) — 10-12:系统失败(被杀、执行器退出、超时、卡死)不占编译次数;连不上自动续,但暂停名额仍会被抢;depthpro/metric3d 撤出;健康检查弹通知
- [容器线程被限流](salty-container-threads-20261013.md) — 10-13:容器看到 244 核只给 4–6 核,torch 慢 16 倍、numpy 5 倍;已加线程上限,onnxruntime 未处理
- [验证器核查](verifier-audit-20261012.md) — 10-12:Qwen 20 个通过是真的;但验证器不查是否真 int8(全 int16 也算过)、只抽 100 张;打平是因为系统包办了大半
- [10-13 四个基建漏洞](infra-leaks-20261013.md) — 超时步骤锁死 CPU 名额(32 剩 6)、超时后 Salty 容器不停、续跑必死、领题后重复查额度把题作废;10-13 20:41 重启后全部修复上线,22:26 导出进程加自动清理孤儿容器
- [训练前 Qwen 能力失败题](qwen-ability-failures-20261013.md) — 10-14:34/37 有结果、过 28、能力失败 6 道;短板:配置写错、不先本地诊断、归咎平台
- [Mac mini 流量绕美国](mac-mini-clash-global-proxy-20261013.md) — 10-13:Clash 全局+TUN,Qwen/Salty/GLM 全走洛杉矶 JMS 节点,是断线和 Salty 网络错误的共同根因;要用户改 Clash
- [HBM 步骤成新瓶颈](hbm-step-bottleneck-20261014.md) — 10-14:HBM≡BC 模拟器抽查在 Salty 上 1–2 小时、一夜撞时限 45 次,从没独立判出过问题;DNS_FAILED 暂停不会自动续
- [06-hbm 抽查改为按需](hbm-spotcheck-optional-20261014.md) — 10-14:模拟器抽查不再必跑(已部署);agent 可用配置开启、只作诊断;配置校验/说明与 DNS 续跑等下次重启
- [网络容错与板卡时限](net-resilience-board-deadline-20261014.md) — 10-14:原地重发/免费续跑/结果不明可续跑;板卡时限对齐;19:00 连同开发环境/自带图/速度要求一起重启上线(-v16 配置、脚本在 restart-20261014)
- [智能体自主性核查](agent-autonomy-audit-20261014.md) — 10-14:不让改图、兜底配置多、VM 无工具链;已实现 bench dev(Salty 沙箱)+ 自带图/校准(a92510d,等重启);速度 1.5 倍门槛离线重判 06 翻 37/178;上线 2 小时内还没人自带图,dev 曾能看到评测集(已修)
- [10-15 早上复查](overnight-check-20261015.md) — dev 槽 8→37(配置有缓存,只对新命令生效);S600 板盘满因失败会话目录不删(a263374 已修);暂停名额被新题抢;全 fp16 落 CPU 仍判过;4 条自带图/校准;评测文件被 task_contract 冻结,在跑的 run 不能热改(11:08 改坏三条)
- [v16 轨迹质量对比](v16-quality-20261015.md) — 10-15:dev 52/53 在用、兜底和慢速通过变少但样本少;240 轮上限截断最自主的轨迹;Qwen 3过3败是不再用全 int16 兜底,基准要在 v16 下重测
- [10-15 下午重启](restart-20261015.md) — 重启前清查:回执 15 秒超时、暂停吃掉 24 小时、400 永久暂停、账本忙让出名额、评测一次 12 GB;v17(400 轮)、判分 v0.8;之后热部署:评测分批靠批准的等价改写(不建新 run)、加载卡住检测、容器 onnxruntime 限线程、Salty 失败作业自动清
- [最新三条 SFT 细读](sft-sample-review-20261015.md) — 10-15:真通过但决策含量低;两条是 Qwen 自己的不该进训练;v16 仅 8/315、含评测题、上下文过长
- [v17 自主性实测](v17-autonomy-check-20261015.md) — 10-15 19:40:32 条 GLM 跑 5 小时 0 条结束;自己导图 0、自备校准 0、图手术 1;72% 时间在开发环境,9 条各花 4 小时编默认配置
- [v18–v22 整条链路给 agent](v18-own-inputs-20261015.md) — 自己导图/校准(v21 原图)、速度参考(编不出写 unavailable)、板上自测(≤512 MiB);10-16 16:21 重启:上下文满记预算用完、断线只停 2 分钟、Qwen 省去旧工具输出、GLM token 2M、stage wait 不轮询
- [10-16 17:00 复查](check-20261016-1700.md) — v18–21 自己导图 41/46、真改图约 3 条、0 条通过;05 的 GLM S600 账号 16:00 起全 429,17:22 换 key 和新组名(s600-r05-v22c)恢复
- [PASS/SFT 自主性统计](sft-autonomy-tally-20261016.md) — 10-16:GLM 310 条 PASS 里 71% 只写配置,成品真用自己改的图只有 4 条(3 条进 SFT);v18+ 还没通过;文本搜 onnx_model 会误报
- [第二版 0 通过的原因](v18-zero-pass-why-20261016.md) — 10-16:重启取消 42/90、82/90 是从没过的难题、到评测的都差精度;10 条想找评测集做本地验证被挡、28 条照搬平台导出脚本
- [稳定性体检](stability-sweep-20261016.md) — 10-16:最大问题是生产批次当试验场(3 天 8 版、重启即取消);19:00 复核更正:本机有健康检查但漏报限流、4000 小时实为约 1660、盘不是急事、Qwen 进 SFT/版本混杂不用改代码
- [10-16 断电停机与重启](poweroff-20261016.md) — 停/起/清理脚本在 configs/poweroff-20261016;开机 VM 自起;取消会留 dev lease 占槽;speed_ref 残留要删
- [回复用中文](reply-in-chinese.md) — 汇报、提问一律中文;命令和路径保持原样
- [10-17 02:15 底层复查](check-20261017-0215.md) — v18+ 134 条:真改图约 10、板上自测 6、通过 3(1 条板上 493 ms 没被速度挡住);平台复测不判速度;重启后很稳,只剩 Qwen 续跑必死(context-mask 状态在内存)
- [能否当强化学习环境](rl-readiness-20261017.md) — 10-17:能用,瓶颈是慢不是稳;收尾 5 件后冻结,清单外默认不再改
- [少管过程的删减清单](simplify-agent-rules-20261017.md) — 10-17:交还 Pi 压缩要改 5 处(不是纯减法,导出也要认压缩);提示词逐条分留事实/删规矩/交给系统;并入冻结版本
- [重启不丢轨迹的方案](resumable-rollout-design-20261019.md) — 不拆服务,改成状态可续:掉线后从最后完整边界续跑;6 处卡点、改动范围(待确认)
- [别家 rollout 稳定性调研](rollout-infra-survey-20261019.md) — 沙箱用完即毁、rollout 与调度解耦、检查点续跑、基础设施失败丢弃;我们取消占系统原因 54%
- [10-18 全局盘点](overall-tally-20261018.md) — 导出 871、v18+ 自主通过 15(真改结构 1)、系统原因每天 20–89%;已清 36G、加了磁盘报警和 offload 自动清理
- [10-18 VM 盘只读](vm-disk-readonly-20261018.md) — 18:46 系统盘 EIO 转只读,04/05 collector 退出、在跑 21 条全断;库完好;22:10 重启 VM 修好、取消补号 21 条、04/05 v23 重新跑满
- [10-17 停 06](stop-06-20261017.md) — 账号 B 没额度,11:30 只 SIGTERM 不取消;原命令/环境在 configs/stop-06-20261017;换 key 要新组名并取消暂停的 ;10-17 v23 上线时用户定 06 继续停,等新 key
- [v22 新数据细读](sft-v22-review-20261018.md) — 10-18:新进 GLM 12 条,v22 明显变好(7/10 评分≥4);量小、上下文过长、开发环境仍能读评测器源码、速度没人管
- [测试 collector](staging-collector-20261019.md) — bench-staging:共用生产状态、单独账号组;VM 上新建批次工具链路径不对要拷 job.json;测试已验证重启接管
- [Salty 删除接口 405](salty-storage-rm-405-20261019.md) — 10-19 16:50 起 storage rm 全 405,旧清理重试 30 分钟挡住结果;45dcce1 只试一次;10-20 测试换 CLI 0.2.4、删除变后台任务仍失败,77031cd 后台按退避重提;上生产要连 CLI 一起换;10-20 14:41 生产已热修一次性清理(先删作业)
- [分支规矩](branch-workflow-20261020.md) — salty-prod=生产在跑的代码,salty-test=测试;改动先进 salty-test 上测试,稳了再快进 salty-prod 上生产;别新建分支
- [10-20 生产换新代码](prod-switch-20261020.md) — 15:05 不排空直接接管:36 条接上、丢 1 条(板上评测中);部署包/备份/launch.py 在 configs/deploy-20261020;板卡租约泄漏 15:26 已热修;遗留 06 的 16 条隔离、04 的 9 条老暂停
- [10-20 Salty 作业列表撑爆](salty-jobs-list-outage-20261020.md) — 17:00–19:47 全部 Salty 步骤失败:作业等目录删掉才删、积了约 8000 个;批量删 + 先删作业的热修(89c4801)恢复;CLI 换成 0.2.5
- [v23 SFT 链路细读](sft-v23-chain-20261020.md) — 11 条:导图、校准、配置是 agent 自己做的,权重、基线、编译执行是平台做的;改图 0 条,速度没判,yolov5l 读了评测器源码
- [06-hbm 产物没带回](salty-06hbm-not-returned-20261020.md) — 第一次 OOM、重试时 HBM 没变就不回传,导致 UNVERIFIED;1981488 改成每次都带回,hrnet.w48 / ocrnet.hrnet.w18 重判为 PASS
- [dev 容器 OOM 翻倍](dev-oom-memory-doubling-20261020.md) — 50f163e:dev 作业失败后内存翻倍(上限 128Gi)、排除会话临时文件;21:41 上了生产;Qwen 整组暂停约 26 分钟的问题待定;巡检脚本 configs/monitor/infra_check.py
- [10-21 Mac mini 重启](reboot-20261021.md) — 03:16 重启、停了约 4 小时;07:15 挪走旧开机租约后按存档原样拉起、不取消:续上 30 条,隔离 9 条;拉起脚本 start-reboot-20261021.sh
- [10-21 sorting out 04 paused rollouts](q04-resume-cleanup-20261021.md) — Qwen stalls used up the resume budget: 7 got one more resume, 7 cancelled, 3 empty records abandoned; cancels only block 30 min with unknown remote ops; global agent pool of 40 leaves 04 four lanes
- [opencode 接入与测试](opencode-staging-20261021.md) — 10-21/22:terminal_exec+额度代理+预算口径+导出截断+path-guard+共用依赖(salty-test,未上生产);重跑 3/3 PASS;进 SFT 要给 opencode 写严格校验;别把 opencode 排队项放进测试 collector 的批次
- [CLI 换 0.2.6](salty-cli-026-20261021.md) — 10-21 17:46 服务端改作业列表格式,0.2.5 解析失败、步骤成片 REMOTE_UNAVAILABLE;20:08 测试/生产换 0.2.6 恢复,备份在 configs/hotfix-20261021;20:12 服务端 502 约 1 分钟已自愈
- [Why so many export rollouts lack a verdict](missing-verdict-breakdown-20261021.md) — 39% is cumulative: 76% before 10-08 and the rest mostly restart cancellations; normal days now about 4%; not a model problem
- [37 道题严格重判](strict-rejudge-37-20261022.md) — 10-22:严格口径下题数 Qwen 21、GLM 14;GLM 过而 Qwen 不过只剩 mobilenet.v3.small;GLM 优势多是兜底
- [隐藏 adapters 的后果](hide-adapters-impact-20261022.md) — 10-22:控制机放行+开发容器整包带平台代码;源码已缓存不用重下;评测用 adapter 解码,隐藏前要补输出约定
- [10-22 GLM vs Qwen pilot](pilot-glm-vs-qwen-20261022.md) — 8fb9349 hides adapters + adds I/O contracts + strict rules in the prompt; r20261022-pg/pq, 10 tasks x4; configs/pilot-20261022; strict judging is still offline
- [10-23 production pose rule rejudge](prod-pose-shift-rejudge-20261023.md) — 2 px rule removed from 04/06 job.json; only 2 turned PASS, those with offloaded HBM come out UNVERIFIED on rejudge and were restored; 26 still pending
- [10-24 BPU and speed gates](bpu-speed-gates-20261024.md) — G1 compute must be on BPU, G4 1.5x board reference + faster than board-CPU FP32; onnxruntime on boards; xfeat is slower on BPU than CPU; staging only

View File

@ -0,0 +1,129 @@
---
name: agent-autonomy-audit-20261014
description: "10-14 核查智能体自主性:04/05/06 共 627 题都不让改图(ONNX 钉死),难题被堵死;通过的配置多是\"全换 int16 / 全换 fp16\"的兜底,按模型诊断的只有约一成;照抄模板不是主因"
metadata:
node_type: memory
type: project
originSessionId: 2b85e929-b893-42c3-a7a0-3a72bda14705
modified: 2026-10-14T08:58:17.164Z
---
用户问:系统包办 + 模板照抄,是不是让智能体体现不出能力(实际工作要自己导出 ONNX、拆算子)。2026-10-14 查代码和会话的结论:
**1. 真正的硬限制是不能改图**
- compile 用的 ONNX 由平台钉死:ptq.compile_config 覆盖 model_parameters.onnx_model。agent 只能改 compile.yaml 的三段(stageworker.snapshot_config 白名单),custom_op 之类会被拒。
- 代码里其实有"提交自己的图/导出代码"的入口:`bench stage run export --recipe`,见 docs/extensions.md、harness/recipes.py。但它要求 job 里有 model_recipe.reference,而且只支持 PTQ 语义分割。04/05/06 的 627 道题一道都没开。
- 盘上会话里有 11 条失败轨迹试过 `--recipe`,都被拒("job must freeze a model_recipe reference policy")。
- GLM 在 05 有 24 题、06 有 26 题从没通过,约一半连一次编译都没成功,正好是要改图的题:
- mask2former:Einsum 算子不支持;
- flownet2:resample 输出的形状推不出来;
- unidepth:解码器是 float64;
- depthpro:导出失败;
- 还有 aliked、keynet、detr。
- GLM 的报告诊断得很准,最后都写"没有任何改图入口"。flownet2 那条怀疑是 harness 自带的 vendor/flownet2_cpu_ops.py 里的 resample 有问题,**还没核实**。
**2. 照抄模板不是主因,主因是兜底配置**
- 374 次写配置,没有一次照抄模板里的示例节点名。
- 通过轨迹最终用的配置(还在盘上的样本):
- 06(S100P int8):43 条里 24 条全模型 int16,都是先 int8 失败、平均第 3 次编译才换的;只有 4 条按节点调。
- 05(S600 fp16int8):44 条里约 28 条是"除卷积外全 fp16",有的连卷积也 int16、完全没有 int8;按节点调的约 6 条。
- 04(Qwen):32 条里 14 条全 int16。
- 验证器不查 int8 比例(见 [[verifier-audit-20261012]]),所以这些都判通过。SFT 会学到"失败就全换高精度"。
- 一次编译就通过的比例:GLM-06 111/186,GLM-05 76/109,Qwen-04 31/66。通过的题里分类题最多(06 有 94/186)。
**3. 最像智能体的行为都在失败轨迹里**:本地复现、克隆官方源码比对、定位算子。这些轨迹被平台堵死后判 FAIL,进不了训练数据。
**4. 给用户的改法(10-14,等拍板)**
开放改图,走窄路,不推广现有的配方框架:
- 配方框架要每题登记参考源码哈希,只支持分割题,评测还要跑 agent 写的前后处理,太重。
- 窄路是 compile.yaml 允许写 `model_parameters.onnx_model: <workspace 内 .onnx>`,要求输入输出的个数、顺序、形状与平台 ONNX 一致。这样基线、上板、评测都不用改。已核实:quant 评测不读平台 ONNX,基线来自 torch 参考。
- 要改的地方:
- stageworker.snapshot_config:允许这个字段,用 recipes._stream 复制进受保护的队列目录;
- ptq.compile_config:用这份图;
- salty_remote._bundle:把图带进容器;
- s04:在容器里比对输入输出,不一致就直接失败,不占编译次数,同时记录图的来源和 sha;
- SYSTEM.md。
- 前两处和 SYSTEM.md 要重启才生效,s04 部署即生效。
- 开放后能做:本地导出、改写算子、交预量化模型(calibration_type: skip)、等价改权重。
- 风险:测试集 agent 可读,改过的图可能把 100 张的答案写死。做 SFT 先接受,记录图的 sha 供抽查;转 RL 前要加一份 agent 看不到的评测子集。
堵兜底:
- 编译日志节点表里的输出类型不能用。卷积是 int8,但输出 fp16 时也显示 f16。
- 可靠的度量是编译器估计的延迟,和同一题默认 int8 编译比。默认编译每题跑一次,缓存后共享。
- 先离线重判给用户看会翻多少条,阈值由用户定。
开发环境(10-14 下午复查,**排第一**):
- 迁到 Mac mini 后,agent 的 bash 跑在 VM 里,但 VM 里没有工具链:
- 没有 /home/ming01.wang/toolchains;
- 系统 python 没有 hmct、onnxruntime、torch;
- 连提示词让用的 rg 都没装。
- 10-13 以来 05/06 的 171 条会话里,只有 5 条跑成过一次本地试验。GLM 在难题上靠的"先本地诊断再编译",现在做不了。
- 所以问题不是算力不够,是工具根本不在。
- 改法:把受管终端(terminal.py 的 development 目标,现在关着,而且只在本机跑)改成走 Salty,复用 salty_remote 的打包和取回。workspace 带进去,跑完带回来。
- 开发环境里可以随便跑 hb_compile、hmct、torch.onnx.export;正式编译仍走 stage、计次数。
顺带发现:e2e-occ 提示词说可以指向自备校准 npy,但白名单不收 cal_data_dir。(已修,见下)
**5. 已实现(10-14 a92510d,等重启上线)**
- 一、`bench dev`:
- agent 用 `bench dev "<命令>"` 提交,经 stageclient 写成 terminal 票(target development)。
- terminal.run 发现 salty_remote.stages 里有 terminal,就走 harness/salty_dev.py;worker 用 dev 模式跑。
- 沙箱:setpriv 降到 uid nobody,再 `unshare -Urm`;tmpfs 盖住 /data/personal,只把工具链、outputs、cache、data(靠属主只读)和本轨迹 workspace 绑回来,最后去掉全部能力再执行命令。
- Salty 实测:
- 板卡密钥、/root/.ssh、其他轨迹都看不到;
- 不去能力时 umount 能看到整个个人空间,去掉后挡住了;
- 能 import hmct、onnxruntime、torch,小卷积网络的 hb_compile 能出 hbm(玩具全连接模型在沙箱外一样崩,是 hbdk 自己的问题)。
- 每条命令开销约 75–80 秒。
- 工作区同步:本地改动按 stages/_dev-sync.json 上传;单个 ≤32MiB 的文件拷回本地;更大的只留在 personal:/bench-root/runs/.../workspace。
- 局限:容器里起的后台进程随命令结束;开发环境的大文件不会自动清理。
- 二、compile.yaml 可以写 `model_parameters.onnx_model`、`calibration_parameters.cal_data_dir`(workspace 内的相对路径):
- stageworker 先归一化;s04 在容器里比对输入输出,不一致就以 own_input_invalid 失败,不占编译次数;
- 记录图的 sha256 和 calib_source=workspace;hb_verifier 仍用平台的校准样本。
- 历史上 1377 份配置里只有 4 份写了 onnx_model,全是 agent 在试自带的图。
- SYSTEM.md 加了开发环境一节,rg 改成 grep;agent/VERSION 15→16(新旧轨迹按版本区分)。
- 三、速度门槛离线重判:
- 方法:最终模型的编译器估计延迟 ÷ 同题平台默认配置编出的延迟,在 Salty 上读 personal:/bench-root/runs 全量。
- 默认配置通过的比值 0.91–1.12,所以噪声约 ±10%。全 int16 是 1.5–6.2 倍。
- 阈值 1.5 倍时会翻掉的通过轨迹:
- 06:37/178(36 条全 int16,1 条 yolo11n);
- 04:24/64(18 条全 int16,6 条按节点调的,板上慢 7–500 倍,多是落 CPU);
- 05:只有 41/109 有参考(S600 上 agent 很少编平台默认配置),翻 10 条。
- 板上延迟比估计更能抓到落 CPU,正式门槛要用板上测的默认配置做参考。05 要每题补一次默认编译。
- 结果文件在 scratchpad 的 speed-out.json,脚本是 speed.py。
- 四、上线后 1 小时 50 分钟核查(10-14 20:50,v16 共 34 条轨迹,还没有一条跑完):
- 自带图提交 0 条、自带校准提交 0 条、改图命令 0 条。29/34 用了 bench dev,共 140 条命令。
- 命令主要是:看平台 ONNX 结构、读 harness 源码(编译和评测代码)、按速度要求在 dev 里编一次默认配置(约 20 次)。
- 首次提交的配置仍是默认加 per_channel 加 set_model_output_int16,跟以前一样。
- 结论:工具到位了,行为还没变。改图只会在配置调不过时才出现,要等这批难题跑完再看。
- 发现并修复(f16faee,20:47 热部署,不用重启):
- bench dev 能看到评测集 t1(带标签)和 pool,是 a92510d 引入的。efficientvit.b3 读过 t1。现在只挂 bench/data/calib。
- salty_dev 重复上传一次 bundle,已去掉。
- SYSTEM.md 第 57 行还写着「评测数据只读可见」,下次换版本时删掉。
- 五、23:50 复查:
- f16faee 两处都生效:dev 里读 t1/pool 报不存在;成功命令中位 71 秒(之前 78)。
- 开始真改图了:maxvit.t 把 Einsum 改写成 MatMul+Transpose(跑通),reppoints 物化 Reshape 目标(被排队饿死)。另有 4 条在逐节点诊断。还没有提交自带图。
- 新瓶颈:dev 池只有 8 槽(三个 run 共用锁),被 agent 自设 3–12 小时超时的长编译占住(最长 272 分钟)。短命令排到自己超时就报 STAGE_EXECUTOR_EXIT,19:56 起共 47 条,echo 也排了 37 分钟。Salty 当时不排队,瓶颈在我们自己的槽数。
- pools.dev.workers 每次现读配置文件,三个 -v16 配置一起改就能生效、不用重启;改不改等用户拍板。
- 六、10-15 10:43 自带图结果:
- 真改图的 4 条,都还没有最终结论:
- deeplabv3plus.r101(05):拆卷积加自做校准,编译、HBM、上板都过了,评测在跑。这题以前 12 小时没过。板上 506 ms,静态估计 38 ms,BPU 利用率 3.5%,大半跑在 CPU。agent 看到 job.json 里 G4 不是必选,就不管速度要求了。
- maxvit.t(06):Einsum→MatMul,编译和 HBM 过了,08:13 起卡在一条 dev 长编译上。
- deeplabv3plus.r50、fcn.r101(05):同样是拆大卷积(2560→512、2304→256),10:00 起在正式编译。fcn 还在一个校准样本上验证了浮点等价。
- 04 superpoint 是「自带图自带校准」的 PASS,但两样都是 cp 的平台文件,不算。以后统计自带图要比哈希,排除这种复制。
- vit.h.14(06)自做校准编过两次,240 轮用完没上板(BUDGET_EXHAUSTED)。
**Why:** 用户要把这套当训练数据来源和以后 RSI 的基础设施。考卷决定了能学到什么。
**How to apply:**
- 改进顺序(10-14 给用户的方案):
1. 开发环境上 Salty;
2. 窄路开放改图,加 cal_data_dir 自备校准;
3. 验收加速度要求;
4. 删掉提示词里喂饭的话;
5. 以后再做:nv12 输入、板上前后处理、板上终端、隐藏的验收子集、QAT。
- 改判分标准、改题目都要用户拍板。
- 样本只覆盖还在 VM 盘上的会话(04 有 38 条、05 和 06 各 60 条,偏向较新、较难的题);更早的已归档到个人空间。
- 统计脚本在 scratchpad 的 sess.py、cfg.py、cfg2.py。
相关:[[verifier-audit-20261012]] [[qwen-ability-failures-20261013]] [[success-rate-breakdown-20261008]]

View File

@ -0,0 +1,59 @@
---
name: bench-restart-hazards
description: model-compile-hbdk 的 bench 调度程序重启时三个没写进文档的陷阱
metadata:
node_type: memory
type: project
originSessionId: 2636af57-8cef-4006-92c2-7d78ac925e56
modified: 2026-10-03T16:33:23.678Z
---
2026-09-18 实测确认,`bench collect` 换代时有三个坑,CONTRACT.md 只写了其中第一个:
1. **改文件不算换代**:stage 在长驻 `bench collect` 进程内执行(`hb_compile` 的父进程就是它),
必须重启进程才生效。CONTRACT.md:184 有记录。
2. **绝不能 kill -9 调度程序**:`pools.agent.workers=12`,而 `pipeline.py:509` / `db.py:238` 的 active
计数是 `SELECT COUNT(*) FROM rollouts WHERE state IN ('RUNNING','VERIFYING')`,**跨 run 无过滤**。
全仓没有 rollouts RUNNING→QUEUED 的路径(`reset-stale` 只动 jobs 和 stages),硬杀会让那些行
永久占死全局槽位,无 CLI 可救。只能 SIGTERM。
3. **`bench drain` 是单向闸门**:`collect_drain_file` 只有 `cli.py:182` 的 `.touch()`,全仓无 unlink,
也没有 undrain 子命令。用了 drain 就必须在重启前手工 `rm state/drain-collect-<run>`,否则新进程启动即自停。
优先用 SIGTERM,它不产生哨兵文件。
4. **密钥可能只在旧进程的环境变量里**(2026-10-04 踩坑):`paths.secret()` 先读环境变量,再读 `bench/.env.local`。
04 批次(Qwen)用的 `QWEN_EVAL_API_KEY` 不在 `.env.local` 里,只存在于旧进程的环境中;我结束旧进程后,
只照搬 `BENCH_*` 重启,结果报 `CREDENTIAL_UNAVAILABLE: teacher`。
重启前先把配置里所有 `api_key_env` 和 `.env.local` 对一遍,只比对变量名;缺的先让用户补进 `.env.local`,再动旧进程。
另:`--first-pass` 的过滤器按 **job 聚合**(`pipeline.py:503`)且会并入源 run 历史,对 continuation run
(如 r20260916-01-n100)会把 206 条 QUEUED 全部挡掉、可放行 0 条——这正是它空转 14 小时的原因。
换代时务必自己算一遍可放行数,不要相信转述。
5. **重启要等很久,而且旧进程会卡在最后的导出上**(2026-10-04 实测):
- 新采集器在网盘上启动时要逐条核对 836 条任务,要过 10–20 分钟才会认领第一条,期间进程处于 D 状态、CPU 很低,这是正常的,不要误判成卡死。
- 旧采集器排空后会一直卡在最后的数据导出(`datasets/<run>-training/.refresh-*`)。确认这个批次的运行中、校验中、清理中都是 0 条之后,再等 5 分钟仍未退出,可以 kill -9;之后删掉留下的 `.refresh-*` 目录。
- 正在跑的任务没有"暂停后接着跑"的办法:配额管理器在采集器进程里面,进程一停,正在跑的任务就断了。想马上重启只能先用 `bench execution cancel` 取消正在跑的任务;不想丢任务就只能等它们跑完。
- 重启时照搬旧进程的命令行、工作目录、环境变量(尤其是 `BENCH_CONFIG`),日志用 `>>` 追加到原来的日志文件里,就不会产生新的批次或文件。
- 看日志时不要用时间字符串大小比较来过滤(日志会跨天),按每次启动时打印的 "collect <run>: parallel" 那一行的行号来截取。
- `bench execution cancel` 偶尔会卡在网盘读写上(进程等待 FUSE,wchan=request_wait_answer),重启脚本就停在 `wait` 不往下走(2026-10-08 实测卡了 20 分钟)。先查这条轨迹在库里是否已经是终态;是的话直接 kill 这个取消命令,脚本会继续往下走。
6. **想提并发,三个 collector 得一起换代**(2026-10-08 实测,代码读过):
- `pools.agent.workers` 是**所有批次加总**的上限(`pipeline.py:595`),而且只在 collector 启动时读一次。只给一个批次调大,别的批次进程里还是旧上限,总数一超过旧上限它们就补不上位置,会被挤掉。
- 同一批次只能有一个 collector(`locks/collect-<run>.lock` 排它锁),不能靠"同批次再开一个"加并发。
- broker 启动时就把 key 读进内存,之后改 `endpoints` 不会换 key;改了 `collection_v1` 段,在跑的进程会报 `RUNTIME_CONFIG_CHANGED`。所以**永远另写一份新配置,不改正在用的那份**。
- 账本(`~/.local/state/bench-shared/quota.sqlite`)存着每个账号组的规则,配置里同名组的规则只要差一个字段,启动就报 `QUOTA_POLICY_CONFLICT`。新账号要用**新组名**;老组规则不要动。
- **`paths.config()` 带 `@lru_cache(maxsize=1)`(paths.py:55),每个进程只读一次配置**;scheduler.py:156 注释说"每轮重读"已过时。改 `pools.cpu.workers` 只对改之后新起的 stage 进程生效(每次编译/HBM 是新进程,所以很快普遍生效),已经在排队的仍按旧槽位数等。10-08 我起初漏看这个装饰器,误判过一次。
7. **不等排空、直接重启的流程**(2026-10-08 跑通,21 条全部成功):先 SIGTERM 旧 collector,再对每条在跑轨迹执行
`bench execution cancel --run R --job J --kk K --reason ...`(环境照抄旧进程,`BENCH_CONFIG` 用旧配置)。每条约 30 秒;
取消后库里会先短暂显示 `VERIFYING`,片刻后变为 `CANCELLED`,这是旧进程在收尾,不是失败。旧进程随后照例卡在导出,按第 5 条处理。
脚本在远端 `/home/ming01.wang/raise-concurrency-20261008/cancel-inflight.sh`、`relaunch.sh`。
- 没有"暂停后换进程续跑":`execution resume` 只接受系统因额度等待主动暂停(`PAUSED_INFRA` 且有断点)的轨迹;进程被杀后 reconcile 会把在跑的记成 `LOST`。
- 取舍依据:按已跑时长算条件成功率,跑过 5 小时的只有 10–15% 能 PASS;10-08 那次 21 条预计只值约 4 条 PASS。
- 本机 shell 是 zsh,`set -- $var` 不拆词;本机写轮询判断时用 `bash -c` 或把判断放到远端 bash 里。
8. **取消在跑轨迹会让账号组停约 21 分钟**(2026-10-12 实测):`bench execution cancel` 打断发到一半的模型请求,这些请求记成"结果不明",整个账号组进入 RECONCILING,新调度程序起来后也领不了题,要等 request_total_s(1200)+window(60) 后自动放弃才恢复。10-12 17:17 取消 46 条后,05 到 17:39 才开始领题(06 刚好没有发到一半的请求,立刻领满)。立即重启时预留这段时间,别误判成卡死。
9. **重启虚拟机(断电)时,暂停的轨迹也续不了**(2026-10-16 实测):process_status 对旧开机的进程返回 UNKNOWN,开机后 reconcile 把 PAUSED_INFRA 轨迹标成 OWNERSHIP_UNKNOWN 隔离,resume 也拒绝开机变过的。停 VM 前要把可续跑的暂停一起取消补号;事后取消要等 30 分钟清理时限。详见 [[poweroff-20261016]]。
10. **交接停太久,续跑会直接判超时,而且补号被挡**(2026-11-08 实测):轨迹的 24 小时执行时限按墙钟算,collector 停着也在走。11-06 交接停了 33 小时,11-08 拉起时 12 条里 10 条立刻 DEADLINE_EXCEEDED(timeout_reason=EXECUTION_DEADLINE_EXCEEDED);同题互斥规则把它当成"真跑满 24 小时",同批次补的号永远不领,只能另开批次重跑(见 [[qwen-all-20261030]])。**11-08 已修**(salty-test e43606c / salty-prod dcf976d,08:4x 装进生产和测试目录,采集进程下次启动才生效):真正原因不是封顶,是拉起时 reconcile_run 先让 Worker 收尾、把 execution.json 的 updated_at 刷成当前时间,核对再拿它当暂停起点,停机时长算成 0。现在用核对前读到的 updated_at(上一代最后一次写)当失联时间,停机时长整段加回时限、不封顶,记在 execution.json 的 downtime_s。测试采集上交接停 110 秒实测 downtime_s=112、原样续上。旧的超时判定(停机期间时限走完被同题互斥当成真跑满)对修复前已结束的轨迹不变。

View File

@ -0,0 +1,26 @@
---
name: bpu-speed-gates-20261024
description: 10-24 BPU-compute gate + board-measured speed gate + board-CPU FP32 floor (salty-test 1dcf331/fd508fc, not in production); onnxruntime installed on the boards; xfeat on the BPU turns out slower than the CPU
metadata:
type: project
---
On 10-24 the user asked for "must use the BPU, and be faster than CPU". Measuring CPU speed on Salty was ruled out (x86, quota-limited, not the deployment hardware). What was built:
- **G1 bpu_compute**: 06-hbm parses the hb_compile node table (`| Node | NodeType | ON |`); any Conv/ConvTranspose/MatMul/Gemm left on the CPU fails it. Only judged when gates.yaml `G1.require_bpu_compute` is frozen into the batch; when the measurement lacks the field, it is skipped.
- **G4**: at batch creation, registry.speed_budget reads agent/speed_ref/<job>.json: `latency_budget_ms = 1.5 × board_latency_ms`, plus `cpu_fp32_latency_ms`. It also fails when the model is not faster than the CPU, and records speedup_vs_cpu.
- **scripts/board_refs.py**: board_latency_ms = median 07-board latency of plain int8 builds of the same task (only rollouts whose compile.yaml is still local). cpu_fp32_latency_ms = the platform FP32 export, run with onnxruntime on the board CPU under the board lease.
- **Boards**: onnxruntime 1.19.2 is installed in `/userdata/bench-ort` (pip --target; system Python untouched; S100P is py3.10, S600 is py3.12). Board CPU is A78AE (S100P 6 cores, S600 18).
- **Validation**: separate code directory `bench-gates` (pilot and production untouched), batch r20261024-gt (GLM, 4 tasks × 1, configs/gates-20261024).
**Findings**: board CPU FP32 is atss 1077 ms, simplebaseline 142, pspnet 4665, xfeat 25. **xfeat on the BPU is 70 ms, slower than the CPU (0.36×)**, so all 6 pilot xfeat PASS rollouts fail the new G4; the other three tasks are 59–67× faster. No pilot rollout had compute left on the CPU. Measurement pitfall: board_refs must not leave BOARD_* modified in the process environment (the registry check reads BOARD_PORT for slot 0) — fixed in fd508fc.
**Why:** "Passing" used to check only accuracy, not whether the model actually ran on the BPU or whether it was fast.
**How to apply:** Before production, board_refs.py must be run for each production task (board_latency is missing for tasks without plain int8 history), and gates only reach new batches (old batches' job.json is frozen). xfeat's 70 ms needs a check for board_perf overhead. Related: [[pilot-glm-vs-qwen-20261022]] [[agent-autonomy-audit-20261014]]
**10-24 12:36 in production** (user approved; salty-prod fast-forwarded to 31817a7):
- **Code swap**: backup in configs/deploy-20261024/prod-code-before.tgz. Production registry/boards.yaml excluded and kept (only 40007/40013 enabled).
- **Handover**: 05/06 handed over to 3 lanes each with stop-boards-20261023/lanes3.sh (saved 11:10 cmd/env); both resumed within 10 s.
- **job.json**: 387 unfinished production tasks (05: 198, 06: 189) got `G1.require_bpu_compute`; backups in deploy-20261024/jobjson-before; mode 444 preserved.
- **Speed limits**: deploy-20261024/prodrefs.py runs one background process per run (pids in prodrefs.pids; logs logs/prod-board-refs-05/06.log), running tasks first. Each task gets board_refs and then its job.json G4 is written. Tasks with no plain int8 history get no budget, only the CPU floor.
- **31817a7**: speed_ref passes `platform_code=True` to `salty_dev.execute`, so it still packs the export tool; agent bench dev still does not.
- **Note**: rollouts that were already running get judged by the new gates when they finish.

View File

@ -0,0 +1,17 @@
---
name: branch-workflow-20261020
description: 两个固定分支:salty-prod = 生产在跑的代码,salty-test = 测试分支;改动先进 salty-test、上测试 collector,验证后把 salty-prod 快进过去再上生产;别再新建分支
metadata:
type: project
---
10-20 用户定的规矩("以后别乱了",名字要一眼看出生产/测试):
- `salty-prod`:**只放生产正在跑的代码**(原 feature/salty-20261009,10-20 改名)。10-20 15:05 生产换到 a6e2ce0。
- `salty-test`:测试分支(原 resumable-20261019,10-20 改名)。新改动都提交到这里,部署到测试 collector(bench-staging)验证。
- 上生产:测试上跑稳后把 salty-prod **快进**到 salty-test 的那个提交(`git push origin <commit>:refs/heads/salty-prod`,不强推、不合并提交),再按 [[bench-restart-hazards]] 部署同一个提交。
- 生产热修也要同时提交到两个分支。
- **不要再新建分支、不要再改名**:10-20 多建过一个 staging 分支,用户不满意,已删。仓库里另有旧的 main / production/s100p-infra-fix-20260928(9 月主线)和 simplify-20261017,都不用。
- zsh 里拼 refspec 要写 `"${P}:refs/heads/x"`:`$P:r` 会被 zsh 当成去扩展名修饰符。
**Why:** 之前生产代码、测试改动、生产热修分在三处,对不上。
**How to apply:** 改代码在 salty-test 上;上生产前核对生产目录与 salty-prod md5 一致。相关 [[git-mainline-20261009]] [[staging-collector-20261019]] [[memory-synced-to-repo]]

View File

@ -0,0 +1,44 @@
---
name: check-20261016-1700
description: 10-16 17:00 复查:v18–v21 共 46 条,自己导图 41、自做校准 43、真改图约 3 条、板上自测 2 条,但 0 条通过;05 的 GLM S600 账号 16:00 起全是 429;Qwen 重启后等了 30 分钟
metadata:
node_type: memory
type: project
originSessionId: 8477d54c-f423-4a01-ab7c-492675d618dd
modified: 2026-10-16T08:55:20.221Z
---
10-16 16:50–17:00 复查(16:21 刚用 v22 重启)。
**v18–v21 的 46 条轨迹(10-15 21:43 到 10-16 16:20)**
- 行为:
- 43 条用了 dev;41 条在 dev 里自己导图(v17 是 3/40);43 条自做校准。
- 真改图约 3 条:
- 06 efficientvit.b1:在线性注意力里缩放 relu(q)/relu(k);
- 04 yolov8n.seg(Qwen):把 proto 的 SiLU 换成 tanh 形式;
- 06 depth.anything:自己造小模型探测 int8/int16 MatMul 的延迟。
- 板上自测:2 条用过,8 次里成功 2 次。
- 时间:dev 202 小时,正式阶段 24 小时。
- 结果:**0 条通过**。
- 25 条被 16:20 的重启取消。
- 8 条 INFRA_ERROR:Qwen 上下文超 256k 有 5 条,其余是 broker 503 等。
- 3 条预算用完,都是 GLM 的 80 万 token。
- 还有 10 条在跑。
- v17(40 条):7 条通过(Qwen 4、GLM 3);15 条预算用完,12 条超 24 小时。
**卡住的情况**
- 05 用的 GLM 账号 glm-coding-s600-account:
- 16:00:59 起每次请求都返回 HTTP 429 RATE_LIMIT。账本每 15 分钟试一次,05 的 16 条全部 WAITING_QUOTA。
- 前 3 天一次 429 都没有。15 点那一小时请求 429 次、1860 万 token,约为平常的 2–4 倍。
- 429 的正文没有落盘,看不出是哪种限额、什么时候恢复。
- 06 的账号 B 正常;16 点那一小时 749 次请求、3040 万 token,也明显偏高。
- 04 Qwen:重启时取消了在途请求,结果不明,组进入 RECONCILING,等满 30 分钟的请求期限(16:59 自动作废)才恢复,16:55 已经有 5 条在跑。UNKNOWN_HOLD_S=120 没有覆盖到"取消造成的结果不明"。
- 速度参考只算完 7 道,失败 4 道。
- 主机时钟:账本时间比 VM 的 date 快约 6 分钟,看时间对不上时注意。
**Why:** 用户问"会不会自己改图、进度、有没有卡死、数据是不是更像人用 agent"。
**How to apply:**
- 看 05 停摆先查 s600 账号的 attempts.http_status。
- 想看 429 正文,broker 要先把它记下来;不要拿密钥自己去打接口。
相关:[[v18-own-inputs-20261015]] [[v17-autonomy-check-20261015]]

View File

@ -0,0 +1,30 @@
---
name: check-20261017-0215
description: 10-17 02:15 底层复查:v18+ 134 条的流程漏斗(导图 105、真改图约 10、板上自测 6、正式评测 20、通过 3);平台独立复测怎么做、漏了速度;重启后 5 小时很稳,只剩 Qwen 续跑必死(context-mask 有内存状态,续跑时请求对不上)
metadata:
node_type: memory
type: project
originSessionId: e00ddcbc-d4da-4f81-a8f7-1fd7eeb8e8df
modified: 2026-10-16T18:24:07.553Z
---
10-16 19:20 用户为断电取消 36 条(POWEROFF_20261016),Mac mini 20:26 重启,20:57 三个 collector 用 v22 配置起来(05 是 s600-r05-v22c)。仍走 Wi‑Fi,网关变成 192.168.1.1。
**v18+ 134 条漏斗(02:15,按 terminal_result.json 命令 + workspace 脚本 + stages 表)**
- 用开发环境 114;导图 105(72 条用了平台的 harness.tools.export_onnx,92 条有 torch.onnx.export,有重叠);原图做校准 105;开发环境本地编译 98;本地精度诊断 101。
- 真改交付图约 10 条:maxvit.t×2 改写 einsum、depth.anything.v2.large、efficientvit.b1、mask2former 改 einsum、05 fcn.resnet50 和 deeplabv3plus.resnet50 拆卷积、04 yolov8n.seg 改 proto、efficientnet.b0 拆 swish、retinanet.r50 拆 FPN(失败)。swin.b、两条 depth 的 make_node 是探针或库文件,不算。
- 板上自测只有 6 条(重启后 25 次命令、19 次成功,用的人在变多)。
- 正式编译提交 49、成功 32、HBM 30、上板 22、评测跑完 20、PASS 3。状态:取消 78、在跑 37、系统出错 12、预算用完 4、PASS 3。
- 3 条 PASS 都在 05(S600):efficientnet.b7 = 平台导出脚本 + 默认配置 + per_channel,一次编过;fcn.resnet50 = 自写导出、PyTorch 层拆卷积、开发环境小样本试编;deeplabv3plus.resnet50 = ONNX 拆卷积 + 本地编译诊断 + 2 次正式编译,但板上 493 ms、BPU 2%,自己的静态估计 26 ms,平台参考(默认配置静态估计)38.8 ms。三条都没用板上自测。
- 训练数据:05 SFT 101(v16–17 只有 5)、06 164(v16–17 只有 2),v18+ 0 条。
**平台独立复测**:verify.verify_rollout 只读平台阶段(06-hbm/07-board/08-eval)的测量,HBM sha256 在 G1/G3/G4 绑定;agent 的开发环境、板上自测结果标 UNVERIFIED、不计。agent 不调用正式阶段就是 UNVERIFIED,平台不自己补跑。缺口:G4 速度只记录(verdict na);速度参考是 hb_model_info 静态估计,不含落 CPU 的算子,所以抓不到 deeplab 这种情况。要在板上测默认配置的延迟才行。
**重启后 5.3 小时**:健康检查一直 ok;GLM 请求 4072 次,只有 1 次中断(已续上);阶段 98 次成功、3 次失败(conditional.detr 编译挂死、pspnet.r101 容器被杀、1 次 own_input_invalid 不计次数);开发命令 949 条,系统原因的失败基本消失(执行器退出 0 次,超时 12 次)。
**唯一新的系统 bug**:01:24 04 两条 Qwen(efficientnet.b0 在拆 swish、retinanet.r50 在拆 FPN,各跑了约 4.5 小时)续跑 4 秒就以 INFRA_ERROR 结束。链条:00:53 一个 Qwen 请求流式空闲超时 → 整个 Qwen 组暂停 → 01:24 自动放弃那次请求并续跑 → 续跑重发的请求被 broker 拒,返回 409 EXECUTION_HAS_UNRESOLVED_GENERATION(quota._begin 要求重发内容和原来逐字节相同)→ 结束。根因是 agent/context-mask.js 的 `cut` 存在进程内存里(只在超限时移动),续跑是新进程,cut 从 0 重算,省略的位置不同,请求内容就变了。只影响开了省略的 04;10-13 以来本地还能查到的续跑:GLM 9 次全成功,Qwen 5 成 3 败。
- 最简修法:让 context-mask 只由消息列表决定(按每个 assistant 消息前的前缀把原来的逐步省略重放一遍,得到同一个 cut),约 10 行;agent 进程启动和续跑时加载,热部署即可,不用重启 collector。还没改,等用户定。
**Why:** 用户重启后问:数据是否走完整条链路、平台是否自己复测、系统稳没稳、底层错误和最简修法。
**How to apply:** 复查用同一口径(terminal_result.json 的 target=board 是板上自测;workspace 小文件在归档后仍在本地,events.jsonl 归档后会被删)。DB 里有 417 条 9 月旧批次的 PAUSED_INFRA,不计入并发,可以忽略。
相关:[[stability-sweep-20261016]] [[v18-own-inputs-20261015]] [[verifier-audit-20261012]] [[check-20261016-1700]]

View File

@ -0,0 +1,40 @@
---
name: compile-server-reclaim
description: model-compile 编译机要被回收(10-08 告知);主控实际占用、必须跟着搬的东西、Mac 不能当主控的原因
metadata:
node_type: memory
type: project
originSessionId: 1b3cd916-3faa-4ef7-be14-c3fb07244493
modified: 2026-10-08T08:25:37.022Z
---
2026-10-08 用户告知:model-compile(120.48.151.164,244 核 / 1.4 TB,x86)要被回收。这才是"编译上 Salty、主控放 Mac mini"方案的真实动机,提速不是目的。
10-08 实测:
- 主控很轻:3 个采集器约 1 核、7.8 GB;21 个 agent(42 个进程)约 2.9 GB、几乎不占 CPU。
- 吃算力的是编译:hb_compile 138 个进程,其中 77 个属于 bench 轨迹,其余是同机器上别人的实验(tune1.py、local_val.py;web_review.py 一个进程就占 124 GB 内存)。
- 本机盘 /home 上 bench 必须搬走的东西:`/home/ming01.wang/bench-state`(sqlite 账本和锁,131 MB)、`/home/ming01.wang/toolchains`(32 GB x86 环境)、生产配置 `/home/ming01.wang/s100p-glm-8way-20260928-2124/`。代码、轨迹、缓存都在网盘 /mnt/data(JuiceFS robotwin-archive)上。
- 只能在 Linux 上跑的部分:agent 沙箱是 `unshare -Urmpf --mount-proc`(scripts/jail_setup.py),进程管理读 /proc、boot_id、pidfd。06-hbm 用 hb_verifier/hb_model_info(地平线 x86 工具链),占轨迹总时长 16%。
- 不止 05 要 x86:02 基线、03 导出、04 校准数据、08 评测主机侧都用 `paths.model_python(job)`(网盘 cache/venvs 里的 x86 模型环境),05/06 用地平线工具链。只有 07(板端测速只是 ssh)和 agent/采集器不依赖 x86。
- 模型接口:GLM 走公网 open.bigmodel.cn,Qwen 走 ai-api.d-robotics.cc。
- 用户 10-08 的想法:Mac mini 只做任务下发,集群只提供执行环境。我的建议:能要到小云主机(8 核 32 GB)就用它当主控,因为它和网盘、集群在同一个机房,省掉数据搬运。
- Mac mini:`ssh amos@192.168.66.251`(10-08 已装本机 id_ed25519 公钥,不要用密码),工作目录 `/Users/amos/work`(10-08 为空)。
M6 12 核、**16 GB 内存**、剩余 121 GB 磁盘,macOS 27.0(arm64),没装虚拟机工具和 node。
电源设置:sleep=1、autorestart=0(断电后不会自动开机)。改电源设置属于系统设置,要用户自己执行。
10-08 实测能连通:GLM、Qwen、板卡 40009 端口、编译机 22 端口。
- 我当时操作用的 Mac 是 Mac16,1(MacBook Pro M4,16 GB),不是那台 Mac mini。
**Why:** 换机器时最容易漏的是本机盘上的账本和工具链,以及"只把 05 搬走"不够:06 也离不开 x86 工具链。
**How to apply:** 讨论新主控放哪时,先问能否拿到同机房的 Linux 机器;搬之前按 [[bench-restart-hazards]] 正常排空(只用 SIGTERM)。相关:[[rollout-time-breakdown-20261008]]
**2026-10-08 实际回收**(19:13–21:02 之间,ssh 主机密钥三种全换):没跑 `migration-meta-20260928/stop-time-refresh.sh`,所以本机盘上的东西只有 9-28 22:17 的 tar 备份(`/mnt/data/ming01.wang/migration-meta-20260928/home-tars/`:bench-state.tar、toolchains.tar 33G、s100p-glm-8way-*.tar、.local.tar 含额度账本)。9-28 的 bench-state 比 r20260929-0x 批次还早,**这几个批次的账本没有备份**;今天写的 raise-concurrency-20261008 配置也没备份。
新机器 `ming01.wang@36.144.20.182`:112 核、944 GB、Ubuntu 22.04,JuiceFS 已挂 `/mnt/data`,`/home` 盘只剩 23 GB(放不下 32 GB 工具链),unshare 沙箱可用、python3.10 在、没有 node。**新机器上 ming01.wang 是 uid 1006,网盘文件属 uid 1004(新机器上叫 xiaoyan.zhao)**:bench 目录、批次目录全部不可写,`.env.local` 和每条 rollout.json 都读不了。网盘上的记录文件数(04=119、05=214、06=319)与回收前一致。
**更正(2026-10-11 实测)**:网盘 bench/runs 下的文件现在属 uid 1006(36 上的 ming01.wang)、组 1004,36 上能读能写,rollout.json、agent/events.jsonl、HBM 都读得到。120 已于 10-11 关机清理,旧轨迹以后从 36 读。
**2026-10-09 捞回**:老机器重装后仍是 `root@120.48.151.164`(我用本机 `~/.ssh/id_ed25519_codex_180_76_192_183` 登录,用户自己 ssh-copy-id 装的),原 home 整盘在 `/home/cce/ming01.wang`(属 uid 1004)。账本 jobs.sqlite / quota.sqlite 记到 10-08 20:47,完整性 OK。已拷到新机器暂存区 `~/restore-20261009`(sha256 一致):bench-state、.local/state/bench-shared、三个配置目录、resume-glm-20261002-104649 日志、.ssh、toolchains/node。
- toolchains 只有 node 在 9-28 后变过(多了 mcp-remote),其余 bench-venv 7.5G / oe-3.7.0 13G / oellm2 11G 可从网盘 `migration-meta-20260928/home-tars/toolchains.tar` 解;四块都在配置里,沙箱会全挂载,缺一不可。venv 的 base 都是 /usr/bin python3.10。
- `paths.work_root=/home/ming01.wang/bench-work` 是每条轨迹的编译临时目录,老机器上 444G,不用搬(续跑不依赖),但新机器需要大盘装它(重模型一条 10–17G)。
- 停机时在跑的 37 条(04=5、05=16、06=16)账本里仍是 RUNNING,启动前要先处理。
**更正(10-09)**:网盘上 `bench/cache`、`bench/data`、`bench/state` 都是指向 `/home/ming01.wang/bench-{cache,data,state}` 的软链接,**缓存和数据其实在本机盘**,不在网盘。老机器上:bench-cache 415G(baseline 160、onnx 88、weights 81、adapter-probes 80、venvs 1G),9-28 备份(374G,19:43 打包)之后新增 397 个文件 71G(baseline 49G + onnx 22G,可由 02/03 阶段自动重算,约 12.3+1 小时串行累计);bench-data 46G,备份后零改动,网盘备份即最新。LLM 网关 `.local/state/litellm-formal-gateway` 备份后改动 231G(不属 bench,用户定)。
`cache_contract` 锁的是模型 Python 路径和导出器版本,不是缓存内容;路径用 abspath 比对、不解软链接,所以大目录可放网盘、原路径放软链接。开 Salty 后只有 05(PTQ)上云、06 读 Salty 回执;01/02/03/04/08 仍在主控跑,需要 bench-venv + 缓存 + 数据(约 380G+)。

View File

@ -0,0 +1,47 @@
---
name: data-clean-b3-20261103
description: 11-03 按 36 上 data-clean 的 b2 方案导出 batch-3:481 条输入→剔违规 29→主池 B3 234 + 消融 B3F 205;位置、脚本、改动、没做的项
metadata:
node_type: memory
type: project
originSessionId: 0e9da70f-b20b-4f1a-9118-44efe0befeed
modified: 2026-11-03T10:43:06.967Z
---
**data-clean 在哪**:ssh ming01.wang@36.144.20.182,`/mnt/data/ming01.wang/data-clean`(JuiceFS,不是 git 仓库)。
- 有些文件 cat 会卡 40 秒以上,用 `timeout` 逐个取。
- ssh 命令输出完不退出时,改用 `ssh -T`。
**管线**:b1 是旧格式,要回填 thinking(10/05/20 号脚本)。b2/b3 是新导出器格式,走 21 号脚本那一支。
- 共用步骤:30 号分层、35 号九项质检、40 号验收。
- 22 号把 b1 和 b2 合并到 `ultradata-merged`(206 + 71 条),README 写明训练侧取这个目录。
**b3(11-03 11:59 冻结)**:输入是 bench 11-03 01:31 那次导出,5 个 GLM 批次共 481 条。
- 新脚本 11_snapshot_b3.py 剔掉违规 29 条:读评测器源码 18、读私有源码 8、解开 t1 隐藏评测集 4、绕编译守卫 1。
- 新脚本 23_to_ultradata_b3.py 直接复用 21 号的函数,另有四处不同:
- G2=unverified 的 13 条不导出;
- 对 b1、b2 断言零重叠;
- 工具参数校验失败的轮 loss 设为 false;
- 脱敏范围放宽:IP 改为 10.x、192.168.x、180.76.x,用户名 amos 换成 `<USER_9>`。
- 输出在 `outputs/ultradata-b3/{full,stripped}/`:
- `Bench_Agent_B3_part-1-of-1.jsonl`:234 条,G2=pass;
- `Bench_Agent_B3F_part-1-of-1.jsonl`:205 条,G2=fail;
- `signals.jsonl` 和 `SHA256SUMS`。
- 报告:reports/23_convert_b3_report.json、30_stratification_b3*.md、35_ultradata_nine_checks_b3.md、40_qa_report_b3.md。35 号和 40 号都全部 PASS。
**11-03 晚再剔评测题**:
- 用户从 Qwen 全量批次选出 30 道评测题,清单在本机 qwen-bench-30-20261103/tasks.jsonl,36 上拷到了 configs/qwen-bench-30-20261103.tasks.jsonl。
- 11 号脚本按模型剔除这些题,S100P 同题和 S600 同模型都剔。
- 剔除合计 127 条:评测题 104 条,违规 29 条,两者有重叠。
- 重跑后:主池 177、消融池 172,G2=unverified 跳过 5;三项检查(35、40 号)全部 PASS;输出里命中考题 0。
- 合并交付包 ultradata-merged(b1+b2)里还有 52 条落在这些模型上(主池 48、消融池 4),没动。它的 uuid 要求连续,改的话要重跑 22 号脚本。
**改了 36 上的旧脚本**:21、35、40 号脚本和 README 的原版备份在 `backup/20261103-before-b3/`。重跑 b1、b2、merged 三个口径,检查结果零差异。
**没做**:
- 合并进 ultradata-merged,要等用户定;
- 模型评审和人工抽检(九项第 9 项);
- 语义近重复去重;
- 删除内部路径,目前只脱敏了用户名;
- 上下文长度截断。
**Why:** 用户要按团队已有的 data-clean 方案交付,命名保持一致。
**How to apply:** 新数据出来后,刷新 inputs/b3 或者开 b4,照抄这一套。b4 要对 b1、b2、b3 都断言零重叠。相关:[[sft-quality-score-20261029]]。

View File

@ -0,0 +1,39 @@
---
name: delivery-package-v1
description: 给内部评测同事的第一版交付包:位置、冻结点、口径、已知缺口
metadata:
node_type: memory
type: project
originSessionId: cf15f913-cbc4-4a5a-9046-1031104e17bb
modified: 2026-09-19T07:48:01.108Z
---
第一版评测交付包在服务器 `/mnt/data/ming01.wang/val-model-compile`,13 GB / 3932 个文件。
本地构建副本在 `/home/ming01.wang/delivery-20260918`(未删,待用户决定)。
**冻结点:2026-09-18 17:18:27,62 条 `rollouts.verdict_terminal='PASS'`,40 个模型。**
冻结当天池子还在跑,次日已涨到 87 条——出第二版时这个数还会变,必须重新冻结快照。
关键口径(出第二版仍适用):
- 唯一正确的"完成"口径是 `rollouts.verdict_terminal='PASS'`。
`state='TRANSFERRED'` 那 597 条**一次都没跑过**,是任务槽位转交的墓碑标记,
按它打包会打出几百个空目录。
- `completion.workflow_completed=true` 比 PASS 多出来的那些是"跑通但掉点超容差"。
- `jobs.state='PASS'` 是 oracle 标准答案流水线,不是 agent 轨迹。
- `jobs` 表按基准批次记账,n100 派生批次没有独立行——62 条里 26 条查不到,
查询一律走 `rollouts` 表。
打包时踩过、第二版要直接避开的坑:
- `bin/bench`(711) 和 `harness/cli.py`(600) 权限不对外,拷完必须 `chmod a+r`,否则同事用不了。
- `stages/*/meta.json` 必须带(62 条共 443 个,543 KB)。有它同事没板卡也能离线重算出
PASS;没有它 62 条全变 UNVERIFIED。
- 必须按工作区拷,不能 `git archive`——大量适配器没提交。
- 缓存目录要按需挑:baseline 全量 59 GB(大头是 G2 参考张量,G2 不参与判定,不带)、
onnx 27 GB、calib 16 GB,实际只用到其中 12.4 GB。
- 排除 `.env.local`、`.sync/`、`.git/`、`__pycache__`、`docs/archive/`。
`.env.local.example` 和 `.gitignore` 可以带(模板是空的)。
已知缺口(已写进包内说明):分割/姿态/光流/深度/特征/占据/双目 7 类零样本;
实例分割仅 1 条且其轨迹因版本过滤未导出;4 条合格轨迹不在数据集里(轨迹只覆盖 58/62)。
相关:[[prefer-subtraction-over-addition]] [[bench-restart-hazards]]

View File

@ -0,0 +1,32 @@
---
name: dev-oom-memory-doubling-20261020
description: 10-20 监控子 agent 发现 bench dev 容器 OOM 后重试用同样内存、必然再爆,另有 .bench-session.json.tmp 导致 STAGE_EXECUTOR_EXIT;修复 50f163e(失败后翻倍、上限 128Gi,并排除该临时文件),21:41 热替换生产,salty-prod 已快进
metadata:
type: project
---
**来源**:这是 10-20 20:52 派出的后台监控子 agent 第一轮巡检的结果。它的记录在 scratchpad/monitor/findings.md,体检脚本在 VM 的 /mnt/data/ming01.wang/configs/monitor/infra_check.py(只读,带 --since 参数)。
**问题 1:dev 容器内存不够时永远重试失败**
- 现象:05 的 efficientnet.b6 在 16Gi 爆了 3 次,06 的 unidepth.v2.vit.l 在 32Gi 爆了 4 次。
- 根因:salty_dev 选内存时只看配置和 05-compile 的 OOM 记录,dev 作业自己失败不算。agent 也调不了内存。
**问题 2:上传工作区时临时文件消失导致 STAGE_EXECUTOR_EXIT**
- 根因:上传前会列出工作区文件,pi 写会话存档用的临时文件 `.bench-session.json.tmp` 列出后立刻被改名,打包时找不到,命令就报 STAGE_EXECUTOR_EXIT。10-16 以来出现过 3 次。
**修复 50f163e**:
- remote.json 记下 memory 和 job_state;本轨迹有过 failed 的 dev 作业,下一次内存翻倍,上限 128Gi,stderr 里会告诉 agent 下一次给多少。agent 自己命令出错不算,那种情况容器作业是 succeeded。
- 上传排除名单里加上该临时文件(salty_dev.py 和 terminal.py 两处)。
**部署**:
- 21:02 先换进测试环境。
- 21:41:37 经用户批准热替换生产,备份在 hotfix-20261020/*.prod.before-devmem:
- salty_dev.py:71bb9256 → b598156d;
- terminal.py:a75f6724 → 8053d63e。
- salty-prod 快进到 50f163e。
- 换完 1 分钟内,新的 dev 回执里已经记了 memory(16Gi / 32Gi),结束的都已删除作业。
- 翻倍这条路径目前只有单元测试覆盖。
**子 agent 提出、还没处理的**:04 Qwen 每隔几小时会整组暂停约 26 分钟(流中断 300 秒后判为结果不明,然后要等满 request_total_s 1800 秒再加 60 秒)。它建议把 Qwen 组的 request_total_s 调小,因为这是我们自己的服务、不会重复计费。这属于生产配置,要用户来定。流为什么会中断还没查清。
**How to apply:** 再看到 dev 命令 REMOTE_WORKER_FAILED,先看 usage.log 峰值和回执里的 memory,确认下一次是否翻倍了。相关 [[salty-06hbm-not-returned-20261020]] [[branch-workflow-20261020]]

View File

@ -0,0 +1,23 @@
---
name: gap-widening-cause-20261029
description: 10-29 查清正式对照 GLM/Qwen 差距拉大的原因:v24 提示词禁整网 int16 堵了 Qwen 的老路、GLM token 上限 10-22 才放开、int16 规则代码不判 GLM 用足余地;严格口径单次通过率差 21→7 点
metadata:
node_type: memory
type: project
originSessionId: 97c9bd7f-ec22-407b-b660-63c3c82eb3a1
modified: 2026-10-29T05:03:58.133Z
---
10-29 12:50 正式对照(r20261024-formal-glm/qwen,v25):只判精度单次通过 GLM 76%(42/55)对 Qwen 55%(26/47),只有一方过的题 10 比 2;严格口径(卷积/矩阵乘节点 int16 ≤ 一半)58% 对 51%,7 比 4。每边只看第一次跑完仍是 9 比 2,不是多跑造成的。Qwen 是自部署 qwen3.8-27b-nvfp4,GLM 是 glm-5.3。
原因(按影响排):
1. v24/v25 提示词写了"整网/整类/逐节点超过同类一半设 int16 判不通过",v23 没有。Qwen 旧版 v22–23 在 37 题上 32 次通过里 13 次是整网 int16,新版 26 次通过 0 次;同 30 题 Qwen 80%→59%。GLM 独有 10 题里 Qwen 旧版过 8 道,6 道靠整网 int16。
2. GLM 生产 06 的 token 上限 v15–17 是 80 万、v22–23 是 200 万(28%,5/18,8 次用完),10-22 起 6400 万;生产 06 v25 19/20。
3. 判分代码(gates.py、verify.py、stages/)不查 int16 用量,只有 backends/ptq.py 等编译环节读 quant_config。GLM 42 次通过里 10 次超过一半,mobilenet.v3.large 用 op_config 整类 DWConv;GLM 会话里推理"规则只限 Conv/MatMul/Gemm",把 int16 放在 Add/HardSwish/LayerNorm/Softmax。Qwen 读得更严(连唯一 Gemm 都不敢设)。速度门槛只在有 int8 参考的题生效(113 次里 59 次),GLM 慢的几条都落在没参考的题。
4. Qwen 自身:精度崩(>50%)6 次对 GLM 1 次,400 轮用完 6 次对 0 次;会放弃("只有 fp16 能过")、甩锅平台。
未核实:Qwen 崩掉是不是导出/输入输出没对齐;节点表口径偏高(纯 int8 也约 35%);还有 32 次没跑完。
报告:Claude Docs《GLM 与 Qwen 差距拉大的原因》https://claude.ai/artifact/Y1XYgtZvJUMsvGUGYtUzqz 。取数脚本在本会话 scratchpad(extract.py、hist2.py、sess.py);存档用 VM 上 `salty storage cp personal:/bench-root/archive/<run>/<job>/<kk>.tgz` 取,会话在 agent/native-session.jsonl。
**Why:** 用户要给 leader 汇报差距拉大的原因。
**How to apply:** 别再说"差距大半是兜底换来的"或"GLM 只是更强";要比能力,先把 int16 规则写进代码或从提示词删掉,补齐速度参考,SFT 剔掉超过一半 int16 的 GLM 通过。相关 [[formal-int16-breakdown-20261027]] [[strict-rejudge-37-20261022]] [[formal-compare-20261024]] [[qwen-ability-failures-20261013]]

View File

@ -0,0 +1,18 @@
---
name: git-mainline-20261009
description: 10-09 仓库主线整理:main 改为生产分支、旧 main 打标签、Salty 单独分支;本地工作区还剩未提交的优雅退出/板卡改动
metadata:
type: project
---
仓库 `bench/`(gitea `ming01.wang/data-gen-bpu`)。2026-10-09 用户决定:生产分支 `production/s100p-infra-fix-20260928` 就是完整主线,旧 `main`(9-16 起分叉、基本没用)不要了。
- 网盘上在跑的代码 = `c2c52ed`(gitea 生产分支也已是它)。旧 main 留标签 `archive/main-20260917`(12ef41c);`main` 改指 `c2c52ed`(10-09 已用 `--force-with-lease=main:c44d3f3` 推到 gitea,标签和 feature 分支也已推)。
- 旧 main 的 8 个真改动里,watchdog 按线程判 D 状态、06-hbm 回收中间 ONNX 已核实在 c2c52ed 里。
- Salty 远程编译单独成分支 `feature/salty-20261009`(45b1262,基于 c2c52ed),默认关闭(需 `execution.salty.enabled: true` 且 stages 含 05-compile)。合到生产代码时补了:编译上限只放行"已记录过 submit"的 Salty 找回(`salty_stage.dispatch_recorded`)。
- 本地工作区仍在旧的 10663a8 上,留着未提交的"进程优雅退出(owned_process/namespace_owner)+ 板卡侧"改动;其中 `board_guard.py` 与生产分支 f315496 的隔离释放策略相反,合之前要用户定。
- 在新机器上跑单测:`PYTHONPATH=. timeout 900 python3.10 scripts/test_x.py`;`test_agent_first`、`test_board_pipeline` 在干净的 c2c52ed 上也失败(环境未装好),不是回归。
**Why:** 以后问"main 怎么变了""Salty 在哪个分支""本地那堆改动是什么"时直接查这里。
**How to apply:** 新工作从 `main` 开分支;动本地工作区那批非 Salty 改动前先问用户。相关:[[compile-server-reclaim]]
10-20 改名:feature/salty-20261009 → `salty-prod`(生产),resumable-20261019 → `salty-test`(测试),见 [[branch-workflow-20261020]]。

View File

@ -0,0 +1,33 @@
---
name: glm-runs-exhausted-20261031
description: "10-31:05/06 已无可领的题——同题互斥规则挡住 171 道,其中 62 道只是用完了 10-16 前的旧预算(800k token);\"调度可能卡住\"报警是误报"
metadata:
node_type: memory
type: project
originSessionId: d493a7cb-ced2-4ec5-9a33-9cafbccf4225
modified: 2026-10-31T02:13:44.993Z
---
10-31 10:07 查:05/06 的 collector 都活着,但各只剩 1 条在跑(05 最后一次领题 10-30 22 点、06 是 21 点),以后也不会再领。
原因是 `harness/pipeline.py` 的 `_collection_snapshot` 里那条同题互斥规则:同一道题只要有一条轨迹是 BUDGET_EXHAUSTED,或者真跑满 24 小时(verdict 的 timeout_reason=EXECUTION_DEADLINE_EXCEEDED),这道题剩下的 QUEUED 就永远不领。
- 05:209 道,113 道已跑完,96 道被挡(预算 44、24h 52)。
- 06:209 道,133 道已跑完,75 道被挡(预算 41、24h 34),另有 1 道被 10-23 隔离的暂停轨迹挡住。
- 被挡的题大多没过过:05 有 81 道、06 有 57 道。
被挡的原因拆开看:
- 预算用完的 85 道里,62 道(05 38、06 24)用完的是 10-16 16:21 之前的旧预算(800k token、240/400 轮)。现在预算是 2M token、400 轮,但这些题从没按新预算重跑过。另外 23 道是在新预算下用完的。
- 24h 的 86 道里,71 道发生在 10-16 之后。抽了 54 条有会话日志的,共 1443 小时:
- 61% 在等 agent 自己在开发环境里起的后台命令,主要是自己跑的 hb_compile,单次 10–18 小时(其中真在跑的有 630 小时,不是在排队);
- LLM 生成约 14%;
- 平台步骤约 10%;
- 等额度几乎为 0。
报警"有 1 条在跑,但 N 小时没有开始任何新步骤"在这种状态下是误报:调度程序没卡,只是没题可领;剩下那条在跑 agent 自己的长命令。另外,last_key 里数字被抹空是去重键的正常写法,不是 bug。
**Why:** 用户问 05/06 是不是停了、是基础设施、代码还是模型的原因。
**How to apply:**
- 想让 GLM 再出数据,最省事的是把那 62 道按新预算另开批次(参考 [[qwen-all-20261030]] 的建批方式),不用改代码。
- 想动 24h 那批,就得限制 agent 在开发环境里跑整网编译的时长,这属于规则取舍。
- 10-31 11:56 已按新规则重开 78 道,见 [[reopen-20261031]]。
- 相关:[[success-rate-breakdown-20261008]]、[[fatgw-05-20261030]]。

View File

@ -0,0 +1,19 @@
---
name: glm-second-account-20261008
description: 10-08 加第二个 GLM 账号、三个批次换代提并发的现场:配置位置、接续脚本、目标路数、账号对应关系
metadata:
type: project
---
2026-10-08 用户要求提采集并发。事实:
- 05(S600,`S600_API_KEY`)和 06(S100P,`TEACHER_API_KEY`)在 GLM 那边是**同一个账号 A**;`S100P_API_KEY`是**新账号 B**,之前从没用过,只能走 coding 套餐接口。
- 换代前 24 小时两个 GLM 组共约 5470 次请求、零次 429;8 路时在途请求 76% 时间为 0、峰值 8。账号额度不是瓶颈,瓶颈是每个 collector 只开 8 路、全局上限 24。
- 做法(用户选的方案 B):06 改用账号 B(新账号组 `glm-coding-account-b`,规则照抄老组),并发 8→16;05 留在账号 A,8→16;04(Qwen)配置不变、仍 5 路,只为抬全局上限重启。三份配置的全局上限都改成 40。
- 新配置和接续脚本在远端 `/home/ming01.wang/raise-concurrency-20261008/`;`relaunch-<run>.log` 记录每个批次何时排空、何时起新进程。日志仍追加到 `/home/ming01.wang/resume-glm-20261002-104649/restored-r20260929-0X-fix-20261003.log`。
- 16:26 SIGTERM;30 分钟内 05/06 一条没跑完,按用户要求不等了:16:58 起取消全部 21 条在跑轨迹(预计只损失约 4 条 PASS),17:14–17:17 三个新进程起来(04=5 路、05=16 路、06=16 路,06 走 `glm-coding-account-b`)。
- 18:07 核对:05、06 各 16 路满载,06 只走 `glm-coding-account-b`,零 429。04 在 17:44–18:00 被另一个会话("qwen-3.8-27B评估")接管:取消了新 04 的 5 条,重启为只跑 `benchmarks/qwen-sft-v1.json` 的 37 个任务并改了 Qwen 超时和账本规则。动 04 前先确认那个会话是否还在用它。
- 19:04 核对:换代 1.8 小时 05/06 一条没结束。原因是 32 条同时开工、正好排到最重的一批模型(vit.h.14、dab.detr 等编译历史中位 1.5–4 小时);编译本身没变慢(换代后完成的编译中位 31 分 vs 之前 28 分)。编译槽位 24/24 满,7 条在排队、最长等 38 分钟,负载 130/244;用户同意后 19:08 把 05/06 配置的 `pools.cpu.workers` 改为 32(原子替换,collection_v1 不变);只对之后新起的编译/HBM 进程生效,之前已排队的 3 个仍按 24 等。查编译耗时:`stages` 表里成功的状态是 `OK` 不是 `DONE`。
**Why:** 下次再问"并发怎么变了""换回去"时,要知道动了哪些、老配置原样留在原处。
**How to apply:** 回退就用原目录 `/home/ming01.wang/s100p-glm-8way-20260928-2124/` 和 `/home/ming01.wang/qwen-autofill-20260928/` 的老配置照同样流程换代。相关:[[bench-restart-hazards]] [[compile-server-reclaim]]

View File

@ -0,0 +1,40 @@
---
name: hbm-spotcheck-optional-20261014
description: 10-14 06-hbm 的 hbm/bc 模拟器抽查改成 agent 按需开启、只作诊断;默认不跑已部署,配置校验与说明等下次重启;还有 DNS 续跑也等重启
metadata:
node_type: memory
type: project
originSessionId: 2b85e929-b893-42c3-a7a0-3a72bda14705
modified: 2026-10-14T04:48:46.602Z
---
**问题**:06-hbm 以前每次必跑 hbm/bc 模拟器抽查,用 x86 模拟器跑 2 张校准图。
- 本地跑时,它占这一步 95% 的时间(中位 7 分钟)。
- Salty 上要 1–2 小时;hb_verifier 只要约 40 秒。
- 10-12 17:16 到 10-14,Salty 上撞 2 小时上限 103 次,约 206 小时。
它从没单独发现过问题:历史 388 次抽查报出 13 次不一致,hb_verifier 都已先判掉;08-eval 还会在板上跑真 HBM。
**用户的决定**:不加大时限,也不按参数量设时限。把抽查改成 agent 自主判断能不能用,代码要通用。
- 不按参数量设:模拟器耗时主要看计算量和输入分辨率,不看参数量。
- 不加大时限:时间照样花掉、占着 Salty 核,模型每重编一次就要再生成一次 HBM,会吃掉 24 小时总时限。
**做法**(f74fe00,叠在 ba143fa 上):
- 阶段配置新增 `verification_parameters.hbm_bc_samples`,取值 0–16,默认 0。
- agent 用 `bench stage run hbm --config x.yaml` 开启。
- 结果写在 G1.hbm_bc_cos_min,**不改 verifier_ok**。否则开了只会被扣分,agent 就永远不会开。
- 适用于任何有 .bc 的后端。
- 编译配置只取三段(input、calibration、compiler 参数),所以同一个 yaml 拿去编译不受影响。
**上线情况**:
- 已部署:s06_hbm.py(10-14 12:48),默认不跑抽查。这个文件随阶段打包进容器,部署即生效。
- **等下次重启**:
- stageworker.py 的配置校验和 agent/SYSTEM.md 的说明(f74fe00)。说明不能先上线,否则 agent 按说明提交会被旧校验拒绝(invalid_request)。
- quota.py 的 DNS_FAILED / DNS_TIMEOUT 可以续跑(e4e1513)。06 的 fcn.resnet101、depth.anything.v1.large 从 10-14 凌晨起一直停着,等重启后续上。
**Why:** 用户要"合理方案",不是简单加大时限;而且要通用。
**How to apply:**
- 下次重启要部署 stageworker.py、quota.py、agent/SYSTEM.md。部署前先和分支比对 md5。
- 看 06 用时要分 Salty 和本地。Salty 上的文件时间是解包时刻,不能拿来分段,要看日志里的时间戳。
相关:[[infra-leaks-20261013]] [[salty-container-threads-20261013]] [[bench-restart-hazards]]

View File

@ -0,0 +1,31 @@
---
name: hbm-step-bottleneck-20261014
description: 10-14 发现 06-hbm 成了新瓶颈:HBM≡BC 模拟器抽查在 Salty 上 1–2 小时,一夜 45 次撞 2 小时上限;DNS_FAILED 暂停不在自动续跑名单里
metadata:
node_type: memory
type: project
originSessionId: 24818155-52a9-4a37-a413-b2ac9f163981
modified: 2026-10-14T04:13:47.996Z
---
2026-10-14 12:00 复查 10-13 20:41 重启后 15 小时:
- **06-hbm 撞时限 45 次,浪费约 89 小时**,占所有超时的大头。05(S600 nash-p)成功时的中位耗时也要 48 分钟,06 是 16 分钟。
- 根因:s06_hbm._hbm_bc_spotcheck 用 x86 模拟器跑 HBM 推 2 张图。旧编译机上 swin.s 这一步就占 36/37 分钟;Salty 容器只有 4 核,要 1–2 小时以上。
- 这个抽查没有实际作用:历史 401 次里报出 13 次不一致,这 13 次 hb_verifier 的余弦都已经低于 0.97,早被它判掉了。07/08 也会在板上跑真 HBM。
- 模型撞时限后会反复重试同一步。比如 05 efficientvit.b2 kk2 连撞 6 次,烧掉 12 小时。
- 超时的作业日志拿不回来,只能从 Salty 远端目录里的 usage.log 看。
- **DNS_FAILED / DNS_TIMEOUT 暂停不会自动续跑**:
- quota._resume_readiness 的可续跑原因名单里没有这两项,但 DNS 失败发生在发送之前,重放是安全的。
- 06 有 fcn.resnet101 kk1 从 03:01 起、depth.anything.v1.large kk2 从 06:01 起一直停着。
- 根因还是 Clash 的 DNS,见 [[mac-mini-clash-global-proxy-20261013]]。
- 已确认正常的部分:
- CONNECT_FAILED、REQUEST_OUTCOME_UNKNOWN 暂停后 1–30 分钟内自动续上(共 9 次)。
- 孤儿容器清理在工作。
- CPU 名额没有泄漏。
**Why:** 修完 [[infra-leaks-20261013]] 后吞吐回升,06-hbm 接着成了下一个卡点。
**How to apply:**
- 提速先砍 HBM 抽查,或把它降到 1 张,不要先加时限。
- 改 s06_hbm 是阶段代码,新起的步骤马上生效。
- 改 quota 可续跑名单要等重启调度程序才生效。

View File

@ -0,0 +1,21 @@
---
name: infra-fixes-20261028
description: 10-28 下午在 salty-test 上修了板上自测回执、429 暂停不续、孤儿隔离、导出挡清盘;报警脚本关端口转发;都等下次生产重启
metadata:
node_type: memory
type: project
originSessionId: 8d5d162b-6414-4fef-8dc6-f93d0b117549
modified: 2026-10-28T08:48:38.253Z
---
10-28 按当天 9 个问题清单([[infra-loss-tally-20261028]] [[alerts-20261028-morning]])改的,提交在 salty-test(68028a2),除导出放后台外**未上生产**:
- **板上自测回执**:terminal_board 原来只读一次 guard-result.json、清理命令被压到 15 秒;07 上板 10-15 已修过同样问题。现在两处共用 `RemoteSession.read_receipt`(3 次、每次 60 秒、隔 10 秒);还读不到就趁持有板卡用 `scheduler._board_idle_ps` 探板,空闲就记 proof=board_idle_ps 当清理确认、照常拉输出(stageworker 校验也认这个 proof)。板子忙或连不上仍隔离并结束,但 BOARD_CLEANUP_UNCONFIRMED 现在记 INFRA_ERROR(execution.finish 关键词),不再是 AGENT_ERROR。
- **"只隔离板卡、不结束轨迹"没做**:隔离挂在整条执行上,拆开要动 terminal_board / stageworker._check_board_cleanup / scheduler._release / reconcile_leases 四处;先看重试+探板后还剩多少。
- **孤儿隔离**:reconcile_leases 末尾扫 board-*.quarantine.json 无 lease 的,板子空闲就删,证据写 locks/board-N.released-<时间>.json。
- **429 暂停不续**:quota._resume_readiness 对 HTTP_ATTEMPT_BUDGET_EXHAUSTED 且每次尝试都是 429 的,只在组 OPEN/RECOVERING 时放行(不当半开试探),resume 时把该 generation 的 attempts 清零;仍占续跑次数(最多 3 次)。组没恢复时返回 WAITING_GROUP_RECOVERY 且 not_before=None:**不能**返回 WAITING_QUOTA,否则 pipeline 认为有轨迹在等名额、不领新题,而新题的请求正是试探账号的人,互等到 24 小时作废(test_collection_crash 的 429 用例抓到的)。
- **导出挡清盘**:salty_offload 的导出放后台线程(serve/export_in_background),搬运和清盘每 10 分钟照常;导出那边对上传中的包本来就跳过。只要重启清理进程就生效。**10-28 21:18 已单独上生产**(salty-prod 36b7649,见 [[vm-disk-export-cycle-20261028]])。formal-qwen 有自己的存档进程、04 早已存档,都不用加进名单。
- **报警误报**:本机 ~/.bench-health/bench_health_alert.sh 三处 ssh 加了 ClearAllForwardings=yes(备份 .bak-20261028);原因是 ~/.ssh/config.antigravity 的 `Match all` + RemoteForward 7897,失败警告混进第一行。
**测试**:虚拟机系统 python3 没有 numpy,test_board_runtime 要在本机跑;其余在 VM 上 `env -u BENCH_CONFIG -u BENCH_ROOT -u BENCH_STATE_DIR -u PYTHONPATH python3 -m unittest scripts.test_x`。
**How to apply:** 上生产时这些和 61d8f54、6aabf56、71873e0 一起随一次重启换上([[bench-restart-hazards]] [[branch-workflow-20261020]]);上线后看板上自测失败还剩多少,再决定要不要拆"只隔离板卡"。

View File

@ -0,0 +1,60 @@
---
name: infra-leaks-20261013
description: 10-13 查出四个基建问题:CPU 名额被超时步骤锁死(32 剩 6)、超时后 Salty 容器不停、续跑必死、领题后重复查额度把题作废
metadata:
node_type: memory
type: project
originSessionId: 2b85e929-b893-42c3-a7a0-3a72bda14705
modified: 2026-10-13T14:25:52.406Z
---
2026-10-13 11:00 核查 Codex 报的"新增 51 UNVERIFIED、21 INFRA_ERROR、25 条在等阶段队列",几乎全是系统问题:
1. **CPU 名额泄漏**:state/locks/cpu-N.lease.json 由步骤进程退出时删(scheduler._release)。步骤超时(PHASE_EXECUTION_DEADLINE_EXCEEDED)被看门狗终止时来不及删,_try_slots 见到凭证就跳过这个名额。scheduler.reconcile_leases 只在 recovery.reconcile_run 里调(调度程序启动时),而且只放已结束(TERMINAL)的轨迹。10-12 18:07 起累计 26/32 个被锁死,只剩 6 个,排队步骤最长等 3 小时。pool_usage() 只数 flock,看不出这个问题,要看 lease 文件的持有进程是否还活着。
2. **超时后远端容器不停**:本地步骤被杀,Salty 容器继续跑。10-13 11:00 有 7 个,最久跑了 7.5 小时,约 34 核。查法:salty/remote.json 的 job_id 在 salty ps 里是 running,但同目录 meta.json 已经写了结果。
3. **暂停后续跑必死**:续跑时 stageworker.scan 重新核对每个旧步骤的回执。同一条轨迹每次编译都写同一个文件(05-compile-work/<job>.hbm、stages/04-calibrate/compile.yaml),旧回执核对时 ValueError("completed artifact changed"),接着 OPERATION_STATE_UNKNOWN 隔离整条轨迹。只要编译过两次以上,续跑后几秒就判 INFRA_ERROR(10-12 晚到 10-13 共 19 条)。reconcile_completed 里已经有"已结算就跳过"的判断,scan/_execute 没有。
4. **领题后重复查额度**:pipeline 领题前调用 runner.check(execute=True),查不到额度会把题留在队列;rollout.run_rollout:317 领到之后又查一次,quota_snapshot 只等 0.5 秒。00:25–00:51 机器忙时读超时,QuotaError: QUOTA_SOURCE_UNAVAILABLE,题直接记成 UNVERIFIED,根本没开始跑(05 有 43 条,06 有 7 条)。
**已做(10-13 11:00–11:30,用户同意)**:
- 停掉 7 个无人等结果的 Salty 容器(只停,没删作业和个人空间目录)。
- 回收 26 个名额:把 lease 文件挪到 configs/config-backup-20261013/leases/。20 秒内 32 个名额又全部用上。
- 59 条从没跑过的 UNVERIFIED(05 有 45 条,06 有 14 条)改回 QUEUED,并记了注释 REQUEUED_20261013。在跑的调度程序把它们记在已领过的名单里,下次重启后才会重新领。
- 7093c32(11:11 部署,新起的步骤进程马上生效):
- scheduler._lease_settled:占用者已死、该步骤已 DONE、清理已确认,就接手这个名额。板卡名额不在此列。
- salty_remote 提交容器时加 `timeout <阶段执行时限>`。镜像里有 /usr/bin/timeout,实测到时限退出码 124。
- ec1a58e(**未部署,等这批跑完、重启时一起上**):
- stageworker._execute:已结算的操作直接沿用旧结果,不再重新核对。
- rollout.run_rollout:领到题后不再查额度。
**10-13 20:28–20:41 重启(用户选"今晚取消在跑的直接重启")**:
- 脚本和清单在 configs/restart-20261013/:
- stop.sh:存旧环境,SIGTERM,并行取消。
- start.sh:部署,补号,用 withenv.sh 照抄旧环境重启。
- 取消了 43 条:37 条在跑,加上 6 条不可能续跑的暂停轨迹(账本里已放弃,或续跑次数用完)。06 的 5 条可续跑的暂停轨迹保留。
- 05 yolov8s kk2 的取消命令卡在账本收尾 13 分钟。它的执行记录已经结束,所以用 SIGTERM 结束了这个命令。
- 部署 ec1a58e(D、E)和 8a1ce8e:
- 额度账本读取时限 0.5 秒改为 5 秒,领题前和续跑前两处检查都改了。下午续跑失败的真因其实是这个,不是"名额被抢"。
- INCOMPLETE_GENERATION 可以续跑。
- 补号:42 条取消的各补一个新 kk;202 条一步没跑就被作废的 UNVERIFIED 放回 QUEUED(有些在上午放回后又被作废了一次)。
- 没重启 salty_offload:它当时正在跑一个导出作业,等它空闲时再重启,这样导出作业也能带上线程上限。
- 测试注意:VM 里有代理环境变量,跑 scripts/test_quota 要 `env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY`,否则本机测试服务器全回 502。test_collection 的 test_real_database_lock_* 本来就时好时坏。
**10-13 21:53 核对,前三项都已修好**:
- 11:11 后又有 36 次步骤超时,CPU 名额没有一个被死进程锁住;等名额的中位时间从 105–127 分钟降到 0。
- 重启后 5 条续跑全部存活。
- 读额度账本超时 0 次。
- 漏洞 2 的修复只管超时,不管取消:20:28 重启取消的轨迹留下 11 个容器白跑,另有 1 个是 11:11 修复前提交、没有时限的 gmflow。
- 已停掉 9 个,另外 3 个已经自己结束。
- ad51e86:salty_offload 每轮开头调用 reap_orphans。本地这一步已有 meta.json、远端还在 running/pending 的就停;已 stopped 的用 sr._cleanup 删除作业和临时目录;failed 的保留。
- 部署后由 configs/restart-20261013/restart-offload.sh 等旧进程空闲再重启它。
- 踩坑:
- VM 里 Python 的 time.sleep 显示的 wchan 是 do_select,不是 nanosleep。
- pkill -f 会匹配到命令行里含同名字符串的 ssh/bash 自身,把自己杀掉。
**Why:** 用户以为是模型能力问题,实际上吞吐被系统卡住,数据被系统作废。
**How to apply:**
- 看吞吐先查 lease 文件,看持有进程是否还活着,不要只看 pool_usage。
- 第 3、4 条的代码跑在调度程序进程里,要重启才生效。
- 删 lease 文件和停 Salty 作业要先问用户。
相关:[[salty-container-threads-20261013]] [[selfheal-and-alert-20261012]] [[bench-restart-hazards]]

View File

@ -0,0 +1,22 @@
---
name: infra-loss-tally-20261028
description: 10-21 到 10-28 结束的 322 条里约 80 条(25%)因系统原因没跑完;最近的新问题是板上自测清理没确认就结束整条轨迹,还记成 AGENT_ERROR
metadata:
node_type: memory
type: project
originSessionId: 758f327d-2ffa-4453-b469-f0e0702df126
modified: 2026-10-28T06:57:21.614Z
---
10-28 15:00 统计 10-21 起开始的轨迹(05/06/formal-glm/formal-qwen,看 execution.json 的 stop_reason):结束 322 条,正常跑完 192 条,跑满 24 小时约 42 条,预算用完 9 条,系统原因约 80 条;另外还有 14 条暂停。
系统原因按根因分:
- 10-22 换 GLM key 时取消补号 32 条:旧账号没额度,在跑的轨迹换不了额度组(EXECUTION_GROUP_CONFLICT)。
- 10-25 盘满卡死约 22 条:卡死期间超过 24 小时,恢复后一起按超时结束(10-25 17:57,elapsed 48h),另有 7 条续了又暂停、每秒循环,10-26 取消。见 [[disk-full-hang-20261025]]。
- 板卡清理没确认 14 条,其中 12 条是 10-27 17:00 以后的:都是 agent 自己在开发环境跑的板上自测(`#bench:board`)。harness/terminal_board.py 拿不到板上的清理回执就隔离板卡并 raise,整条轨迹结束,outcome 记成 AGENT_ERROR;1–2 分钟后自动释放查到板子是空闲的(HOLDER_DEAD_EXECUTION_TERMINAL_BOARD_IDLE)。10-28 查清:13 条都是 rdk-sandbox.d-robotics.cc 的板卡端口在那一刻连不上(lost connection / Connection refused / timed out),或者 15 秒内没读完回执(TimeoutExpired)。其中 7 条板上的 guard 已经确认清理干净、命令退出码 0。代码只读一次 guard-result.json,读不到就结束整条轨迹。板上自测每天约 200–260 次,10-26 及以前几乎不失败,10-27/28 每天 6 次;同期报警里“板卡连不上”从每天约 15 次涨到 27 次。所以是板卡网关变得更不稳,加上代码太脆。
“4%”([[missing-verdict-breakdown-20261021]])和这里的 25% 口径不同:4% 是 10-21 前“没有判定的轨迹”在平常日子的比例;这次 80 条里 54 条来自两次一次性事故(10-22 换 key、10-25 盘满)。除去这两次事故,10-21 到 10-26 系统原因每天约 1 条,10-27 起每天约 10 条(板卡 6 条 + Qwen 2–3 条)。
- Qwen 服务和半开卡住 6 条([[qwen-half-open-stuck-20261027]]),续跑计数不一致 1 条(6aabf56 只在测试),重启和失联 5 条。
**How to apply:** 板卡清理这个问题还没修。可以考虑先重试确认几次,确认不了也只隔离板卡、给 agent 返回错误,不要结束整条轨迹,至少别记成 AGENT_ERROR。
**10-28 下午**:已在 salty-test 修,见 [[infra-fixes-20261028]]。

View File

@ -0,0 +1,19 @@
---
name: mac-mini-clash-global-proxy-20261013
description: 10-13 查明:Mac mini 上 Clash Verge 全局模式+TUN,采集的全部流量(Qwen 自建服务、Salty、GLM)都绕美国洛杉矶 JMS 节点;断线、Salty 网络错误、请求慢的共同根因
metadata:
node_type: memory
type: project
originSessionId: 6c848f33-e8d9-4981-ade2-dc77987005d7
modified: 2026-10-13T08:13:56.815Z
---
2026-10-13 16:30 查 Qwen 卡住的原因时发现:
- VM 里采集进程环境 http(s)_proxy=192.168.5.2:7897(Mac mini 上的 Clash Verge / mihomo),没有 no_proxy。
- Clash 是 **mode: global + TUN 开启**(verge.yaml enable_tun_mode: true,enable_system_proxy: true),GLOBAL 选的是 JMS 节点(日志 10-09 21:39 起就是),规则末尾 MATCH,JMS,没有 GEOIP,CN 直连规则。
- 实测:VM 走代理、VM "直连"、Mac mini 本机直连,出口 IP 全是 **美国加州洛杉矶 IT7 网络**。对国内 Qwen 服务器一个小请求要 1.5–2.7 秒。
- Clash 每 8 分钟更新一次订阅(profiles.yaml update_interval: 8),每次都 unset/set system DNS,10-13 一天 121 次;12:13 有一次"直接更新失败"。
- 10-13 Salty API 网络错误集中在 12:10–12:50(245 次)和 14:00–14:10(132 次),与 Qwen 请求断在半路(12:20、12:53、13:54、14:25)、GLM CONNECT_FAILED 同时发生。
**Why:** 这是断线、Salty 网络错误、请求慢的共同根因(之前我以为是 Wi-Fi,不对)。**更正(10-14)**:10-13 Qwen 停摆的主因还有另一会话查出的系统漏洞——CPU 名额被超时步骤锁死(我当时看到的"等 Salty 容器几十分钟"其实是等本地名额)、续跑必死、读额度账本 0.5 秒超时,见 [[infra-leaks-20261013]];10-13 20:41 已修。代理问题到 10-14 中午仍未改。
**How to apply:** 改 Clash 属于用户本机网络设置,我不能动,让用户在 Clash Verge 里改:要么 GLOBAL 选 DIRECT,要么切规则模式并给 114.111.18.115、*.d-robotics.cc、open.bigmodel.cn、板卡网段加 DIRECT 规则;订阅自动更新间隔调大。Mac mini 上还跑着 ChatGPT/Codex,可能需要境外代理,所以推荐规则模式而不是关掉。只设 no_proxy 不够:TUN 仍会接管。改完用 VM 里 `curl --noproxy '*' http://cip.cc` 确认出口在国内。相关:[[selfheal-and-alert-20261012]] [[mini-salty-controller-20261009]] [[qwen-ability-failures-20261013]]

View File

@ -0,0 +1,14 @@
---
name: memory-synced-to-repo
description: 记忆要同步到仓库 docs/memory/(salty-test 分支);入口 docs/memory/AGENTS.md 写了创建和存放规则
metadata:
node_type: memory
type: feedback
originSessionId: 0f0f2556-2514-40e5-8ef7-f2c4e67c5701
modified: 2026-10-11T05:22:28.020Z
---
2026-10-11 用户要求把记忆推到远端仓库:放在 docs 目录下,用 AGENTS.md 引导,并写清楚怎么创建、怎么存放。现在仓库里的 `docs/memory/` 就是共享记忆库(Codex 等别的 agent 也读),入口是 `docs/memory/AGENTS.md`(规则和索引),根目录 AGENTS.md 里有指向它的说明。
**Why:** 用户同时在用 Codex 等别的 agent(10-11 起监控交给了 Codex),经验不能只留在我本机。
**How to apply:** 每次新增或修改记忆后,把文件同步到工作树的 docs/memory/,更新 AGENTS.md 的索引,提交到 salty-test 并推送(10-20 起分支改名,见 [[branch-workflow-20261020]])。推之前先 grep 一遍,确认没有密钥或密钥片段。相关:[[git-mainline-20261009]]

View File

@ -0,0 +1,75 @@
---
name: mini-salty-controller-20261009
description: 10-09 起 Mac mini 主控 + 每个阶段都在 Salty 容器里跑(salty_remote);各文件位置、为什么这样设计、还缺什么
metadata:
node_type: memory
type: project
originSessionId: a9e0f820-63b5-4eba-bcf3-24ad6f20af42
modified: 2026-10-12T03:03:09.463Z
---
10-09 用户要求把 04/05/06 三个批次搬到"Mac mini 主控 + Salty 执行 + 板卡验证",并让我直接打通。
**设计**:Mac mini 只跑 agent、调度、账本、配额、锁;agent 每次 `bench stage run`(01–08 全部)都在 Salty 起一个容器跑完整的 Stage.run(含查缓存),再把阶段目录(≤32MB 的文件)和板卡回执取回。代码:feature/salty-20261009 上的 harness/salty_remote.py + salty_remote_worker.py,钩子在 stages/base.py Stage.run 开头;配置键 execution.salty_remote。旧的 05-only salty_stage 保留但不启用。
**Why:** 缓存/数据只在 Salty 个人空间,Mac mini 看不到;只远程跑命令不行,查缓存也必须在容器里。Salty 不能在新命名空间挂 /proc(09-30 实测),所以 agent 沙箱只能在 Mac mini;剩余题都不带 recipe,不需要容器里的沙箱。
**How to apply:** 容器里用软链接复刻老编译机路径:/home/ming01.wang/{toolchains,outputs}→/data/personal/bench-runtime/home/…,{bench-cache,bench-data}→/data/personal/bench/{cache,data},/mnt/data/ming01.wang/model-compile-hbdk/bench 是真目录(BENCH_ROOT 会 resolve,不能是软链),runs→/data/personal/bench-root/runs。Mac mini 虚拟机里同一路径也是真目录。
位置(Mac mini 10-14 20:2x 起从外面连用 `ssh -p 443 amos@180.76.192.183`(公网转发,Mac mini 内网仍是 192.168.66.251,本机不在同一网段时内网地址连不上),报警脚本写成 ssh://amos@180.76.192.183:443;10-12 起内网是 amos@192.168.66.251;10-10 22:30 至 10-12 是 192.168.1.3;地址随重启/换网会变,连不上先问用户;仍走 Wi‑Fi,网线口 en0 空着):
- Mac mini 虚拟机:bench 根 /mnt/data/ming01.wang/model-compile-hbdk/bench(state/ 是 10-08 20:47 账本,sha 2d583fb0…),配额 ~/.local/state/bench-shared/,配置 /mnt/data/ming01.wang/configs/mini/*.yaml,板卡私钥/指纹/端口 ~/.bench-board/,key 录入脚本 /mnt/data/ming01.wang/configs/set-keys.sh(用户自己跑)
- 个人空间:personal:/bench-runtime/(三套环境 tar、board.env、ssh/、controller/ 账本备份);personal:/bench/ 归"salty迁移"会话,它负责解压 _tars
- 120 临时目录 /root/bench-runtime-20261009/(迁完要删);36 临时 ~/runs-pack-20261009.*、~/runs-essentials-*.tar.gz
- 本地 worktree:scratchpad/bench-salty(feature/salty-20261009),用完 `git worktree remove`
板卡:8 块都用 rdk_sandbox 私钥直连,指纹已固定;没用用户给的密码。rdk-sandbox(slot0)=40010。
网络:36→本机 Mac 只有约 60KB/s;Mac mini 从个人空间下载约 1.3MB/s,大件走个人空间中转。
10-10 开跑后的教训(代码都在 feature/salty-20261009,0cf3c20/949c5da 等):
- 编译工作目录必须在每个容器都是本地 /tmp/bench-work(base.work_dir 会 resolve 软链,04 写进 compile.yaml 的路径要和 05 一致);05/06 之间经 personal:/bench-root/work 交接。
- 主控要在本地复核 HBM(编译回执哈希、最终判定读 rollouts/NN/artifacts/*.hbm),所以 05 的 HBM 和新写的 artifacts 必须取回;06 用 copy2 保留旧 mtime,要按快照比对取回。
- Mac mini 走 Wi‑Fi 会网络抖动:salty describe 失败要重试(只读),大模型请求会变 PAUSED_INFRA(采集 --watch 自动恢复)。
- Salty 没有个人额度上限(10-11 复现:我们同时占 42 核/128G 没排队;平台方也确认总额度不缺、无"每人 3 个")。之前说的"约 25 核上限""两小时自动失败"都是我猜错的,已收回。`salty ps` 的状态会滞后(作业日志已开跑,ps 还显示 pending),短暂 pending 可能只是显示慢。编译用 6 核(运行中改 cpu_by_stage 只影响之后新起的 stagerun)。
- 作废名额的补法:旧行保留,db.rollout_upsert 新 kk + annotate 写原因;残留远程作业用 salty stop/rm/storage rm -r 清。
- Mac mini 关机/换网会打断在跑轨迹(重启后 PAUSED_INFRA 且隔离,resume 不可用,只能取消+补回)。
10-10 下午的教训(6a013d6):
- 356fdaa 起 Salty 传输层可重试(连续失败 30 分钟才算失败),上线后 20 次网络错误全被吸收;之前的 INFRA_ERROR 全是旧传输层的 OPERATION_STATE_UNKNOWN。
- 容器异常退出时主控补写的 meta.json 必须带 ctx.extra["operation_identity"],否则 stageworker 报 completed attempt metadata mismatch → 轨迹 PAUSED_INFRA 且续跑也过不去,只能作废补号(6a013d6 已修)。
- `bench execution cancel` 要等满轨迹自己的 cleanup_deadline_s(执行级 1800 秒),有操作停在 DISPATCHED 时就会等满 30 分钟,然后标"清理未确认"——不是卡死。
- 大模型请求断网(CONNECT_FAILED/REQUEST_OUTCOME_UNKNOWN)是设计上的"先暂停、不重试",整组账号一起暂停,靠 collect --watch 自动续(每条最多 3 次)。根治靠网络。
**更正(2026-10-12):只有 REQUEST_OUTCOME_UNKNOWN 和额度等待超时会自动续;CONNECT_FAILED 永远不会自动恢复(quota.py _resume_readiness),见 [[salty-throughput-drop-20261012]]。**
- Mini 整机会掉线约 1 分钟(10-10 16:00 实测 ping 不通);Wi‑Fi 是 5GHz 160MHz(信道 40),可能撞雷达避让。
- 04 里 iseg yolo11s.seg/yolo11x.seg/yolov8m.seg 的 kk0 PAUSED 是 10-08 旧行、不在 37 题清单里,不用管。
- 容器"无声死亡"(REMOTE_WORKER_FAILED,Salty 原因为空、日志为空):大模型编译(unimatch.flow ×4、mask2former.swin.b ×2、sea.raft、ocrnet)和 depth.anything 的 06-hbm(8G,2 分钟内死)。Salty 容器是 cgroup v2 且 memory.oom.group=1:任一子进程超内存就整个容器被杀、原因留空;worker 本身不往 stdout 打字,所以日志为空分不出死法。往 /tmp 写满约 39G 也会被驱逐(节点盘 99G 共用),但 06-hbm 死时 /tmp 还剩 54G,主因是内存。10-10 19:40 起 05-compile 32Gi、06-hbm 16Gi;dd20d19 起容器每 15 秒把内存/磁盘/最大文件记到 personal:/bench-stage-*/usage.log,失败时附进 stderr.log。
- 10-10 19:45 Mac mini 整机意外停机(无关机记录、无 panic),20:32 才重新开机;虚拟机不会自己起来,且因 ha.pid/vz.pid 的进程号被别的系统进程复用而显示 Broken。恢复:确认没有 limactl/VZ 进程后,把 ~/.lima/bench/{ha.pid,vz.pid,ha.sock,default_*.sock} 挪到 ~/lima-stale-20261010/,再 `limactl start bench`(别用 stop --force,会按旧进程号发信号)。
- 重启后上次开机的所有执行都会被隔离(OWNERSHIP_UNKNOWN / SIDE_EFFECT_UNKNOWN),这是有测试守着的设计,不改。处理:Salty 上孤儿作业全部 stop/rm、目录 rm -r;`bench execution reconcile` 列出非 TERMINAL 的;并行 `execution cancel`(有阶段在跑的几秒结束,只是暂停的要等满 30 分钟清理期限);configs/requeue-after-crash-20261010.py 补新 kk;旧开机的 lease 归档到 state/locks-stale-*;再起采集。reconcile 的 ready=False 来自历史上 TERMINAL+QUARANTINED 的旧执行,不挡采集启动。
- 监控脚本要报"连不上",否则掉线一小时都是静默(scratchpad/watch-prod.sh 已改)。
- 重启恢复已做成脚本:configs/recover-after-reboot.sh "<原因>"(先手动 salty stop/rm 孤儿作业和 bench-stage 目录,再后台跑它;它会 reconcile→并行 cancel→requeue-cancelled.py 补 kk→归档旧开机 lease)。10-10 22:34 第三次重启用它恢复,8 条作废补回。
- 按需加内存(df64aa8):默认编译 16Gi、06-hbm 8Gi,同一阶段容器 failed 过几次就翻几倍(上限 64Gi);统一给 32Gi 时共享队列只放得下 1 个编译。10-10 晚上队列很挤,6 个 16Gi 编译全排队,采集降到 05/06 各 2、04 一路。
- 容器无声死亡已坐实是内存超限:10-11 01:04 UTC retinanet.r101 编译(salty-f4b63fd8…,6核16G)死前 15 秒内存冲到 15.5G;复现作业 bench-repro-oom-20261011(salty-de281d92…)同样 failed、原因 "-"。平台侧要做的是 describe 原因里带 OOMKilled/Evicted/退出码。665bbef 起失败作业不再 rm,留给平台取证(要手动清)。
- 开不到 16/16/5 的真原因在 Mac mini(10GB 虚拟机),不在 Salty:① 调度程序内存涨到 5GB,10-11 07:08 05 的调度程序被内核 OOM 杀——Pi 每个 token 写一条 message_update,带两份整条消息(message、assistantMessageEvent.partial),events.jsonl 每条轨迹 300–800MB,budget_used 每次 read_text 整个文件。f1f44c9 修:Pi 不再写这两份快照(下游只用 type/delta),budget_used 逐行读。② 同一原因磁盘一天涨 16G(盘 78G)。③ 修完后每条轨迹在主控约 210MB(Pi 约 150MB),37 路约 8.7GB,太紧;10-11 起 05/06/04 = 12/12/4,要上 16/16/5 需把虚拟机内存调到 12GB(要用户同意,且需重启虚拟机)。
- 调度程序的 Python 代码只在启动时加载:改 harness/*.py 后,正在跑的调度程序仍是旧代码,必须排空重启(configs/restart-after-drain-20261011.sh <旧pid> <配置> <run> <并发> [job清单])。
- 10-11 用户要求"尽量用别处资源,Mac mini 只留最终数据集":configs/archive-finished.py 常驻(日志 logs/archive-finished.log),轨迹结束满 30 分钟后打包到 personal:/bench-root/archive/<run>/<job>/<kk>.tgz(容器产物在 personal:/bench-root/runs 已有同大小副本的不进包),核对后只删本地 .bc/spot npz/onnx 等。**坑:调度程序每结束一条轨迹就跑导出器(refresh_run_dataset),它重读每条轨迹的 agent/(SFT 原文)并按 sha256 重验 artifacts/<job>.hbm;删了它们导出会把 PASS 变 UNVERIFIED、SFT 变 0(10-11 12:00 踩过,已用 restore-agent.py / restore-hbm.py 从个人空间取回)。这两样必须留在本地,除非导出改到 Salty 上跑。**
- 10-11 10:22 虚拟机内存 10→12GiB(备份 ~/lima-bench-lima.yaml.before-12g-20261011;宿主机 16G、已用 3.4G 交换,别再加);之后 06/04/05 = 16/5/16。正常 limactl stop 时调度程序把在跑轨迹记成 INFRA_ERROR(不是隔离),recover 脚本不会补它们,要按 finished_at 那一分钟单独补号。
- c8a93c9 内存按题记:同一 job 任一轨迹该阶段 failed 过,就从当时内存(meta.salty_memory)的两倍起,上限 128Gi。
- 10-11 用户定:①导出挪到 Salty;②hb_verifier 没测就崩溃算"未验证"(2018b62,只对之后的轨迹生效,yolo11n.seg 那条历史 FAIL 不改);③监控交给 Codex,我不再挂监控;④120 已关机清理。
- 导出挪到 Salty(scripts/salty_offload.py,常驻在 Mac mini 上,取代 configs/archive-finished.py):每 10 分钟把结束满 30 分钟(UNVERIFIED 24 小时)、执行 TERMINAL、PASS 已审完的轨迹打包到 personal:/bench-root/archive/<run>/<job>/<kk>.tgz(之后的改动另传 <kk>.u<时间>.tgz,不覆盖旧包),然后删本地所有 >1MB 文件;有新包时最多每小时起一个 Salty 作业(salty_remote_worker.export)把包解到 personal:/bench-root/runs、跑 export/to_agentrl.py,数据集留在 personal:/bench-root/datasets/,再拷回 Mac mini 的 bench/datasets-final/(这是最终数据集)。调度程序自己每条结束后的本地导出(bench/datasets/)保留:它负责在文件还在本地时发现并审核新的 PASS,搬运要等它审完。
- Salty 上导出的坑:容器里 runs 不能是指向个人空间的软链接。verify.py 会 resolve 轨迹目录,并拒绝走软链接的预测文件,路径一对不上,G3 就变"未验证"、审核回执的绑定也跟着变(第一次实测 SFT 0 条)。现在 export() 在容器本地建真实的轨迹和阶段目录,agent/、artifacts/ 用软链接;解包不解 workspace(它是大头,导出不读)。修完后和 Mac mini 本地导出逐条一致(3/3/2)。最终数据集在 bench/datasets-final/,Salty 上一份在 personal:/bench-root/datasets/。
- 数据集版本门槛:旧网盘上 04/05/06 数据集的 min_agent_version 是 12;Mac mini 上的数据集是新建的,默认用了当前的 15,迁移前的 PASS 有 260 条(版本 12/14)会被直接丢掉。10-11 已用 `to_agentrl.py --min-agent-version 12` 改回 12(本地三份 filter_history 有记录;Salty 上的 manifest 删了,按本地的重新播种)。新建数据集时先查原批次的门槛。
- 10-11 迁移前的 291 条 PASS(04/05/06 早于 10-09 开始的)已从 36 经 Mac mini 中转到 personal:/bench-root/archive/(13:28–16:46,零失败;不带 workspace、.bc/.onnx、06-hbm 抽检 npz;中转脚本已删)。
- 10-11 补审:Salty 导出列出的"没审过/审核未知"44 条,用 configs/review-oldera-20261011.py 逐条取回 → 审 → 回执作为补丁包传回 → 立刻删本地(旧格式对话最大 650MB,读一条要 1.3G 内存,一次全取回会让三个调度程序的本地导出一起重读、撑爆内存)。结果 33 过、7 不过、4 未知:3 条是请求体 68–77 万字节超过审核账号 tpm 70 万的本地估算(字节当 token 算,改 collection_v1 要排空重启,等用户定),1 条是 10-08 旧服务器审到一半留下的 STARTED 回执(按设计不自动重发)。审核模型偶尔回格式不对(INVALID_REVIEW_SCHEMA 等),重试一次就过。
- 10-11 19:32 最终数据集 SFT 04/05/06 = 30/76/136(共 242;旧网盘 10-08 是 177)。迁移前 291 条 PASS 全部有判定:进 SFT 234、审核不过 46、未知 3、轨迹不完整 8。一次性脚本(中转、补审、restore-*)都已删。
- 10-12 用户确认审核模型 deepseek v4 flash 有 1M 上下文:三份配置新增额度组 deepseek-review-account-1m(规则照抄、tpm 70万→210万,覆盖 content_review 200 万字节的请求上限),reviewer 改走新组(原配置备份 configs/config-backup-20261012/)。额度账本按组名锁规则(同名改字段报 QUOTA_POLICY_CONFLICT),所以只能新开组。在跑的调度程序配置是启动时读的(lru_cache),下次重启才走新组;在那之前它们审长轨迹仍可能得 UNKNOWN(REQUEST_EXCEEDS_INTERNAL_TPM),用 scripts/salty_review_again.py 补(先停 salty_offload.py)。
- 补审工具 scripts/salty_review_again.py RUN CONFIG [--release-started] [--only ...]:逐条从存档取回 → 审(有 COMPLETE UNKNOWN 就按重试走)→ 回执作补丁包传回 → 删本地。STARTED 回执的坑:06 shufflenet.v2.x1.5 的 10-08 请求其实完成了(账本 generation COMPLETE、HTTP 200),是写回执时崩了;按原执行号重审会被账本当作"已完成"直接不发。正确放行是把 STARTED 记成 COMPLETE UNKNOWN(OPERATOR_RELEASED_STARTED_RECEIPT,原件进 history/),走重试换新执行号(工具 --release-started 就这么做,用户 10-12 批准)。
- 10-12 补审结果:04 yolov8m、mspn.r50,05 simplebaseline.r101、xfeat,06 shufflenet.v2.x1.5 通过;04 mobilenet.v3.large 不通过。迁移前 291 条 PASS 已无"未知"。
- 36 上 ~/restore-20261009 只留 .ssh(120 的两把私钥)、qwen-autofill/s100p-glm-8way 旧配置、resume-glm 日志(别处没有);账本/额度/raise-concurrency/node 已核对个人空间 controller-state.tar.gz 和 Mac mini 有完整副本后删除(备份只缺空锁文件)。~/restore-logs 是别的会话恢复家目录的核对记录,不是我的,别删。
- 导出的第二个坑(df51a7c):个人空间 runs 里还有容器替主控已放弃的尝试写的文件(xfeat 06-hbm a00 主控判超时,容器继续跑完写了 stdout.log),照搬会让门证据多出文件、审核绑定对不上。现在解包时把成员清单写进 .unpacked-* 标记,导出目录只按清单搭;HBM 从个人空间链接。
- 10-12 03:40 最终 SFT 32/79/139(共 250);迁移前 291 条:SFT 237、审核不过 46、轨迹不完整 8;迁移后新跑 PASS 17 条:SFT 13、审核不过 4。没有"未审/未知"。
- 每次 Salty 导出 45–75 分钟(搭目录约 30 分钟、个人空间读取时快时慢,05/06 各十几分钟),常驻程序等导出时不搬运;导出只在有新存档时发生,最多每小时一次。想更快就把 salty_offload.py 的导出间隔调大或减少阶段文件拷贝,目前没必要。
- 10-12 10:06 用户直接重启 Mac mini,没先停虚拟机,虚拟机被强停(last -x 里上次开机没有关机记录)。在跑的 37 条轨迹的 execution.json 恰好在那一秒(10:06:37)写入,结果变成全零或半截,尽管 atomic_json 有 fsync。reconcile、recover-rollout 诊断读到它们都会抛 JSONDecodeError,恢复脚本因此第一步就失败。采集程序本地的 06 数据集文件(datasets/*-training/*.jsonl)也被清零,但它每次刷新都整份重写,会自己恢复;datasets-final 没受影响。sqlite(jobs、quota)quick_check 正常。
处理办法:
1. 先清 Salty 孤儿作业:在跑的 stop+rm,已成功没取回的 rm,再 storage rm -r 对应的 bench-stage 目录;失败的作业留着。
2. 把坏的 execution.json 改名为 execution.json.corrupt-<日期> 留档。recover-rollout 只接受没有 execution.json 的轨迹。
3. 执行 `bench recover-rollout --run R --job J --kk K --apply --reason ... --confirm-owner-dead --confirm-work-stopped`,旧号会变成 ABANDONED,同时补一个 QUEUED 新号。
4. 再跑 configs/recover-after-reboot.sh,处理状态完好但没跑完的 3 条和旧开机留下的锁。
清单和日志:logs/corrupt-execution-1012.txt、logs/recover-rollout-1012.log、logs/orphans-1012.log。
**以后重启 Mac mini 之前先 `limactl stop bench`**,让虚拟机正常关机:在跑的轨迹会记成 INFRA_ERROR、文件不会写坏,但要按 finished_at 那一分钟单独补号。

View File

@ -0,0 +1,23 @@
---
name: missing-129-tasks-20261103
description: 11-03:原表 338 个模型、生产批次 209 道,差 129(3 个非神经网络不算);按难度分三档、codex 补齐约 4–6 周、能成 80–100 道
metadata:
node_type: memory
type: project
originSessionId: df58aa6a-e462-4740-8360-1c0bf35956b5
modified: 2026-11-03T07:30:14.491Z
---
11-03 用户问能不能用 codex 把"欠的题"补齐、工作量多大。
**口径**:registry/models.csv(salty-test c78b9c4)338 行;04/05/06 每批 209 道(10-31 起的 05re/06re、qwen-all 都是这 209 的子集),并集也是 209。差 129:SIFT/ORB/AKAZE 3 个是传统算法、不算题,实缺 126。CSV 的 status 列是 9 月的旧标签,不能当现状。清单生成方法:VM 上 `ls runs/r20260929-06` 取 job 名第二段,和 CSV 的 model_id 比。
**缺的是什么**:都是 9-15 至 9-22 那批(codex 一周写了约 170 个适配器)挑剩下的难题。9-17 覆盖统计里每个都缺适配器和具体权重。已有适配器文件但没进批次的 6 个:segnext×4、metric3d.v1.convnext.tiny、memflow。
**三档(我们的估算)**:
- 照现成写法套,约 21:mmseg 语义分割 9(segnext×4、ddrnet.39、deeplabv3.mbv3、mask2former 语义×3)、vitpose×4+mspn.r101、rt-detr×4+dino.r50+yolov3、metric3d tiny。2–3 天。
- 先补一块公共代码,约 64:SAM 系 25(要先定"给框出掩码"的评法;FastSAM 类别语义 9 月就卡住;ViT-H 可能放不进板子)、特征匹配 17(要新写成对评测;aslfeat 是 TF1)、两阶段检测/实例分割 13(RoI 要拆)、自底向上姿态 5、光流 4(相关层要纯 torch 重写)。2–3 周。
- 整类从零 41:双目 18(没有评测器;KITTI2015 双目测试集和校准 9-17 在老机器上验过,和 flow 共用一份数据;anynet 权重 Google Drive 下不了)、occ 23(没有评测器、没有 nuScenes/Occ3D 测试集、CSV 里数据集写成 kitti2015 是错的、多数靠自定义 CUDA 算子;能成的大概只有 FlashOCC 系 4–6 道)。
**Why:** 用户要决定补多少、先补哪些。
**How to apply:** 新题只能进新批次,不能改在跑的 job.json([[jobjson-gate-edit-breaks-salty-20261024]]);每道新题还要板上 CPU fp32 速度基准,只有 1 块 S100P 在线时板卡是瓶颈。10-30 方案稿里写的"适配 2–4 周人力"和这次估算一致。

View File

@ -0,0 +1,15 @@
---
name: missing-verdict-breakdown-20261021
description: 10-21 breakdown of export missing_verdict exclusions (~39%): mostly early-period history and restart cancellations, not the model; current rate on normal days is about 4%
metadata:
type: project
---
On 10-21, the export's "excluded for lacking an independent verdict" is `missing_verdict` in export/to_agentrl.py (the rollout has no verdict.json). Script: /tmp/mv*.py on the VM, which reads datasets-final/*/disposition.jsonl and joins it with the database.
- **Total 595.** Of these, 242 were cancelled by us (restarts, reboots, outages), 162 hit the 24 h limit, 141 were INFRA_ERROR, and 42 are old FAIL/UNVERIFIED with no file.
- **76% happened 09-29 to 10-08**, when the daily rate was 46–88%.
- **Since 10-09: 121 of 927, about 13%.** 94 of those fall on 4 incident days: the 10-10 reboot, the 10-12 restart, the 10-18 read-only disk, and the 10-21 reboot plus the Qwen cancellations. On normal days it is about 4%. Only 4 timed out and 1 was INFRA_ERROR.
- **These would not be SFT samples even with a verdict**, because SFT only takes PASS. What is lost is compute and negative samples.
**Why:** The 39% is a cumulative figure. It reads like "the task design or the model is the problem", but it is really early infrastructure and restarts.
**How to apply:** To push this down further, the lever is not cancelling and not restarting production (use hot-swaps and resuming after restart). No need to build verification for rollouts that hit the time limit. Related: [[overall-tally-20261018]] [[stability-sweep-20261016]] [[reboot-20261021]]

View File

@ -0,0 +1,96 @@
---
name: net-resilience-board-deadline-20261014
description: 10-14 网络小故障拖垮轨迹的三处修复(原地重发/免费续跑/结果不明可续跑,等重启)、板卡清理没确认的根因与修复(已部署)、下次重启要上的完整清单
metadata:
node_type: memory
type: project
originSessionId: 2b85e929-b893-42c3-a7a0-3a72bda14705
modified: 2026-10-14T07:55:38.311Z
---
**网络(f83fa39,等重启)**
GLM 请求失败率约 0.3%,常成堆出现(10-14 12 点那一小时有 14 次连不上)。以前一次失败就让整条轨迹暂停,续跑 3 次的额度被网络故障用完后就卡死;回复中途断开的请求还会被自动放弃,同时取消整条执行(36 小时里 16 次)。
- A:broker 遇到确定一个字节都没发出去的失败(RETRY_UNSENT:CONNECT_FAILED / DNS_*),在原地等 cooldown_initial_s 后重发。每次把"等待 + 一次连接时限"计入 wait_spent,保证客户端超时的上界不变。
- B:只有最近一次请求可能已送达(最后一个 attempt 的 sent ≠ 0),续跑才扣次数。账本的 readiness 返回 counted;Execution.resume(counted=) 只在 counted 时检查上限、增加计数;pipeline 不再按原始次数预先过滤。
- C:reconcile 自动放弃时(resumable=True),把这一轮改成 PAUSED / REQUEST_OUTCOME_UNKNOWN,可以续跑并计次数,不再取消执行。人工放弃仍然永久隔离。续跑资格检查忽略已放弃的 attempt。
- 测试:test_quota 新增 2 个;test_quota_auto_abandon 改了("自己那一轮永不重放"的旧规定被有意推翻);test_execution 增加不扣次数的续跑。
**板卡清理没确认(8a14b41,10-14 15:50 已部署)**
10-12 到 10-14 共 18 条:
- 12 条是 07-board 卡满 1 小时、一张回执都没有。同一模型平时 0.2–2.6 分钟就完成,所以是真卡死。
- 3 条是重启时主动取消。
- 其余是回执 UNKNOWN。
板上证据(rdk-sandbox-40007,10-14 14:35 那次):
- 模型 2 分钟传完,测量程序 14:37:40 启动,BPU 加载后内核日志再无动静;
- guard-result 写的是 host_disconnected(容器被时限结束时)。
- 板子负载约 6,可能有别人在用。卡住的具体原因:测量进度日志随容器一起丢了,查不到。
系统问题:board_perf.bench 的时限,本地执行时会收进阶段截止时间,Salty 容器里没有执行状态,固定 3600 秒,比 07-board 的 1 小时阶段时限还长。结果容器先被结束,回执带不回来,只能判 BOARD_CLEANUP_UNCONFIRMED,整条轨迹作废。
修法:
- salty_remote 打包时把阶段截止时刻(墙钟)放进 BENCH_PHASE_DEADLINE;
- board_perf 预留 600 秒交回结果,到时作为普通 FAIL 结束,agent 可以重试。
- VM 和 Salty 时钟偏差约 1 秒。已核对部署后的打包里带着截止时刻。
还没做:板上进度停滞检测(例如 10 分钟没有 board_progress 就提前结束)。08-eval 每个样本批次可能好几分钟,窗口不好定,先不做。
**下次重启要部署的完整清单**(部署前和分支比对 md5):
- harness/stageworker.py(f74fe00,hbm 抽查的配置校验)
- agent/SYSTEM.md(f74fe00,hbm 抽查说明)
- harness/quota.py(e4e1513 DNS 可续跑 + f83fa39 A/B/C)
- harness/execution.py、harness/rollout.py、harness/pipeline.py(f83fa39)
- 智能体自主性(a92510d,见 [[agent-autonomy-audit-20261014]]):
- harness/stageworker.py、terminal.py、salty_dev.py(新文件)、salty_remote_worker.py、stages/s04_calibrate.py;
- bin/stageclient.py、agent/SYSTEM.md、agent/VERSION。
- **s04 和 worker 不能提前部署**:它们随阶段打包、部署就生效,而 s04 依赖新的 stageworker。
- 三份新配置都要加:
- salty_remote.stages 加 terminal;
- cpu_by_stage.terminal: 8,memory_by_stage.terminal: 32Gi;
- terminal.enabled: true;
- pools.dev.workers: 16(三份要一致)。
- SYSTEM.md 三个批次共用。04 不开的话,Qwen 会读到 bench dev 却用不了,所以要用户定 04 是否一起开。
**10-14 18:27–19:00 已重启上线(用户定:速度门槛 1.5 倍、04 一起开、马上重启)**
- 脚本和清单在 configs/restart-20261014/:
- stop.sh:SIGTERM 后最多等 30 分钟,让已在上板、评测的轨迹跑完;随后按新续跑规则用 targets.py 选出要取消的,并行取消;
- start.sh:先备份,再部署 26 个文件,补号,用 -v16 配置启动;
- restart-offload.sh:等 offload 空闲后用新配置重启它。
- 结果:
- 18:58 取消 35 条,其中 34 条在跑、1 条暂停但账本已作废;保留 7 条可续跑的暂停轨迹,重启后全部续上(仍是 v15)。等待那 30 分钟里有 3 条自然结束(1 PASS)。
- 19:00 三个 collector 起来,1 分钟内开始领题。
- 部署后和分支 9b7544a 逐文件比对 md5 一致。只有 scripts/bench_health_alert.sh 有意没部署:它是别的会话的飞书报警脚本。
- 新配置:configs/mini/*-v16.yaml,在原配置基础上:
- salty_remote.stages 加 terminal(4 核、16Gi);
- terminal.enabled: true;
- pools.dev.workers: 8。
- 踩坑:
- stop.sh 第一版用 grep 匹配 /proc/PID/cmdline,参数之间是 \0,匹配不上,安全中止,什么都没做;要先 tr 成空格。
- Mac 上没有 timeout 命令。
- g.sh 起 setsid 后台进程时 ssh 不会返回,要另开一条命令看日志。
- Qwen 组因取消时有一条请求结果不明,进入 RECONCILING,04 要等约 31 分钟(request_total_s 1800 + 60)才领题;GLM 两个组 RECOVERING。
**重启后头 40 分钟(19:00–19:40)**
- 恢复情况:
- 05/06 各 16 条、04 有 5 条在跑;保留的暂停轨迹全部续上。新轨迹都是 v16(提示词里有 bench dev 和速度要求)。
- 04 等 Qwen 组对账到约 19:31 才领题。
- 19:29 S600 组有一条 GLM 回复中途断开(REQUEST_CONNECTION_INTERRUPTED)。整组 RECONCILING 约 20 分钟,05 有 9 条暂停;19:40 按 C 方案自动作废那一条请求,暂停的全部续上。断线的根因仍是 Clash 走洛杉矶。
- bench dev 使用:
- 40 分钟 91 次:74 次成功,14 次是 agent 自己的命令出错,3 次容器 OOM(vit.h.14、deeplabv3plus 在 16Gi 里跑 hb_compile)。中位 78 秒。
- agent 拿它查平台 ONNX 和缓存:VM 上的 bench/cache 几乎是空的,缓存只在个人空间。
- Salty 上 bench dev 同时只有 3–8 个,没有排队。
- 当场修掉的两处(都不用重启):
- 67d306d:offload 的孤儿清理和作业自己的清理撞车,stop 返回 404 后会重试 30 分钟,这期间归档和导出都停着。改为跳过已清理的作业,404 当作已停。offload 已在 19:17 重启。
- d565796:bench dev 的内存取本模型正式编译需要量的下限(OOM 过就翻倍),失败时把容器的内存记录附进 stderr。terminal 每次都是新进程,部署后马上生效。
- 还没做:
- 速度门槛的强制判定:打算放到导出时按参考延迟过滤,不用重启。
- 补参考延迟:每题用默认配置编译并上板测一次,要占 Salty 和板卡时间,等用户同意。
- 开发环境大文件的清理。
**Why:** 用户要把这套系统当以后 RSI 的基础设施。原则:能在底层重试的不让上层知道;系统故障不扣模型的次数;结果不明就核对后续跑,不整条作废。
**How to apply:** 看到新的"暂停没恢复"报警,先用 resume_readiness 看 counted 和 reason,再判断是不是这几类。
相关:[[infra-leaks-20261013]] [[hbm-spotcheck-optional-20261014]] [[mac-mini-clash-global-proxy-20261013]] [[bench-restart-hazards]]

View File

@ -0,0 +1,11 @@
---
name: never-edit-running-script
description: 不要原地改正在运行的 shell 脚本;要改就写新文件或"新文件+改名替换"
metadata:
type: feedback
---
不要原地修改正在执行的 bash 脚本(open(p,"w") / sed -i 都会改同一个 inode)。bash 边读边执行,运行中的进程会在下一段按旧字节偏移去读已变化的内容,行为不可预测。
**Why:** 2026-10-09 我在 120 上原地改了正在跑的 `/root/salty-migrate-20261009/migrate.sh` 的 up(),"salty迁移"会话指出后只能结束主 bash,改用新脚本 phase2.sh / verify.sh 接手,我的改动也就作废了。
**How to apply:** 脚本已在运行时,改动写进新文件(或写好后 `mv` 替换,旧进程继续持有旧 inode),并明确下一轮用哪个文件。相关:[[salty-personal-migration-20261009]]

View File

@ -0,0 +1,38 @@
---
name: opencode-staging-20261021
description: 10-21 opencode 接上 terminal_exec 和额度代理(salty-test 5fb89d6/a595d49/f61a083),测试目录试跑 1 条;装在哪、配置、踩过的坑、还差什么
metadata:
node_type: memory
type: project
originSessionId: 4d3bd580-c0f8-4b51-a06d-1c113ccd09b0
modified: 2026-10-21T11:41:12.869Z
---
10-21 用户要给系统加 opencode。原型(9-22)早就在 harness/runners/opencode.py + agent/opencode/bench.ts,但没有受管执行、不走额度代理(直连 GLM 带真 key),所以 terminal_exec(开发环境/上板)用不了。
已做(salty-test,已部署 bench-staging,**未上生产**):
- terminal_exec 逻辑抽到 agent/extensions/terminal-core.js,Pi 的 terminal.ts 和 bench.ts 共用;opencode 也建 Execution、用额度代理发的临时令牌(runners/opencode.py configure);续跑不做,_resume_snapshot 跳过非 Pi
- 预算口径改成和 Pi 一样:只算新输入+输出(+推理),不算 cache read(原型把缓存算进去,63 轮就"用完 200 万",实际 9.7 万;Pi 同题 96 轮 12 万)
- opencode export 走管道会在 64 KiB 整数倍截断(Bun 退出不刷),改成写文件
VM 上:opencode 1.18.31 在 ~/.local/lib/opencode-1.18.31/node_modules/opencode-linux-arm64/bin/opencode;插件依赖 bench-staging/agent/opencode/node_modules(npm ci 要走 env.sh 的代理)。配置 configs/mini/staging-opencode.yaml:key 变量 OPENCODE_GLM_API_KEY(用户自己录在 bench-staging/.env.local,是另一个智谱 key)、账号组 glm-opencode-staging、runners.opencode.enabled。
试跑结果(r20261019-02 mobilenet.v2 kk10):真用 bench dev + terminal_exec 编译、hb_verifier、fp32 对比,40 分钟被错误预算口径砍掉;导出修好后 129 条消息。
**坑:**
- 别把 opencode 排队项放进测试 collector 在跑的批次:它配置里 opencode 关着,领到就整个崩(设计上配置错直接停)。10-21 15:35 因此停了约 3.5 小时,19:38 取消两条 kk10 后用 start.sh 重启。opencode 试跑要用单独批次
- 同一道题有 RUNNING(含隔离的旧轨迹)时 `bench rollout` 认领会失败
- 查测试 collector 进程用 `pgrep -f "collect --run r20261019-02"`;"bench.*collect" 匹配不上,会误报没在跑
- jail 会把 /tmp 换成空 tmpfs,冒烟副本不能放 /tmp
- 每条轨迹私有 HOME,opencode 启动时每次重装插件/接口包:约 1 分 45 秒、172 MB、要联网;修法是装一份共用的只读 node_modules 并关模型清单拉取(待做)
- opencode 没有 Pi 的 path-guard:bash 能 ls/grep $BENCH_ROOT/harness、读 SYSTEM.md(read 工具被 external_directory 挡住,bash 不挡)
**Why:** 用户想多一个 harness;Pi 侧的约束(预算、隔离、导出)opencode 要逐项对齐才算可比。
**How to apply:** 上生产前至少补:共用依赖目录、bash 路径限制、单独批次再跑几条真题。相关 [[staging-collector-20261019]] [[branch-workflow-20261020]] [[simplify-agent-rules-20261017]]
**10-21 晚重跑(单独批次 r20261021-oc,3 题各 1 条,配置 staging-opencode.yaml)**:mobilenet.v2 PASS(71 分钟、94 轮、14 万 token)、resnet18 PASS(36 分钟、62 轮、7.9 万)、ssdlite320 FAIL(10 小时、212 轮、61 万;精度掉 5.13% 超 5% 线,板上 787 ms、BPU 利用率 0)。导出完整(partial=False,带真实 system 和 9 个工具),但 **SFT 0 条:export/to_agentrl.py 只有 Pi 有严格 SFT 校验,非 Pi 一律 unsupported-strict-sft-source**,要进 SFT 得给 opencode 写严格校验(待用户定)。三条都没调 claim(Pi 里也是可选)。都在本地和 bench dev 里读/拷 harness/adapters、stages、backends、tools/export_onnx.py 当参考——开发环境能看到平台代码这件事 Pi 也有,但本地这一侧 Pi 有 path-guard、opencode 没有。
**10-22 补 path-guard + 共用依赖(salty-test d166593/abc351c/061f3ed,已部署测试目录,未上生产)**:
- path-guard 照 Pi 的 private-home 分支:read/grep/glob/write/edit 走 guard-core 白名单;bash 只挡从 / 扫描和直接调 hb_compile/ssh 等(Pi 在生产也不按路径查 bash,bash cat harness/ 两边都拦不住,要改得一起改);external_directory 放开交给 guard(之前连 job.json 都读不了)
- 依赖:每条轨迹 config/opencode 放 opencode 自己的 package.json + package-lock.json(agent/opencode/config/),node_modules 用硬链接复制 agent/opencode/node_modules;关 models.json 下载。启动到首个请求 1 分 45 秒 → 约 20 秒、没有 .npm。**软链在沙箱里会卡**;另有几次冒烟启动后卡住原因没查清(不是参数/网络/依赖被改),之后连续 8 次正常
- 重跑 r20261022-oc:3/3 PASS(mobilenet.v2 78 分钟 73 轮 12.6 万;resnet18 61 分钟 61 轮 9.4 万;ssdlite320 10.5 小时 196 轮 144 万,接近 200 万预算);三条都调了 claim;guard 共拦 4 次(全盘扫描 2、命令替换 1、读生产目录 adapters 1);测试目录 harness/adapters 本来就放行

View File

@ -0,0 +1,21 @@
---
name: overall-tally-20261018
description: 10-18 23:50 全局盘点:导出 871 条(GLM 723、PASS 334、SFT 275);v18–22 自己导图通过 15 条(GLM 11,真改结构 1 条且很慢);每天系统原因结束 20–89%;Mac mini 盘只剩 8G、bench-work 已结束轨迹占 36G
metadata:
type: project
---
**数量(DB 0929 批次 + datasets-final teacher.jsonl,脚本 VM /tmp/tally.py)**
- 04/05/06 已结束 1550 条,系统原因(取消/系统出错/未验证/丢失/放弃)810 条≈52%;排队 04 607、05 412、06 321(约 200 道题/批次,从没通过过的居多:通过过的题 04 61/209、05 102/209、06 113/209)。
- 导出 871 条:GLM v12–15 558(PASS 311、SFT 258)、v16–17 88(12/7)、v18–22 77(11/10);Qwen 148(PASS 82、SFT 57,只做基准)。v23 还没有结束的。
- v18–22 的 15 条 PASS(GLM 11 + Qwen 4,几乎全是 v22):自己写导出 6(其中 2 条同时用了平台导出脚本)、照平台导出脚本 5、开发环境里本地编译诊断 9/11、板上自测 4/11、成品图真改过结构 1(05 deeplabv3plus.r50 拆卷积,板上是静态估计 12.7 倍,很可能不满足速度)。严格口径(自己写导出、进 SFT、不明显慢)约 3–4 条:ocrnet.hrnet.w48、upernet.swin.s、rtmdet.x、fcn.resnet50。
- 速度 G4 仍只记录不判;板上实测 / 平台静态估计 0.9–4.2 倍,两者不可比,判不了 1.5 倍。
**稳定性(按结束日,系统原因占比)**:10-12 89%、10-13 58%、10-14 39%、10-15 54%、10-16 74%、10-17 20%、10-18 70%。大头是取消(自己重启部署、断电、盘只读),其次 INFRA_ERROR 每天 6–29 条;10-17 唯一平稳。v22 以来结束的多是撞 24 小时上限。
**Mac mini 盘**:23:50 宿主数据盘剩 8G(96%),VM 镜像 61G 随用量涨(discard 生效);VM 里 /home/ming01.wang/bench-work 37G,其中已结束轨迹 742 个目录 36.3G(只有 05/06 阶段用,结束后无人读);宿主废纸篓 7.2G。18:46 的 EIO 很可能就是宿主盘满(未证实)。
**Why:** 用户要一次看清有多少轨迹、多少高质量自主轨迹、稳不稳、该怎么做。
**How to apply:** 复查用同一脚本和口径;清 bench-work 要用户同意。相关 [[sft-autonomy-tally-20261016]] [[stability-sweep-20261016]] [[vm-disk-readonly-20261018]] [[rl-readiness-20261017]]
**10-18 23:55 处理(用户同意)**:删 bench-work 里已结束轨迹 742 个目录(configs/recover-20261018/clean-bench-work.py,名单在 deleted.txt),fstrim 后宿主 8G→45G、VM 61G→26G。offload 6c7b19f:archive() 释放大文件后顺带删 work_root/<run>/<job>/rNN;VM 上文件已换,22:12 那次导出 10-19 00:21 正常结束(sft 58/110/165),00:22 offload 按计划重启为 pid 38219(新代码);还没见到第一次自动删临时目录。本机健康检查 ~/.bench-health/bench_health_alert.sh 加了宿主 <20G、VM <10G、VM 盘只读三项报警(limactl shell 会吞 stdin,要 </dev/null),备份 .bak-20261018;RUNS 暂去掉 06,06 重启后加回。废纸篓用户自己清。

View File

@ -0,0 +1,84 @@
---
name: overnight-check-20261015
description: 10-15 早上复查:dev 槽 8→37 已改;S600 板盘满(失败会话目录留板不删);暂停名额被新题抢;全 fp16 落 CPU 仍判过;4 条自带图/校准提交
metadata:
node_type: memory
type: project
originSessionId: cadbef09-8744-472b-81b1-a1ff37b0a735
modified: 2026-10-15T01:41:51.665Z
---
10-15 07:50–08:10 复查(v16 上线约 13 小时,50 条 v16 轨迹)。
- dev 槽 8→37:三份 -v16 配置一起改,07:50 生效,备份在 config-backup-20261014/before-restart-20261014/*.before-dev37。
- paths.config() 有 lru_cache(09-22 合并带进来的),每个进程只读一次配置。改 workers 只对新起的进程生效;已在排队的还按旧槽数等。scheduler.acquire 里「每轮重读 config」的注释已过时。
- 之前 8 槽被 agent 自设 3–12 小时的长编译占住,一夜 199 条 dev 命令排到超时(STAGE_EXECUTOR_EXIT),04–05 点比成功的还多。
- 底层问题:
- S600 板 /userdata 两次写满(01:31–03:25、06:50–06:56),05 的 07-board/08-eval 报「No space left on device」却记成 unknown,像 agent 的错。都自己恢复了。
- 根因:board_perf.py 的 close() 在失败时把板上会话目录「留作诊断」,从不删。日志里 10-13 起留了 9 个(S600 上 3 个:dedode.v2、gmflow、yolo11m.pose)。
- 再加上 solo.r50 一次评测输出 12 GB。
- 板卡密钥只在 Salty 容器里,主控上看不了板子剩余空间。
- 已修(a263374,10-15 09:41 热部署,阶段容器每次打包现读,不用重启):
- 清理已确认的失败会话照样删;
- 清理没确认的只留空目录和回执;
- 每个新会话先删 6 小时没人动的 eval-* 并在阶段 stderr 记「removed stale board sessions」;
- No space left on device → disk_full(瞬态)。
- 不能直接删「活」目录:board_guard 的 finally 先往会话目录写 guard-result.json,再更新 /userdata/bench/.board-inference.quarantine.json。目录没了就抛异常,标记卡在 PENDING,这块板以后的推理都会被拦。test_failed_guard_retains_evidence_without_erasing_live_directory 守的就是这个。
- 上线后核实(09:41–10:40):板上测试和评测全部 OK,没有磁盘满。3 块板的清扫共删了 31 个旧目录(S100P rdk-sandbox 18 个,两块 S600 各 10 和 3 个),比日志里看到的 9 个多,多出来的应该是容器被杀留下的。
- reward.py 只对 board_offline 免罚,disk_full 还没加;这是判分改动,跟导出那批一起等用户。
- 板上评测分批(f56ac2f)11:08 热部署后出事,11:45:38 回退(分支上 2b02417 撤销):
- harness/eval/<任务>.py 的 sha256 在建 run 时冻进 job.task_contract,每个阶段开头都核对(stages/base.py:261)。
- 改了 seg/mde/flow/feat/coco_extra.py 之后,这些任务的所有阶段都报 frozen task implementation changed。
- 板卡阶段在派发前失败、没有回执,会被判 BOARD_CLEANUP_UNCONFIRMED,整条轨迹作废。
- 损失三条:04 solov2.r50、05 deeplabv3plus.resnet50(自带图那条)、06 yolov8m.seg(阶段全失败后判 FAIL)。另有 3 条在跑的白白失败了几次阶段。没有编译失败,不占编译次数。
- 规则:任务评测文件不能直接热改;要么建新 run,要么把精确的「旧指纹 → 新指纹」写进 harness/eval/__init__.py 的 EQUIVALENT_SOURCES(只限结果完全等价的改写)。common.py、board.py、run.py、board_perf.py、errors.py、pipeline.py、adapters/ 不在指纹里。
- 另一个坑:板卡阶段派发前的任何 harness 异常都会被当成清理未确认,害死整条轨迹,应该写 not_started 回执。还没修。
- 断线暂停的位子(10-15 11:32 用户同意换回):
- 取消了 11:21 新开的 4 条。deeplabv3plus.resnet101、fcn.resnet50 11:33 续上,deeplabv3plus.resnet50 11:37 续上,efficientvit.seg.b1 还在等。
- 11:33 又有 2 个位子被新题抢了。根因是 pipeline.py:813:同一轮里有一条就绪,新题就会跟着进来。
- f191baf(_claimable:有暂停在等时这一轮只续跑;额度组 PAUSED/RECONCILING 一律算在等)11:44 已部署,collector 重启后生效。
- collector 重启会杀掉它管的在跑轨迹(配额管理在进程里),不能随手重启。
- deeplabv3plus.resnet101(05)11:34 PASS:第一条真自带图的通过。
- G3 mIoU 32.53→31.80,降 2.24%,门槛 5%;G2 0.986 没过但不是必选;板上 506 ms。
- 「暂停名额被抢」又发生:00:56–01:11 GLM 断线,05 停了 12 条。01:17 一起续跑,6 条因为额度还没恢复(RESUME_NOT_READY: WAITING_QUOTA)又被暂停,空出的位子给了 6 道新题。两条 efficientvit.seg.b1/b3 停了 7 小时还在等。修要改 collector、要重启。
- 离线归档:06 zoedepth.n kk2 的包 23:00–00:12 一直传不上(网络 body error),跳过了。
- Salty 上留着 327 个失败、94 个成功的 stage 作业没清(317 个在重启前)。不占 CPU,可能占个人空间。
- collector 无 traceback;VM 负载 15、内存剩 4G、盘 60%。
- 自主性:
- 4 条编译用了自己的东西,都过了 I/O 检查:
- maxvit.t 把 Einsum 改成 MatMul 的图;
- deeplabv3plus.r101 把 2560→512 的 1×1 卷积拆成 5 个绕编译器 bug;
- vit.h.14 自做校准集(两次)。
- 还没有一条走到结论。
- 12/50 写了产图脚本,9 条跑通。
- 速度门槛只在提示里:05 efficientvit.seg.b0 最终全 float16,板上 4.1 秒一帧、BPU 利用率 0.003%,照样 PASS。导出时按速度过滤还没做。
- 板卡派发前失败误判(383710c,10-15 12:20 热部署):
- base.Stage.run 本地执行完、board 池、非 SKIPPED、回执目录为空时,补一张 not_started(VERIFIED)回执。
- 依据:board_perf.bench 在第一条板上命令前就写 UNKNOWN 回执。控制端包装 Salty 的那层拿不到这个证明,不补。
- 待办总表(10-15 中午,按生效方式分):
- 热部署已完成:板上会话目录清扫、disk_full、dev 不可见评测集、dev 去重复上传、dev 37 槽、派发前误判。
- 要重启 collector:暂停名额修复 f191baf(已部署文件)。重启会断在跑轨迹,等计划窗口。
- ~~要新建 run:评测分批 f56ac2f~~ 15:55 已不建新 run 上线(6ab088d 逐对批准的等价改写,见 [[restart-20261015]])。
- 要新 agent 版本:SYSTEM.md 删「评测数据只读可见」;速度门槛(用户暂缓)。
- 外部:Clash 走洛杉矶导致断线(用户侧)。
- 遗留债:
- salty_remote.py:294 失败作业和目录永不清(327 个);
- s04 自带图大于 2 GB 的外部权重不哈希;
- paths.config 有 lru_cache,scheduler 注释过时;
- zoedepth.n 归档包上传失败;
- agent 在长 dev 编译上同步干等几小时;
- reward 里 disk_full 没免罚。
- 热部署前必查:
- 改的文件在不在 task_contract 指纹里(harness/eval/<任务>.py);
- 在不在常驻进程里(collector 不重载);
- VM 和 Salty 容器各跑一遍相关测试,base 和 new 对比。
**Why:** 用户要这套当 SFT 数据和以后 RSI 的底座:底层错误不能算到 agent 头上,速度兜底不能当通过。
**How to apply:**
- 下次重启要带上:
- 续跑优先于新认领;
- 额度没好时别把位子让出去。
- 清 Salty 旧作业要先问用户。板上残留目录由会话进入时的 6 小时清扫处理,用户 10-15 已同意。
相关:[[agent-autonomy-audit-20261014]] [[net-resilience-board-deadline-20261014]] [[selfheal-and-alert-20261012]]

View File

@ -0,0 +1,35 @@
---
name: pilot-glm-vs-qwen-20261022
description: "10-22 22:00 pilot started — removed the platform's model code, I/O contracts and strict rules in the prompt; GLM vs Qwen on 10 tasks x4; where everything is, how it's configured, what to watch"
metadata:
node_type: memory
type: project
originSessionId: 4ba58d30-63e6-44bf-ae6f-2d0b6ca5492e
modified: 2026-10-22T13:55:53.544Z
---
**Plan**: per the user's plan (stricter judging + removing help + I/O contracts + new exam), step 2 is done on salty-test 8fb9349 (deployed to bench-staging, **not production**). Then a pilot measures how far apart GLM and Qwen are.
**What the change does**
- The guard and jail no longer expose harness/adapters. bench dev only packs `harness/container_site` (it used to pack the whole harness/registry/scripts/export, including the evaluator and gates).
- New agent/io-contracts: at 8fb9349, 9 families / 71 models; a8fdb28 completes it to 16 files / all 139 adapter models (pose, depth, flow, features, DETR/Mask2Former/SOLO, etc.). Each output is defined as "the output of some official module" and listed in index.json; rollout.prepare appends the contract to the end of the prompt. torchvision/ultralytics models have no adapter and so no contract.
- SYSTEM.md lists where official sources, weights and venvs live (/home/ming01.wang/bench-cache/...), and the compile.yaml template was replaced with "facts that differ from the docs".
- e2e.md states two strict rules (whole-class int16/float fallback, board latency > 1.5x default int8). **The judging code is not stricter yet**; strict judging is applied offline.
- agent/VERSION is 24.
- Pitfall: speed_ref.py exports inside bench dev with the platform export tool. The new code no longer packs it, so speed references must be computed with production code (this time: from the production directory, `speed_ref.py r20260929-06 --only ...`).
**Pilot**
- Batches: r20261022-pg (GLM-5.3, new account, key PILOT_GLM_API_KEY in bench-staging/.env.local, group glm-coding-pilot-1022, concurrency 10) and r20261022-pq (Qwen, group qwen38-nvfp4-pilot-1022, concurrency 6).
- Tasks: the same 10 nash-m tasks, k=4: atss.r50.fpn, yolox.s, ssdlite320, rtmdet.s, xfeat, simplebaseline.r101, rtmpose.s, segformer.b3, pspnet.resnet50, efficientvit.b1. job.json copied from production 06.
- Configs: configs/mini/pilot-glm.yaml and pilot-qwen.yaml, copied from 06 tok64m and identical except the endpoint and quota group. pools.agent.workers is 52 (production keeps 40, so after the pilot fills the global count, 05/06 do not refill — the user chose "pilot first"). Content review is off.
- Scripts and pids: configs/pilot-20261022/ (start.sh, mkruns.py, mkconfig.py, glm.pid, qwen.pid, speedref.pid, staging-code-before.tgz). Logs: logs/collect-pilot-glm.log, collect-pilot-qwen.log, pilot-speedref-20261022.log.
- One collector runs at most 1 rollout per task at a time (claim_rollout), so 10 tasks means at most 10 lanes per model.
**Why:** The user wants to know whether the GLM–Qwen gap widens once the platform no longer does the work for the agent, and whether this is closer to real use.
**How to apply:** Judge results by the strict rules offline. Stopping: kill the two collector pids in configs/pilot-20261022 (staging, no approval needed). Production goes back to 40 lanes automatically. Related: [[strict-rejudge-37-20261022]] [[hide-adapters-impact-20261022]] [[staging-collector-20261019]]
**10-23 pose keypoint-shift rule removed** (user approved, e0c224f, staging only): the 2 px shift (all 17 joints, raw pixels, not scale-normalized; hand-set on 9-15) was dropped from the G3 gate and is now only recorded; the pose contracts no longer mention it. job.json freezes gates, so the pilot pose-task job.json files were edited too (backups in configs/pilot-20261022/jobjson-before-shift) and rejudged with rejudge-shift.py. **Production 06/04 job.json files still carry the rule**, and changing them needs approval.
Tally at 07:56: GLM 15 PASS / 1 FAIL (rtmdet.s), Qwen 7 PASS / 2 FAIL (yolox.s, rtmpose.s with no HBM delivered) / 1 BUDGET_EXHAUSTED (efficientvit.b1, 311+ turns).
**10-24 00:30 contract checksum incident**: the coco_extra.py change in 8a1ee24 (10-23 01:35, deployed to staging) broke the task_contract checksum frozen into the pilot pose batches, so their formal stages were all refused. Qwen rtmpose.s kk0 got a FAIL that was not its fault (it never got a formal stage), and the 4 pose rollouts still in flight hit a pile of stage failures too. ff3c892 reverts it (sha 505d37 is the approved equivalent version; the shift gate had already been removed in e0c224f, so nothing is lost). **Lesson**: editing any harness/eval/*.py breaks every running batch; either add the pair to EQUIVALENT_SOURCES or open a new batch. bpu_util in board measurements is unreliable for small models (0.0–0.01); speed and BPU usage are still not hard gates in code.
Tally at 10-24 00:13: GLM 20 PASS / rtmdet.s FAIL / efficientvit.b1 DEADLINE; Qwen 8 PASS / yolox.s FAIL / rtmdet.s and efficientvit.b1 BUDGET / rtmpose.s (infra, not counted). Of the hard tasks only yolox.s separates them (GLM: 30 int16 nodes + asymmetric + max calibration, 3 compiles, mAP down 1.25%).

View File

@ -0,0 +1,15 @@
---
name: plain-language-no-jargon
description: 汇报要用大白话,不要用英文行话或比喻性术语(金丝雀、canary 等)
metadata:
type: feedback
---
用户原话:「你要让我看的话,那你就说点人话,好不好?全是一些黑话,什么金丝雀,什么鬼?你说的那些我完全听不懂。」
**Why:** 用户是项目负责人,关心的是「能不能开始收集数据了」这类结果,不是实现术语。
行话让他无法判断进展,等于汇报无效。同时他对长篇分析而不出结果非常不满。
**How to apply:** 用「先拿一个试,确认好用了再动其他的」代替「金丝雀」;用「本机硬盘 / 网盘」代替
「local disk / JuiceFS」。先给结论和数字,再给理由。能用一张小表说清就别写段落。
承认没做好的地方要直接说,不要辩解。参见 [[prefer-subtraction-over-addition]]。

View File

@ -0,0 +1,32 @@
---
name: poweroff-20261016
description: 10-16 19:29 Mac mini 断电前停机(取消 36 条、停 Salty 35 个、limactl stop)→ 20:57 开机后补号、原命令/环境拉起 5 个进程、垃圾已清;暂停轨迹跨开机续不了要一起取消;现成脚本和坑
metadata:
node_type: memory
type: project
originSessionId: c8e679af-e7a3-4129-a0e4-e1821fa37ce1
modified: 2026-10-16T13:01:01.011Z
---
10-16 19:29 用户要给 Mac mini 断电;20:50 开机后让我把 VM、进程、任务按原进度拉起并清垃圾。
**停(19:29–19:31)**:VM 里 /mnt/data/ming01.wang/configs/poweroff-20261016/stop.sh——存 3 个 collector + offload + speed_ref 的 environ/cmdline/日志/cwd → SIGTERM → 用 restart-20261016/targets.py 选出 36 条立即取消(不等上板/评测)→ 34 CANCELLED、2 INFRA_ERROR;04 的 5 条可续跑暂停保留。collector 自己退出、没卡导出。Salty 上 bench-* running/pending 35 个 `salty stop`。`limactl stop bench` 正常关机。
**起(20:57)**:同目录 start.sh——挪走旧开机的 lease → requeue.py 补号 36 → withenv 按存档原命令拉起 05/06/04/offload/speed_ref(env 自带 BENCH_CONFIG:04 qwen-s100p-r04-v22、05 s600-r05-v22c、06 s100p-r06-v22)。几秒内就开始领题,21:00 是 04 5/5(+5 暂停)、05 16/16、06 16/16。
**新踩的坑(下次停/起照做)**
- Mac mini 开机时 launchd cc.d-robotics.bench-controller.vm(~/work/controller/start-existing-bench-vm.py,只 RunAtLoad)会自动把 VM 拉起,但不起任何进程。
- 取消正在跑 dev 命令的轨迹会留下 state/locks/dev-*.lease.json(这次 24 个)。_lease_settled 只认 DONE+VERIFIED,所以不会自动释放、会一直占 dev 槽。重启后要把 holder.boot_id 不是本次开机的 lease 挪走(start.sh 里有)。
- speed_ref 被中断的题会留下 runs/zz-speedref/<job>/rollouts/00/stages/ref/salty/bundle.tar,再跑时 FileExistsError;异常路径不写 FAILED,所以删掉 stages/ref 和 _dev-sync.* 就能重算。
- offload 一启动就会把 04/05/06 停掉的 Salty 作业连目录一起回收(35 个里回收了 31 个);speed_ref 和导出的作业不归它管,要手工 `salty rm` + `salty storage rm -r personal:/<名字>`(cleanup.sh)。
**更正(10-16 22:45 体检发现):可续跑的暂停轨迹跨开机续不了**
- 断电时保留的 04 两条暂停(dpt.hybrid #5、simplebaseline.r50 #5)开机后被标成 OWNERSHIP_UNKNOWN 隔离,健康检查每 10 分钟报"暂停 N 分钟没恢复"。
- 原因:execution.process_status 对不是本次开机的进程一律返回 UNKNOWN(同一主机名也一样),reconcile 就隔离;Execution.resume 遇到开机变了直接拒(BOOT_CHANGED_RECONCILE_REQUIRED),deadline_monotonic 是按开机计时的,跨开机也没意义。
- 22:48 用 fix-stuck-04.sh 取消并补号;取消要等清理旧开机的子进程到 cleanup_deadline_s(1800 秒)才返回。
- 以后断电/重启 VM:可续跑的暂停也要一起取消(targets.py 里 KEEP 的那些),否则开机后会卡死。代码上可以让"同主机、不同开机"的进程算已死,但要重启 collector 才生效,等下次统一上线。
**清理(用户要求)**:Salty 剩下 4 个作业和目录、两道 speed_ref 的残留、挪走的 24 个 lease、含密钥的 env-* 存档、jobs.sqlite 备份和临时文件都删了;目录里只留脚本、cmd/log/cwd、名单。
**Why:** 10-12 用户直接重启没停 VM,37 条 execution.json 写坏;这次先取消再关 VM,文件和两个 sqlite 都完好(quick_check ok)。
**How to apply:** 再断电就复制这个目录的 stop.sh/start.sh/cleanup.sh 改 PID 和名单用;见 [[bench-restart-hazards]] [[mini-salty-controller-20261009]]。

View File

@ -0,0 +1,17 @@
---
name: prefer-subtraction-over-addition
description: 修复问题时优先删代码/消除不一致,而不是新增扩展点、配置项或抽象层
metadata:
type: feedback
---
用户明确要求:「不一定只关注于做加法,而且要做减法。其实更主要的是要做减法,我不喜欢就是你来不来就做加法。」
同时强调鲁棒性、优雅性、简洁性。
**Why:** 给一个本不该存在的默认值打补丁(例如新增只有一个子类使用的钩子),是在掩盖问题而不是消除它;
代码库会因此越积越重。2026-09-18 修 JuiceFS 编译卡死时,第一版方案是给 `Stage` 加 `run_cwd()` 钩子,
被用户否掉;改成删掉 `cwd=stage_dir` 这个从没人复核过的默认值,净 -10 行、0 新增抽象,反而更对。
**How to apply:** 提方案前先问「能不能靠删掉某个东西来修」。诚实报告增删行数与新增抽象数——用户会核对。
把顺带发现的死代码、永真守卫、过时配置一并清掉,但不要让范围膨胀到另一个 bug 上。
参见 [[plain-language-no-jargon]]。

View File

@ -0,0 +1,16 @@
---
name: prod-pose-shift-rejudge-20261023
description: 10-23 removed the 2 px keypoint shift rule from production 04/06 pose job.json (user approved); platform rejudge only turned 2 into PASS — rollouts whose HBM was offloaded come out UNVERIFIED on rejudge and were restored
metadata:
type: project
---
On 10-23 the user approved backing up production 04/06 pose-task job.json, removing `keypoint_mean_shift_px_max: 2`, and rejudging the pose rollouts that failed or were UNVERIFIED because of it. Script: configs/prodshift.py (list only by default, `--apply` to execute). Backups (job.json + original verdict.json) and the restore script are in configs/hotfix-20261023-poseshift*.
- 28 candidates: 16 have a directory on the controller, 12 were offloaded to Salty entirely (not touched).
- job.json is 444 read-only (frozen at batch creation); the script grants write temporarily and restores 444 afterwards. All 20 job.json files no longer have the rule.
- **Pitfall**: `verify_rollout` requires the current HBM to be present. Most old rollouts' HBM is already offloaded, so a rejudge gives G1/G3 "current HBM missing" → UNVERIFIED. 14 of them were restored to their original verdict.json and DB state/verdict.
- Real result: only 06 rtmpose.tiny kk3 and rtmpose.x kk3 (HBM still local) changed UNVERIFIED → PASS.
- The other 26 (14 restored + 12 offloaded) would mostly pass on AP alone (AP drop roughly 0.3–2.1%), but that needs either a rejudge that does not require the HBM or an offline correction of the verdict from the recorded measurements — a separate decision for the user.
**Why:** The platform rejudge path assumes artifacts are still local, which no longer holds after offload.
**How to apply:** Before rejudging production rollouts, check that `artifacts/*.hbm` is present; for offloaded ones, back up and be ready to restore. Related: [[pilot-glm-vs-qwen-20261022]] [[mini-salty-controller-20261009]]

View File

@ -0,0 +1,19 @@
---
name: prod-switch-20261020
description: 10-20 15:05 生产 04/05/06 从 6c7b19f 直接换到 a6e2ce0(不排空、新代码接管):36 条在跑全部接上、只丢 1 条(板上评测途中);部署包/备份/启动脚本位置;遗留的暂停和隔离
metadata:
type: project
---
10-20 用户决定:"生产全部停掉…上最新的,全部开启",选**不取消、新代码直接接管**、原批次 04/05/06、保留测试 collector。
- 先在测试 collector 演练旧→新接管(14:57–15:04):旧代码跑出 2 条后 kill -9、换新代码,2 条 RESUME 并在 6 分钟里从 6/4 轮推进到 21/19 轮。旧代码不认新代码交接留下的轨迹(会隔离),所以**生产永远不能回滚到旧代码而不排空**。
- 15:05:29 SIGTERM offload/speed_ref,15:05:32 kill -9 三个旧 collector(旧代码没有 SIGUSR1 交接),部署 40 个文件(md5 核对),15:05:48 用原命令/工作目录/环境起新进程,配置换成 `*-salty024.yaml`(只改 execution.salty_remote.salty → /mnt/data/ming01.wang/tools/salty-0.2.4,SHA256 已核)。
- 结果:04 接上 4、05 接上 16、06 接上 17;**只丢 1 条**:05 seg--bisenetv1.r18#01 当时在跑 08-eval(上板),没有板端干净回执,按设计判 LOST 并隔离板卡。15:22 时 36 条在跑全部在推进,04 已出 1 条 PASS。
- 位置:/mnt/data/ming01.wang/configs/deploy-20261020/(700):每个进程的 cmdline/cwd/environ(含密钥,用完要删)、prod-before-deploy.tar(原 40 个文件)、deploy.tar/deploy.md5、launch.py(按存档原样重启单个进程)、before.txt(切换前 64 条在跑/暂停)。新 pid 在各子目录 new-pid。
- 遗留:06 有 16 条 OWNERSHIP_UNKNOWN 隔离(10-17 停 06 时暂停、跨了 10-18 的 VM 重启,接不回来);04 有 9 条老暂停(6 条 STREAM_IDLE_TIMEOUT、2 条等额度、1 条结果不明,部分已 RESUME_BUDGET_EXHAUSTED)。都不占在跑名额,是否取消补号待用户定。
- 切换后发现板卡租约泄漏:07-board 撞阶段时限被杀后租约不释放、要等整条轨迹结束(05 两块 S600 板锁了 11 小时,04 板卡 0 也是)。salty-test f75930e 修了(换文件即生效),15:22 上测试,**15:26:26 热修生产**(用户批准,只换 harness/scheduler.py,备份 configs/hotfix-20261020/scheduler.py.orig;test_lease_recovery.py 未放生产),salty-prod 快进到 aad8d5b。一小时内板卡 4 被释放再用、板卡 0 被重新申请;板卡 8 已符合释放条件,只是还没人轮到它。
- 测速进程的 FileExistsError(runs/zz-speedref/.../salty/)从 10-16 起就有,1700 多次,未处理。
**Why:** 生产旧代码一重启就断轨迹、还有多处已在测试修好的问题。
**How to apply:** 以后上生产按 [[branch-workflow-20261020]]:salty-prod 快进到测试验证过的提交,新代码已支持 SIGUSR1 交接,不必再 kill -9。相关 [[bench-restart-hazards]] [[staging-collector-20261019]]

View File

@ -0,0 +1,13 @@
---
name: prod-upgrade-plan-20261104
description: 11-04 15:25 已上生产 5 个恢复类提交(71873e0 10d5546 61d8f54 6aabf56 68028a2),不上门槛改动;不等 Qwen 跑完,交接重启,16 条全接上
metadata:
type: project
---
11-04 15:15 核对:origin/salty-test 比 salty-prod 多 12 个代码提交,其中 ec04748、1c57d9a 改 G1/G4 判分和提示词(会改数据口径),be22235、4f27d61、d9a861d 生产已有等价提交。候选 = salty-prod + 5 个恢复类提交,cherry-pick 无冲突,改 7 个代码文件、不改数据库结构和判分。虚拟机比分支多的热修:execution.py(等于 10d5546)、health_check.py、boards.yaml 注释,上线时要把后两个提交回分支。
测试(虚拟机,同一批模块基准 vs 候选):两边都只有 test_busy_total_timeout 和 test_harness_pause_resume 两项失败、错误相同;测全树要带 config.yaml,真 agent 的测试要 BENCH_TEST_NODE=<runtime>/bin/node 和 agent/node_modules 软链,否则全部跳过。
Qwen 全量现状:84 条没结束,最近 24 小时结束 20 条,估计 11-08 前后跑完;它用不上这些修复(9189 次板上调用 0 次清理失败、额度组没卡过)。11-02 给它换代时 7 条在跑全部接上。
**How to apply:** 文件替换要和重启同时:步骤进程会立刻读新文件。门槛改动 ec04748、1c57d9a 仍只在 salty-test。相关 [[branch-workflow-20261020]] [[bench-restart-hazards]] [[watchdog-mac-mini-20261104]] [[infra-fixes-20261028]]
**11-04 15:25 用户定"现在就换",已上生产**:7 个代码文件换成 salty-prod + 5 个恢复提交(salty-prod bf5b17b,含把虚拟机上的 health_check、boards.yaml 提交回分支)。流程:暂停 Watchdog → 存启动参数、旧文件 before.tgz、账本 quota-before.sqlite.gz → 确认没有轨迹占板 → SIGUSR1(5 秒退出)→ 换文件 → 原样拉起,全程 20 秒;configs/upgrade-20261104/(deploy.sh、deploy.log、running-at-handover.txt、patch)。结果:16 条全部 RESUME、ACTIVE,4 分钟 18 次 200,无报错;测试批次不受影响。跳过了模拟故障,这些修复的故障路径在真实环境仍没验证过。回退:tar xzf before.tgz -C bench,再 SIGUSR1 + restart_collector。

View File

@ -0,0 +1,23 @@
---
name: q04-resume-cleanup-20261021
description: "10-21 after the Qwen service redeploy, 04's 17 paused rollouts were sorted: 7 given one more resume, 7 cancelled, 3 empty records abandoned; the 30-minute cancel blocking only happens when there are unknown remote operations"
metadata:
node_type: memory
type: project
originSessionId: c8b70eef-0bf6-4db8-bdd3-c780fb4e9b5e
modified: 2026-10-21T06:26:15.439Z
---
10-21 14:20: after the Qwen service was redeployed, I sorted 04's 17 PAUSED_INFRA rollouts one by one. Scripts are configs/hotfix-20261020/q04-apply.py and q04-cancel.sh; backups are in q04-1021/ (jobs/quota sqlite plus 7 execution.json).
- **Resume budget used up**: Qwen stalls (STREAM_IDLE_TIMEOUT / REQUEST_OUTCOME_UNKNOWN) count against the budget. The ledger column `executions.resumes` and `auto_resume_count` in execution.json are both checked against max_auto_resumes=3, so the rollouts never resume on their own.
- **Remaining time if resumed** = started_at + D + paused_s + min(now − paused_at, D − paused_s) − now, with D=24h.
- **7 with 9–22 h left**: lowered both counters to 2 (execution.json first, then the ledger), and the collector picked them up automatically. Rollouts already paused take priority over new tasks.
- **7 with under 3.2 h left, or already out of time**: cancelled with `execution cancel`, run in parallel, about 4 seconds each.
- **Why**: the 30-minute block per cancel on 10-21 morning only applies to rollouts with OPERATION_STATE_UNKNOWN.
- **3 kk0 records without directories** (iseg yolo11s/yolo11x/yolov8m.seg, left from 10-01): set to ABANDONED. They are not in 04's --job list either.
- **Lane count**: the agent pool is global, 40 workers. 05 has 16, 06 has 16, staging 4, so 04 only gets 4 lanes; the 5th one is taken by staging.
- **Outcome (10-22 02:12)**: of the 7 resumed, 5 PASS; rtmdet.m FAIL (mAP down 21%); yolox.l used its 400 turns (mAP 0). Of the cancelled ones requeued under a new kk, fsaf and fast.scnn PASS; mspn UNVERIFIED (model output non-finite). From the 10-21 13:00 redeploy to 10-22 02:00, 04 had 0 stall pauses.
**Why:** The Qwen stalls were the service's fault, but the resume budget only counts whether a request might have been sent, so it can't tell the difference.
**How to apply:** If this happens again, use the same scripts: lower the counters for rollouts with enough time left and cancel the rest. If 04 needs a full 5 lanes, stop staging or raise pools.agent.workers (that needs a restart, see [[bench-restart-hazards]]). Related: [[qwen-nvfp4-service-speed-20261012]] [[reboot-20261021]]

View File

@ -0,0 +1,74 @@
---
name: quota-unknown-autorecover-fix
description: 请求不明自动恢复(2f54d40)+板卡死锁自动释放(80a8e24);04/05/06 在跑;板卡核对/释放记录位置
metadata:
node_type: memory
type: project
originSessionId: 64b486b6-4970-404f-9b9a-46e9ca4808d3
modified: 2026-10-03T14:30:37.255Z
---
2026-10-03 已推送到 gitea `production/s100p-infra-fix-20260928`:`2eb29ca`(现场原有的 recovery 隔离修改)、
`2f54d40`(请求结果不明时自动恢复 + 单条任务只隔离、采集器不退出)。
服务器上没有 git 身份和推送凭证:提交时用 `-c user.name=ming01.wang -c user.email=ming01.wang@d-robotics.cc`,
推送时在服务器上打 bundle,传回 Mac 再推(Mac 有 gitea 凭证)。
- 06:21:06 用新代码重启,运行正常。
- 04/05:21:5x 发了 SIGTERM 排空,由 `/home/ming01.wang/bench-relaunch-20261003/relaunch.sh` 等旧进程退出后在原批次上重启
(新日志 `resume-glm-20261002-104649/restored-<run>-fix-20261003.log`)。
之后 `bench-relaunch-cleanup.sh` 删除重启脚本目录,结果写入 `/home/ming01.wang/bench-relaunch-20261003.result`。
**下次先看这个 .result 文件,确认 04/05 已经重启。**
- 04/05 当时实际写日志的位置是 `/home/ming01.wang/sampling-recovery-20261003-1125/{qwen,s600}.log`,
而不是 resume-glm 目录里的旧日志。
- UniMatch r20260929-06#00:经人工核对(583 个进程全部已死,板端评估回执 VERIFIED),数据库结束为 INFRA_ERROR,
释放了 agent-7、cpu-4、cpu-6 三个槽位;核对记录在 rollout 目录的 `operator-release.json`。
坑:经 ssh 单引号传 heredoc 脚本时,脚本里的引号和中文会出问题,写成文件 scp 过去再执行;
`pkill -f`、`pgrep -f` 会匹配到自己所在的 `bash -c`,等进程退出时按 PID 用 `kill -0`。
网盘上 `git status --ignored` 慢到不可用。重启要点见 [[bench-restart-hazards]]。
2026-10-04 00:2x–00:48 进展:按用户要求取消了 04/05 剩余任务。取消后旧采集器卡在退出前的数据导出上,
确认"运行中"记录为 0 条后用 kill -9 结束。05 于 00:21 重启。04 缺 `QWEN_EVAL_API_KEY`,用户提供后已写入
`.env.local`,00:39 重启。Qwen 账户自动解除暂停,试探请求成功,进入恢复中。
并发:06、05 各 8 路(GLM-5.3),04 为 5 路(Qwen3.8-27B),全局 Agent 槽位 24。
04 的 RetinaNet-R50 是自己的请求结果不明(INCOMPLETE_GENERATION),按设计永远停在暂停状态。
2026-10-04 08:00 板卡锁死事故:8 块可用板卡全部被已结束任务占着(占用进程已死、清理回执缺失),
从 10-03 23:19 起没有任务能上板,排队满 4 小时报 QUEUE_DEADLINE_EXCEEDED。逐块核对(进程死、任务已结束、板上只有 sshd)后释放,
核对记录在各 rollout 目录 `operator-release-board-<slot>.json`。修复 `80a8e24` 已推送:`scheduler.reconcile_leases` 遇到这种情况时
会用 ssh 检查板卡,确认空闲后自动释放,并写入 `board-release-<slot>.json`。
旧采集器没有重启;临时用 `~/board-reconcile-bridge.sh` 每 10 分钟跑一次,三个旧 PID 都退出后它自行退出并删除自身,日志写到 `~/bench-board-reconcile-bridge.log`。
板卡 ssh 时断时连的原因:板端 sshd 达到 MaxStartups 上限("3 of 3-10 startups")。另外 `~/.ssh/known_hosts` 里 S600 的主机指纹已过期,
连板卡要用密钥目录下的 known_hosts。
2026-10-04 09:00 板卡链路三处根因修复(均已推送,上板步骤每次都是新进程,无需重启采集器即生效):
- `f315496` 板端 `/userdata/bench/.board-inference.quarantine.json`:guard 被杀后这个标记会永久留在板上,之后每次评估都返回 78
(40009 因此被锁 1.5 天)。现在若板上已没有任何进程带着该次评估的标识,guard 会自动清掉它。
- `f61d2ef` ssh 在登录前就被断开(kex_exchange_identification)时,`board_perf.run`/`guarded_run` 最多重放两次。
- 板端 sshd 的 MaxStartups 改为 32:30:100(09-24 改过 40009/40007,本次补齐 40011/40015/40016 和 BOARD_HOST)。
原因是公网端口常年挂着 15–35 个扫描器的未登录连接。每块板的备份和记录在 `/root/bench-ssh-recovery-20261004/`。
- 不需要 S600 密码;用 harness 的密钥,加上密钥目录下的 known_hosts 即可。`~/.ssh/known_hosts` 里的旧指纹 harness 不会读取,不要拿它判断板卡状态。
- 06 那 3 条暂停(yolov8l.seg、两个 DA-v2-large):阶段其实已结束,是回执校验误判。修复 `44f643d` 已推送:
嵌套进程组校验和 owned_processes 统一走 `execution.scope_cleaned`;排队超时、从未拿到板卡的上板阶段不再要求板卡回执。
这 3 条用新代码补登记阶段结果后已结算为 CANCELLED(清理确认),释放 agent-12/18/20。
注意:隔离状态是单向的,处于"清理未确认"的暂停任务只能结算,不能恢复。
2026-10-04 10:03 用户要求立即重启让修复全部生效:取消了正在跑的 21 条(结案为 CANCELLED,原因 USER_APPROVED_IMMEDIATE_RESTART_20261004);三个采集器在原批次上重启,06 于 10:12、04 于 10:17、05 于 10:23 重启(运行的是 44f643d),10:38 恢复满并发 5+8+8。过渡用的 bridge 脚本已停止并删除。
2026-10-04 `4332f43`:编译次数成为每条轨迹的主预算,最多 3 次;`106a96a` 应用户要求改为 5 次(VERSION 14)(`stagerun.MAX_COMPILE_ATTEMPTS`,改它要同步改 e2e.md)。
计数来源是 stages 表里 05-compile 中 lane!='queued' 的行,续跑不会清零。第 4 次提交编译直接返回 COMPILE_BUDGET_EXHAUSTED。stagerun 每个阶段都是新进程,所以不用重启就已生效;提示词只对新开始的轨迹生效。
历史数据:142 条 PASS 中有 19 条(13%)用了 4 次以上编译;如果上限设成 4,只损失 4 条(约 3%)。
提示词模板、SYSTEM.md、VERSION 每次准备新任务时都从磁盘读取,stagerun 每个阶段都是新进程,所以改这几处不用重启采集器;只有改采集器进程里的 Python 代码才需要重启。
2026-10-08 `ea0335b`:04 的 Qwen 账户从 10-07 08:26 起停在 PAUSED 达 15 小时。原因是自动作废那个结果不明的请求时,账户里另有一个正常请求还在进行,于是 probe_allowed=False,之后再也没人检查。
现在作废、确认结束、reconcile 三处共用 `_probe_if_settled`:只要账户里没有未结束的请求,就放行一次试探。
00:00 在原批次上重启(取消了 16 条正在跑的任务,04 暂停的 5 条从检查点续跑)。00:15 又出现一次结果不明,账户按新逻辑自动恢复。
新采集器启动耗时变长:05 约 25 分钟,06 约 38 分钟。
2026-10-08 两处系统终止修复(已推送):
- `5617f57`:bash 没写超时或超时超过上限时,pi_session.js 在执行前自动设成"系统上限减 60 秒"(约 14 分钟),超时只让这一条命令失败,轨迹继续;落盘的模型调用参数不变。SYSTEM.md 加了说明(VERSION 15)。每条轨迹都会新起 pi 进程,所以不用重启就生效,04 也已生效。
- `e2bdd24`:之前说的"GLM 回复不完整"68 条是误判。其中 57 条是本地配额代理返回 413 REQUEST_EXCEEDS_INTERNAL_TPM:代理按字节数估算 token(约是真实值的 3.7 倍),单次请求超过 tpm 就直接拒绝,所以上下文一过约 13.5 万 token 轨迹就死;另外 11 条是重启期间代理不可用。05/06 两个 GLM 组的 tpm 从 50 万调到 200 万(和 Qwen 组一样)。生产配置(/home/ming01.wang/s100p-glm-8way-20260928-2124/s100p.yaml、s600.yaml)、账本 quota_groups.policy 和仓库 config.yaml 默认值都已同步修改。
注意:采集器运行期间改配置文件会触发 RUNTIME_CONFIG_CHANGED;账本里存的策略和配置不一致会触发 QUOTA_POLICY_CONFLICT。所以必须先停采集器,再同时改配置和账本。
- 07:38 按老规矩只重启了 05/06:取消 16 条(原因 USER_APPROVED_RESTART_20261008_GLM_TPM,其中 3 条已在校验,按实际结果结案)。06 于 07:46、05 于 07:51 在原批次上重启;04 没有动。
2026-10-08 `10b070e` 改了"连坐"规则(pipeline._collection_snapshot 的 SQL):同一任务里有一条被系统原因终止(命令超时、基础设施错误、取消、丢失、暂停后过期),不再挡住其余排队的轨迹。仍然会挡的只有两种:预算用完(BUDGET_EXHAUSTED),以及 verdict.timeout_reason=EXECUTION_DEADLINE_EXCEEDED(真正干满 24 小时)。正在跑或暂停中的同伴仍然一条一条排。用户确认的分类:系统原因 379 条放开,7 条继续挡。"导出必然失败"这类 agent 自己判 FAIL 的,本来就不挡,用户决定先不加规则。改之前被挡 1107 条(04 267、05 409、06 431),改后放出 1086 条。只重启了 06(09:58,取消 8 条);04/05 等下次重启时生效。重启时有一个取消命令卡在网盘 IO 上 20 分钟,轨迹其实早已结束,kill 掉之后脚本继续。

View File

@ -0,0 +1,29 @@
---
name: qwen-ability-failures-20261013
description: 训练前 Qwen 真正因能力做不出的题清单与原因(对照 GLM 怎么做成的);训练前后对比应盯这组题,而不是已通过的题
metadata:
node_type: memory
type: project
originSessionId: 6c848f33-e8d9-4981-ade2-dc77987005d7
modified: 2026-10-13T03:09:29.425Z
---
2026-10-13 用户明确:对比训练前后,要看的是**训练前 Qwen 因模型能力没通过的题**,已通过的题看不出提升。
**10-14 12:30 更新:能力失败共 6 道**(34/37 有结果、过 28;系统失败不计,depth.anything.v1.small 的 FAIL 是 06-hbm 超时,已剔除)。新增三道:
- retinanet.r50.fpn(k4,3 次编译):板上 mAP 达标(+0.3%),G1 hb_verifier 余弦 0.66<0.99(P6/P7 头)。想调校准时把 per_channel/node_config/calibration_type 写进 compiler_parameters、自造 calib/quantization 段,stageworker.snapshot_config 白名单拒收(报错只给段名),Qwen 误判"平台不让改校准"。GLM-06 过 1。
- simplebaseline.r50(k4,5 次编译):逐步把骨干改 int16,oks_ap 只掉 0.7%,但附加约束 keypoint_mean_shift_px_max=2 实测 2.33。GLM-06 过 1 败 1。
- efficientvit.seg.b1(k3,5 次编译):int8 mIoU 5.1,全 int16 24.7(要 ≥29.1);Qwen 归因板端运行时、未验证。GLM-06 过 2,各 2 次编译。
共同短板第三条:把自己的问题归到平台上。
**明确能力失败(verdict FAIL、系统正常)**:
- mobilenet.v3.small(04 k1,5 次编译用完,板端 top1 2%):默认 int8 → verifier 0.983;之后尾部 int16 更差、尾部 run_on_cpu 无效且板端输出坏掉;第 4、5 次把 `activation.asymmetric` 等写成 hmct 不认的格式直接崩溃,白烧两次。全程 0 次本地试验。GLM-06 三条全过:k0 本地做了 28 次 hmct/ORT 试验找敏感节点,9 个节点 int16 后过(4 次编译);k1 本地试出全 int16 后 2 次过(全 int16 是验证器漏洞,见 [[verifier-audit-20261012]])。
- solov2.r50(04 k0,10-07,1 次编译、mask_ap 掉 7.4% 就交失败;会话没迁过来,看不到为何停)。GLM-06 k0:首编掉 10.1%,本地 9 次试验定位 head/neck 里 GroupNorm 分解链,neck+heads int16 后掉 2.0% 过(2 次编译)。
- yolov8n.seg(04 k1,5 次编译,mask_ap 掉 21.6%):Qwen 正确定位到 proto/mask 分支,但 int16 混合更差、run_on_cpu 被 HzSwish 转换挡住。GLM 也从没过过——是老师也做不到的上限题。
**很可能是能力问题(10-08 前 24 小时到期时精度还差很远,04 旧轨迹)**:YOLO 检测一族 det--yolov8n(掉 42%)、yolov8s(39%)、yolov5s(40%)、yolo11x(38%)、yolo11n(6 次编译仍掉 5.6%);flow--sea.raft 崩坏(GLM 也全败)。convnext.base 旧轨迹掉 9.6% 但后来过了,不算。其余 04 的 DEADLINE_EXCEEDED 大多 0–3 次编译、没有精度证据,多半是当时系统慢。
**能力差距的具体表现**:难题上 GLM 先在自己 workspace 里用 hmct API / onnxruntime 本地试验选参数,再花正式编译;Qwen 直接拿正式编译次数去猜,还会写错配置格式。全体会话里"做过本地试验"的比例两边差不多(Qwen 14/38、GLM 32/97),差别只出现在难题上。
**Why:** SFT 用 GLM 轨迹,能学到的正是"先本地诊断再编译、写对配置"这类做法;训练后 Qwen 在这组题上通过、或编译次数减少,才说明训练有效。
**How to apply:** 训练前后对比报告以这组题为主;老师也做不到的(yolov8n.seg、sea.raft)单列为上限题。用户要扩题组时,把"很可能"那几道 YOLO 检测题给训练前 Qwen 各补跑 2 条确认。相关:[[qwen-sft-benchmark]] [[verifier-audit-20261012]]

View File

@ -0,0 +1,31 @@
---
name: qwen-all-20261030
description: 10-30 18:02 新开 Qwen 全量批次 r20261030-qwen-all(204 道 S100P 题 ×1、7 路、不进训练数据);正式对照两批已跑完;报警脚本换批次;当天报警里 05 那 5 条暂停的原因
metadata:
node_type: memory
type: project
originSessionId: 8c6edbae-0ae8-4f66-83c4-3678c3b7c561
modified: 2026-11-06T06:33:45.141Z
---
用户 10-30 要"新开一个专门针对 Qwen 的,直接看看有多少"——Qwen 在全部模型上能过多少。
- **批次** r20261030-qwen-all:生产 06 的 209 道 S100P 题去掉 10-12 撤出的 5 个(depthpro、metric3d.v1.convnext.large、metric3dv2.vit.giant2/large/small)= 204 题 ×k=1;job.json 拷 06、G1 require_bpu_compute 一律 True(06 有 20 题早于这道门槛,formal-qwen 也这么做);G4 速度基准 06 的 job.json 里本来就有。内容审核关(Qwen 轨迹只做基准、不进 SFT,见 [[qwen-sft-benchmark]])。
- **配置** configs/mini/qwen-all-1030.yaml:生产 06 当前配置(s100p-r06-v22-rekey1022-tok64m-salty024-w48,全局 48 名额)只换 teacher 地址为 Qwen NVFP4 服务、新额度组 qwen38-nvfp4-all-1030(照 formal-qwen 组规则,max_concurrency 7)。没复用 formal 组:组规则存在账本里,改并发会 QUOTA_POLICY_CONFLICT。
- **脚本/进程**:configs/qwen-all-20261030/(mkconfig.py、mkruns.py、start.sh、r06.environ.bin 是 06 的环境、qwen.pid=2584476),日志 logs/collect-qwen-all-1030.log。18:02 起 2 分钟内 7 路领满,组 OPEN、请求 41/41 成功。停用 SIGTERM。
- **为什么 7 路**:全局 48 − 05 的 24 − 06 的 16 − agent-0 孤儿 1。按正式对照每条中位 7 小时、平均 9 小时,204 条约 11 天。Qwen 服务现在能同时处理 5–6 个请求(10-21 时只有 1 个),但也在给 36 机器上嵌入式 rollout 的 er- 作业用。
- **正式对照**:GLM 10-30 05:21、Qwen 17:00 collector 跑完退出;Qwen 75 条结束 70(PASS 33、FAIL 17、预算用完 8、系统错误 7、取消 3、超时 2),剩 4 条排队、mspn.r50 #1 暂停 24 小时(INVALID_PROVIDER_RESPONSE,不会自动续)。本机报警脚本 ~/.bench-health/bench_health_alert.sh 的 RUNS 去掉两批、加 r20261030-qwen-all(备份 .bak-20261030)。
- **当天报警里 05 的 5 条**(densenet161 #3、wide.resnet101.2 #3、yolov8l #3、rtmpose.m #4、fast.scnn #3):15:3x 一个请求连接中断、15:40 有人手动把它记为放弃(OPERATOR_ABANDONED_UNKNOWN),排在它后面、一次都没发出去的 5 个生成被记成 REQUEST_OUTCOME_UNKNOWN 暂停;之后一直在等 FAT 组的并发名额——FAT 网关约每 15 分钟一次 CONNECT_FAILED,组就冷却、从同时 1 个请求重新爬([[fatgw-05-20261030]]),在跑的轨迹先抢走名额。不会丢,组升上去就续。
**10-31 补存档**:开批时漏了存档和清理(18 小时占 6.7G),已由 archive-qwen.py 接管,见 [[reopen-20261031]]。
**How to apply:** 看结果按 DB 状态数 PASS;和 GLM 比用 06 同题结果,口径不同处(G1 强制 BPU)要说明。相关 [[formal-compare-20261024]] [[qwen-nvfp4-service-speed-20261012]] [[bench-restart-hazards]]
**11-02 00:25 提到 16 路**(用户要求):7 路时 Qwen 服务平均同时不到 0.5 个请求、中位 3–5 秒,轨迹时间都在等编译/上板/自己的命令;全局 48 名额当时空 24 个(两个 GLM 账号都停)。start.sh 改成 `PAR=16 bash start.sh`(旧版 start.sh.before-1102),交接脚本 par16-1102.sh:SIGUSR1 后 5 秒退出、新 pid 3441679,7 条全部 RESUME 续上、又领 9 道 → 16 路 16 个名额。额度组规则没改(max_concurrency 7 只限同时请求数,改了会 QUOTA_POLICY_CONFLICT);刚起时 16 路同时问模型,峰值 6 个在等。GLM 换 key 回来后名额会不够(16+23+15+1>48),要让回去就 `kill -USR1 <pid>` 再 `PAR=7 bash start.sh`。
**11-06 14:33 用户要求停**:当时 204 条结束 191(PASS 82),在跑 12、暂停 1(fcn.resnet101 12:58 板上清理没确认、已隔离,要人工核对),没有排队。等那条下板后 SIGUSR1 交接退出(不取消),12 条在库里仍是 RUNNING、下次启动续跑;没有残留进程。已 touch watchdog-snapshots/r20261030-qwen-all/STOPPED,值班和报警不再盯它。脚本和名单在 configs/stop-qwen-20261106/。拉回来:`rm .../STOPPED; WATCHDOG_SKIP_GATE=1 bash configs/watchdog-snapshots/restart_collector.sh r20261030-qwen-all`(同一次开机内;跨开机续不了,要取消补号)。
00:58 复查:30 分钟 513 次请求全 200、中位 6.4 秒(原 3–5 秒)、平均同时 2.9 个(上限 7),0 暂停;刚起时新题都在密集问模型,之后应回落。
**11-08 00:03 拉起(用户要求跑完所有题)**:12 条"续跑"里只有 segformer.b0、upernet.swin.t 真续上;另 10 条一拉起就判 DEADLINE_EXCEEDED——24 小时墙钟时限在停机的 33 小时里走完了(停前只跑了 4.8–17.1 小时)。同题互斥规则把这种超时当成"真跑满 24 小时",补的号永远不领,所以改成新批次 **r20261108-qwen-re**(这 10 道 + fcn.resnet101,job.json 照搬、k=1、同配置同额度组、11 路,日志 logs/collect-qwen-re-1108.log),旧批次里补的 10 个 kk1 已删并写了注记。fcn.resnet101 kk0(07 结果不明被隔离)在后台取消。存档进程换成 configs/board-lease-20261107/archive-qwen.py(多了新批次),旧的 reopen-20261031/archive-qwen.py 已停。看门狗快照里有新批次。脚本 configs/board-lease-20261107/mkrun-re.py、requeue.py。
**11-08 修了停机丢时限**(见 [[bench-restart-hazards]] 第 10 条):以后交接停多久都会把停机时间还给轨迹。08:4x 生产在跑:全量 1 条(upernet.swin.t,agent 自己的长命令,健康检查报"4 小时没新步骤"是老误报)、新批次 11 条。

View File

@ -0,0 +1,25 @@
---
name: qwen-all-status-20261102
description: "11-02 00:12 Qwen 全量批次进度与系统原因拆分:结束 48 过 34(71%,全是分类题);系统原因只丢 1 条(hb_verifier 崩溃→UNVERIFIED);板卡连不上 63 次、7 次\"unknown\"其实是 ONNX IR 10;测试分支没在跑"
metadata:
node_type: memory
type: project
originSessionId: d9e5babd-98e6-4592-a8cf-270eaaaa0941
modified: 2026-11-01T16:17:34.800Z
---
r20261030-qwen-all(204 题×1、7 路),11-02 00:12(VM 时间):结束 48 = PASS 34、FAIL 7、预算用完 4、跑满 24h 2、UNVERIFIED 1;在跑 7、排队 149。结束的全是 cls 题(按类别顺序领),71% 偏高;正式对照 formal-qwen 37 题跨类别是 33/70=47%。
系统原因:
- 改变结果的只有 1 条:shufflenet.v2.x1.5 的 hb_verifier 崩溃("launch function crashed",工具链 bug),06-hbm 按设计记 verifier_ok=None → G1 unverified → UNVERIFIED;它 G2 0.978、G3 71 vs 72 都过,本该算过。
- 不改结果但耗轮次:板卡网关连不上(rdk-sandbox.d-robotics.cc 400xx 端口 ssh 超时)07/08 共 63 次、19 条轨迹,失败调用里耗 1.4 小时,agent 要自己重发;另有 4 次"kex_exchange_identification/Connection closed"被记成 unknown、2 次板上命令 lost connection 记成 STAGE_EXECUTOR_EXIT。
- 报错没说清:05-compile 8 次 unknown 里 7 次是 agent 导出的 ONNX ir_version=10 > 工具链上限 9,系统没给提示。
- Qwen 服务很稳:9637 次请求 200、34 次 400 上下文过长,0 暂停 0 续跑,额度组没卡过。
- r20261019-02 两条 RUNNING 僵尸行占全局名额 13 天(11-02 12:3x 已取消,见 [[reopen-20261031]]);agent-0 孤儿隔离从 10-24 起占 1 个。
- 两条 24h:efficientnet.b7 / efficientvit.b3 各约 23 小时在等 agent 自己起的命令,是模型行为。
测试分支:10-29 10:52 长跑跑完后测试 collector 就没再起,只剩测试清理进程(reap-only)。salty-test 上还压着没上生产的:68028a2(回执重试+探板、429 自动续、孤儿板卡放行)、61d8f54(半开卡死)、6aabf56、10d5546、71873e0,以及 ec04748/1c57d9a(G1/G4 判分口径变更,属规则决定)。
**How to apply:** 统计脚本写法见 scratchpad q5/q6/q8(扫 stages/_queue/*/status.json 的 error_class)。相关 [[qwen-all-20261030]] [[reopen-20261031]] [[infra-fixes-20261028]] [[staging-longrun-20261028]]
**11-02 00:37 板卡体检**:注册表 9 块,8 块启用(S100P 4:rdk-sandbox/40009/40007/40011;S600 4:40013/40015/40016/40017),s600-40014 停用且没配凭据。8 块 ssh 一次就通(1 秒)、hbm_runtime 能导入、/userdata 剩 13–28G、可用内存约 19–21G,没有租约也没有隔离标记。近 24 小时 board_offline 39 次,集中在 11-01 00–07 点(各板都有,网关问题),之后只有 rdk-sandbox 2 次。体检脚本:VM configs/monitor/probe_boards.py(cd bench,设 BENCH_ROOT/PYTHONPATH/BENCH_CONFIG 后 python3 运行)。

View File

@ -0,0 +1,30 @@
---
name: qwen-bench-30-20261103
description: Qwen 微调前后评测用的 30 道 S100P 题:原版通过 13/30;题单、记录脚本、评测步骤都在本机 bpu-model-0914/qwen-bench-30-20261103/
metadata:
node_type: memory
type: project
originSessionId: 62d7e2c3-a201-4546-99fa-5c852545cfd5
modified: 2026-11-03T11:38:47.535Z
---
11-03 从 Qwen 全量批次 r20261030-qwen-all 已做完的题里,按 Qwen 和 GLM v24+ 的成败分组挑了 30 道 S100P(nash-m,int8)题。
- 分组和原版 Qwen 通过数:
- Qwen 败、GLM 过:13 道,原版过 0;
- Qwen 过、GLM 败:5 道,原版过 5;
- 两边都败:4 道,原版过 0;
- 两边都过:8 道,原版过 8。
- 合计原版 13/30,每题只跑了 1 次,按原始判定,没有用 int16 严格口径重判。
**文件**:本机 `bpu-model-0914/qwen-bench-30-20261103/`。
- `tasks.jsonl`:每道题有一个 `runs` 列表,第一项是原版结果,包括判定、卡在哪道门、fp32 和量化精度、掉点百分比、延迟、轮数。
- `record_run.py`:在虚拟机上运行,把新批次的结果追加进 `runs`。用原版批次试跑过,结果不变。
- `README.md`:评测步骤。
**评测规矩**:
- 训练数据只用 36 上的 `data-clean/outputs/ultradata-b3/`,那里已经按模型剔掉这 30 道题,S100P 和 S600 都剔了。
- `ultradata-merged` 里还有 52 条落在这些题上,不能直接用。
- 新批次只跑这 30 道,每题 2 次;配置和说明书版本要和 qwen-all 一样,只换模型地址。
**Why:** 用户要一份固定的考卷,以后每次微调都拿它测,结果放回同一份题单,好看出前后变化。
**How to apply:** 用户说"评测"或"测微调后的 Qwen"时,按 README 的步骤做。相关:[[data-clean-b3-20261103]]、[[glm-qwen-gap-20261103]]、[[qwen-sft-benchmark]]。

View File

@ -0,0 +1,21 @@
---
name: qwen-half-open-stuck-20261027
description: 10-27 formal-qwen 额度组卡在 HALF_OPEN 100+ 分钟:半开试探请求恰好是 400 上下文过长,_finish 的 CONTEXT_TOO_LONG 分支不改组状态,组永远不放行;40015 板报警是瞬时的
metadata:
node_type: memory
type: project
originSessionId: 535f14f5-6fb0-4257-a8f7-0d8e8131ac91
modified: 2026-10-27T14:47:06.851Z
---
10-27 约 20:58(VM 时间)qwen38-nvfp4-formal-1024 先有 12 次 CONNECT_FAILED → 组进 COOLING → 冷却结束放一个半开试探请求,这个请求返回 400 CONTEXT_TOO_LONG。
生产 harness/quota.py `_finish` 里 `elif reason=='CONTEXT_TOO_LONG'` 只把 generation 记 FAILED,不动组状态;而 `_admit_and_send` 只在 OPEN/RECOVERING/COOLING 放行,HALF_OPEN 永远不 ready → 整组 5 路全卡住,等满 30 分钟 wait_budget 依次变 PAUSED QUOTA_WAIT_BUDGET_EXHAUSTED。Qwen 服务本身正常(curl 401、0.08 秒)。
**Why:** 半开状态只有 COMPLETE(→RECOVERING)和"其它原因"(→_cool)两条出路,上下文过长两条都不走。
**How to apply:** 应急:把该组改回 RECOVERING target=1,暂停的 generation(resumes=0)会被 collect --watch 自动续。根治:CONTEXT_TOO_LONG 分支在 HALF_OPEN 时也按"服务有响应"转 RECOVERING;先进 salty-test,要重启才生效([[bench-restart-hazards]] [[branch-workflow-20261020]])。同时报的 40015 板卡 ssh 当时已恢复(负载 15.8),是瞬时的。
**10-28 处理**:经用户批准,加组锁把该组从 HALF_OPEN 改回 RECOVERING target=1(写了 quota_events OPERATOR_RECOVER;备份 VM /tmp/quota.sqlite.before-unstick-20261028);几分钟内暂停的轨迹全部续上。根治 61d8f54 已推 salty-test(CONTEXT_TOO_LONG 在 HALF_OPEN 同 epoch 时转 RECOVERING,加回归测试,额度测试 50 个全过),生产还没换,要随下次重启上。解卡后该组仍有零星 CONNECT_FAILED(curl 服务正常),会正常冷却再试探。
**10-28 23:49 第三次卡(15:17 起,8.5 小时)**:经用户批准同样改回 RECOVERING target=1(successes=1,照 quota.py 半开成功那一行),事件 OPERATOR_RECOVER;5 条 Qwen 23:49 全部续上,23:52 组已升到 target 4。同批把 7 条全 429 暂停(formal-glm 5、06 2)改成可续:生产版 `_resume_readiness` 不认 HTTP_ATTEMPT_BUDGET_EXHAUSTED、且 attempts≥4 就算用完,所以在组锁里把 generation 的 reason 改成 QUOTA_WAIT_BUDGET_EXHAUSTED、attempts 清零(事件 OPERATOR_RESUMABLE);只动所有尝试都是 429 的。备份 VM /tmp/quota.sqlite.before-resume-20261028(b)。脚本在 VM configs/resume-20261028/:unstick_qwen_first_try.py 含 Qwen 解卡(前缀那段有坑,见下)、unstick_resume.py 是按条件选的续跑版,可照抄。
**坑**:generation_id 前 8 位在同一条执行里会重复,按前缀 LIKE 会匹配到早先已完成的那一代;这次靠"只改 PAUSED+原因吻合"的校验才没改错。手改账本一律用完整 ID 或按条件选。
**续上后的排队**:formal-glm 5 路已满,那 5 条显示"等并发名额(已满)",要等在跑的结束才续;06 的 rtmpose.m #4 23:53 已续,dedode.v2 #3 在等。

View File

@ -0,0 +1,35 @@
---
name: qwen-nvfp4-service-speed-20261012
description: 10-12 实测 04 用的 Qwen 服务(114.111.18.115:18080 NVFP4):单请求快、但一次只处理 1 个请求;04 开 5 路时服务只忙 15%,不是瓶颈
metadata:
node_type: memory
type: project
originSessionId: cbd0a330-0959-4662-b4f7-9df1eaf61d31
modified: 2026-10-12T07:42:08.439Z
---
2026-10-12 15:40 实测 04 的 Qwen 服务(`http://114.111.18.115:18080/v1`,模型 qwen3.8-27b-nvfp4,配置 /mnt/data/ming01.wang/configs/mini/qwen-s100p-r04.yaml,额度组 qwen38-nvfp4-selfhost-11411118115-18080,max_concurrency 5):
- 单个请求:输出约 96 token/秒;1.5 万 token 的全新输入首字 3.2 秒。前缀缓存命中 96%,04 实际请求平均输入 6.4 万 token、输出 583 token,首字平均 1.9 秒。
- 账本(attempts 表)里 04 实际请求:中位 5.6–6 秒、p90 17–22 秒(旧原版服务中位 39 秒,GLM 3.7 秒)。
- **服务一次只处理 1 个请求**:同时发 4/8/16 个,总速度都停在约 65 token/秒,首字等待线性涨到 15/28/48 秒(最慢 88 秒);/metrics 里 running 始终 ≤1,排队原因是 capacity。显存够同时跑约 10 个满长度请求,所以多半是启动参数 `--max-num-seqs 1`。我没有这台机器的登录权限,要改得找服务负责人。
- 但现在它不是瓶颈:04 开 5 路,最近 6 小时 383 个请求,服务只忙 15%;每条轨迹花在等模型上的时间约 3–5%,其余是编译/HBM/上板等工具。
- 10-08 18:00 到 10-12 15:35,37 题基准共开 44 条,有效结果只有 12 条(10 PASS、2 FAIL),27 条被取消/作废/系统错误(主要是 Mac mini 重启和换代),5 条在跑。
**Why:** 用户以为 04 "一题一题做"、服务太慢。实际是 5 路并行,慢在单条轨迹要几小时、加上大量轨迹被系统打断。
**How to apply:** 04 想提速,先在全局上限 40 内把 04 提到 8 路(16+16+8,不用动 05/06);超过约 15 路、或服务忙碌超过一半时,才需要让服务负责人调大并发。用户可以自己挑题,重启 04 时换 `--job` 清单即可(configs/restart-after-drain-20261011.sh)。相关:[[qwen-sft-benchmark]] [[mini-salty-controller-20261009]] [[bench-restart-hazards]]
**10-21 01:30 复查**(数据来自服务的 /metrics 和额度账本;/metrics 不需要 key,/v1/models 返回 401)
- 服务:http://114.111.18.115:18080,vLLM,模型 qwen3.8-27b-nvfp4。进程从 10-09 15:28 起没重启过,共处理 27382 个请求。
- 上下文上限约 262144 token(256K)。算法:kv_cache_size_tokens 2677183 ÷ kv_cache_max_concurrency 10.21。
- 我们的实际用量:
- 平均输入 7.3 万 token,平均输出 1230 token;
- 账本 24 小时内,每个请求实际计费中位 6.2 万、p90 12.4 万、最大 17.8 万;
- 前缀缓存命中约 96%,每个请求预填充平均只要 0.49 秒。
- 并发:
- 服务实际一次只跑 1 个请求:running=1,waiting=1,等待原因是 capacity;
- KV 缓存只用了 2.7%,按满长度算能放 10 个;
- 调度每步平均 3.5 个 token,说明基本是单条在解码,推测 max_num_seqs=1。
- 我们这边 04 开 5 路(parallel 5,组 max_concurrency 5)。
- 每个请求平均排队 15.0 秒、推理 13.5 秒,排队占了一半以上;解码约 10.6 ms/token。
- 断流:整个服务会同时对 2–4 个在途请求停流超过 300 秒,大约每 40–80 分钟一次(10-20 19:43、21:33、22:16、23:54,10-21 00:32、01:20)。之后整组暂停约 26 分钟。服务没有重启过,原因未知,要运维看日志。
- GLM 对照:两个账号 24 小时完成率 99.9%(b:3602/3607,s600-c:4273/4276),请求中位 5 秒。

View File

@ -0,0 +1,39 @@
---
name: qwen-sft-benchmark
description: 用来比较原版 Qwen3.8-27B 和 GLM-5.3 SFT 版的 benchmark qwen-sft-v1:37 道题、规则、04 的跑法、训练数据污染情况
metadata:
node_type: memory
type: project
originSessionId: 61038635-ef70-484b-8f19-363102d54e44
modified: 2026-10-12T12:07:05.163Z
---
2026-10-08 建立 benchmark qwen-sft-v1,题单冻结在 `bench/benchmarks/qwen-sft-v1.json`(提交 c2c52ed)。
- 共 37 道 S100P 题:
- 对照 4 道:GLM 一次编译就过。
- 中等 26 道:GLM 要编译 2–9 次才通过。
- 难题探针 7 道:姿态 mspn.r50;深度 depth.anything.v1.small、v2.small、dpt.hybrid;实例分割 yolov8n.seg、yolo11m.seg;语义分割 fast.scnn。
- 规则:每道题 2 条;只计 2026-10-08 07:30 之后开始的轨迹;被系统打断的不算模型失败,要补跑。指标分档报:通过率、编译次数、轮次、工具报错率、扣掉等模型回复后的用时。
- 原版 Qwen 的跑法:04 现在用的配置是 `/home/ming01.wang/raise-concurrency-20261008/qwen-s100p-r04.yaml`(全局上限 40)。10-08 18:0x 用它重启,加 37 个 `--job` 只跑这些题。Qwen 配额组的三个超时放宽为 first_byte 600、stream_idle 300、request_total 1800,新旧两份配置和账本策略三处都已改成一样。17:50 那次我误用了旧配置路径重启,18:0x 已纠正,期间没丢任务。
- SFT 版:同一套系统、同样的题,只换模型地址,单独开一个批次。Qwen 服务现在部署的是原版(`/data/qwen38-27b/models/Qwen3.8-27B`,max_model_len 262144)。
- 训练数据污染:`datasets/*/sft.jsonl` 里,37 道题大多已有 GLM 轨迹。9-29 之前的批次就包含 solov2、yolo11l.seg、fsaf、yolo11n、yolox.l、mobilenet.v3.large、regnet.y.400mf/1.6gf、vit.b.32;retinanet.r50.fpn 哪份都没有。导出文件里还有 42 条 Qwen 自己的轨迹也被标成了可训练。
- 跟用户约定:旧的 Qwen 结果不删,只是不计入;"Qwen 一遍就能过"的文档已写成 Claude Doc。
**Why:** 用户用 GLM-5.3 的轨迹给 Qwen 做 SFT。在说明书写得很细的简单题上,两者同题打平,必须专门挑题才能看出微调前后的差别。
**How to apply:**
- 等用户告诉我训练实际用了哪份数据,再把题分成"训练里见过"和"没见过"两部分。
- 原版和 SFT 版必须用同一个说明书版本(VERSION 15)在相近时间跑;系统再改动就要重测原版。
- 10-08 17:00 有另一方用 "raise-concurrency-20261008" 把三个采集器都重启过,05/06 并发改成了 16。重启前先确认没有别人同时在操作。
相关:[[success-rate-breakdown-20261008]] [[quota-unknown-autorecover-fix]] [[bench-restart-hazards]]
**更正(2026-10-12):04 的 Qwen 轨迹只做训练前基准,不进 SFT。** 用户明确说过:Qwen 产生的数据不是用来做 SFT 的。衡量 Qwen 只看最终判定(PASS / FAIL),不要拿内容审核打回率或"进 SFT 的条数"当 Qwen 的指标。datasets-final/r20260929-04-training 里那 32 条 Qwen 轨迹不要混进训练数据。训练后的 Qwen 要用同样的部署方式(10-10 起 04 连的是 NVFP4 服务,配置备份 qwen-s100p-r04.before-nvfp4.yaml)、同样的 37 道题来跑,前后才可比。用户不想细分 Qwen 原版和 NVFP4,汇报时合在一起算。
**10-13 10:50 进度**:昨晚新过 4 题(depth.anything.v2.small 难题、yolo11l.seg、simplebaseline.r152、pidnet.s,各编译 1–2 次),无新失败;合计 27 题有结果、过 24 败 3,10 题没结果。系统问题(不算 Qwen):① 06-hbm 阶段时限 2 小时(config lifecycle.phases.06-hbm.execution_deadline_s=7200),depth.anything.v1.small 的 06-hbm 每次超 2 小时被杀,同一轨迹连杀 6 次;dpt.hybrid 超时后板端也超时→INFRA_ERROR;v2.small 用了 83 分钟刚好过。时限存在每条轨迹的 execution.json 里,改配置只影响新轨迹,config 每次现读、不用重启。② 10-13 10:14 网络断一下,efficientvit.seg.b1 停在 REQUEST_CONNECTION_INTERRUPTED:请求已发出、结果不明的不自动重发(quota.py 设计),会停到 24 小时过期。
**规则更正(10-12 20:10 用户决定):04 在 10-08 07:30 之前的 PASS/FAIL 也算。** 题单文件 count_rollouts_started_after 已改成 2026-09-29(提交 1e0b849,VM 上已同步,没有代码读它)。按新口径训练前 Qwen:23 题有结果、过 20 败 3(对照 3/3、中等 14/16、难题 3/4);败的三道都是真失败:mobilenet.v3.small、yolov8n.seg、solov2(mask_ap 掉 7.4%,只编译 1 次就收手)。两边都过的 20 题,编译平均 2.2 vs GLM-06 3.0,轮次中位 58 vs 61.5。这样调度"有旧结果的排后面"就和规则一致了,只剩 14 题没结果。下面 20:00 那段是旧口径。
**10-12 20:00 进度(训练后模型还没接,只有训练前基准)**:按规则(10-08 07:30 后)13 题有结果,过 11 败 2(对照 2/2、中等 7/8、难题 2/3);同题 11 道对比 GLM-06,轮次中位 56 vs 57、编译平均 2.4 vs 3.0,基本打平。10-08 前 04 还有 10 题的旧结果(过 9:densenet121、两道 regnet、fsaf、rtmdet、三道 yolox、yolo11m.seg;败 1:solov2),不计入但可参考,合起来 23 题过 20。从没出过结果的 14 题,5 条在跑(三道深度估计、yolo11l.seg、simplebaseline.r152,17:16/18:25 起)。**调度按"已完成次数"排队且算上 10-08 前的旧结果**(pipeline.py `_todo` 排序 `completed>0` 优先级最低),所以有旧结果的 9 题会排到最后才重跑。Qwen 的 tokens 计数口径和 GLM 不同(大一两个数量级),别拿来比。
- 能拉开训练前后差距的只剩约 8 题:mobilenet.v3.small、yolov8n.seg、solov2、三道深度估计、两道 simplebaseline;GLM 自己也没过过 depth.anything.v1.small、dpt.hybrid、yolov8n.seg。其余题训练前已接近满分,只能比编译次数和轮次。
**10-12 15:40 进度**:37 题里只有 12 题有有效结果(对照 1/4、中等 8/26、难题 3/7),Qwen 过 10、败 2;25 题一条有效结果都没有(被重启/取消/作废打断),5 条在跑(都是中等题)。有结果、GLM 也做过的 11 题:Qwen 过 10,GLM 全过;同题编译次数两边差不多(2–5 次)。Qwen 的 2 个失败都是真失败,5 次编译用完仍没达标:mobilenet.v3.small(输出相似度 0.983,门槛 0.99;GLM 06 三条全过,各编译 2–4 次)、yolov8n.seg(mask_ap 掉 21.6%,容差 5%;GLM 从没跑完过)。最可能拉开差距的 3 道深度估计和 2 道 simplebaseline 姿态一条都没跑完,GLM 历史上在深度估计 3 题上也只过过 1 条。编译上限在 harness/stagerun.py 的 MAX_COMPILE_ATTEMPTS=5。

View File

@ -0,0 +1,25 @@
---
name: rdk-sandbox-lease-20261107
description: 11-07 板卡平台改成申请/释放、释放即重置;当晚已上生产:拿本机板锁后向平台借板、装钥匙、用完立刻还(salty-test fa5c895 / salty-prod 487df8d)
metadata:
node_type: memory
type: project
originSessionId: ef66b964-fcaa-4a03-8895-6717e7f4ab8c
modified: 2026-11-07T14:57:38.748Z
---
- 11-07 板卡平台(rdk-sandbox.d-robotics.cc)改成按次借:/api/mcp/request(按板号,组内专属池不排队)、/api/mcp/release(释放即重置)、/api/group/boards、/api/mcp/status(每次借给的 ssh 密码)。token 存在虚拟机 bench 和 bench-staging 的 .env.local(RDK_SANDBOX_TOKEN),**不进仓库、记忆、agent 和 Salty 容器**(它能强制释放别人的板)。
- 实测:释放后约 42 秒重置完;每次借密码、SSH 指纹都换,我们装的公钥没了;新镜像重置后连 /userdata 都没有(上板代码会 mkdir -p,不影响);S100P 新镜像 UCP 仍是 3.13.6。端口 = 40000+板号,boards.yaml 不用改。
- **11-07 22:50–23:20 已上测试和生产**(用户批准"先 test 再生产"),提交 salty-test 6cfc479+fa5c895、salty-prod 4709c7e+487df8d(单独挑过去,salty-test 上的门槛改动仍没上生产)。做法:
- harness/board_lease.py:按 SSH 端口查板号 → 申请 → 用密码装公钥(SSH_ASKPASS,密码不上命令行)→ 还。借出时写 state/locks/board-<槽>.rdk.json,还掉才删;**人用同一账号手动占着的板(没有这个标记)系统不碰、也不用**。
- scheduler:拿到本机板锁后借,用完立刻还;借不到的板 30 秒内不再试。原来的板卡隔离、回执放板、空闲探测、孤儿隔离都删了,换成"还板 = 重置 = 证明干净";还板失败就留着租约,下一个拿锁的人或 reconcile 先还再用。
- 指纹不再校验(board_perf、空闲探测、Salty 容器不再拷 known_hosts)。
- 健康检查改看平台:某种板一块都借不到才报(重置中算借得到);借出超过 2 小时没还也报。TCP 探测和固定指纹登录删了。
- agent 的权限没变:bench dev --board、stage run board/eval;拿不到 token、密码,也选不了板。
- 验证:本机全量测试和改前比没有新增失败(test_quota 那条是改前就有的随机失败);虚拟机上两条 Linux 专属的采集恢复测试通过;测试目录真借 007 跑 07 测速(0.61 ms、S100P、UCP 3.13.6)后还板、50 秒后重置完;生产目录真借 007 → 密钥登录 → 还板。**还没跑过带 agent 的完整轨迹**,08 板上评测和 Salty 容器里上板也只靠同一个 ssh_base 间接验证过。
- 上线时生产没有任何采集进程在跑,所以只换文件、没有交接重启。备份和回退:/mnt/data/ming01.wang/configs/board-lease-20261107/(prod-before.tgz、staging-before.tgz、prod-env-before.bak);回退 = 解开 prod-before.tgz 并删掉 harness/board_lease.py、scripts/test_board_lease.py。
- 11-07 平台上:S100P 只有 007、S600 只有 013 在线,另 7 块离线。013 从 15:13 起被手动占着,用户批准后释放(CPU 0.3%,约 30 秒重置完),现在两块都空闲、系统可借。
**How to apply:** 板卡状态看 /api/group/boards,别再 ssh 探测;"Host key verification failed""换指纹"这类老问题不会再有。崩掉的借用要等下一次拿锁或 reconcile 才还,健康检查会报借出超 2 小时。相关 [[s600-board-hostkey-20261026]] [[branch-workflow-20261020]] [[prod-upgrade-plan-20261104]]
**11-07/08 采集实测**:测试采集 r20261107-bl(bench-staging,配置 configs/mini/staging-qwen-1107.yaml = qwen-all 换单独额度组 qwen38-nvfp4-staging-1107,3 道快的 S100P 千问题)23:09 起;stdc1.seg 23:57 07 测速在 Salty 容器里 OK(35 秒、2.63 ms)→ 还板 → 重置 → 23:58 08 再借到 007 → 08 OK(278 秒)→ PASS,锁文件清干净。11-08 00:03 拉起生产千问后,upernet.swin.t 的 07 也 OK(98 秒)。到 11-08 08:05:生产 08 板上评测 OK 3 次(12–13 分钟一次);板上自测共 15 次(生产 6、测试 9):成功 9、agent 自己命令出错 4(回执都正常)、agent 传的目录超过 512 MiB 被拒 2(没碰板子);没有一次借板或还板失败,锁和借用标记都清干净。只有 007 一块 S100P 在线,生产和测试的上板都排在它上面,每次多等约 40 秒重置。脚本:configs/board-lease-20261107/(status.py、prod_board.py、mkrun-bl.py)。

View File

@ -0,0 +1,43 @@
---
name: reboot-20261021
description: 10-21 03:16 Mac mini 重启、VM 07:05 才起来,所有进程停了约 4 小时;07:15 挪走 74 个旧开机租约后用存档命令和 *-salty024 配置原样拉起、不取消,新代码接上 30 条,硬断电共隔离 9 条
metadata:
type: project
---
**经过**:
- 10-21 约 03:13 后所有 collector 停止写日志,Mac mini 03:16 左右重启(uptime 可证)。
- 公网转发 180.76.192.183:443 能连上,但在 SSH 握手前就被断开;内网地址也连不上。本机健康检查 03:33 报了"Mac mini 连不上"。
- VM 07:05 才起来,生产 5 个进程、测试 2 个进程全都停了。数据库 quick_check 正常。
**恢复**(用户批准,脚本 configs/hotfix-20261020/start-reboot-20261021.sh):
1. 把 74 个旧开机的 lease(agent 39、dev 26、cpu 6、board 3)挪到 state/locks-stale-reboot-20261021/,没有删除。
2. 用 deploy-20261020 的 launch.py 按存档拉起 05、06、04,配置分别是 s600-r05-v22c-salty024、s100p-r06-v22-salty024、qwen-s100p-r04-v23-salty024。
3. offload 用 `--` 显式传参(三个 v16-salty024 配置),因为存档的 cmdline 里还是旧配置。speed_ref 用 s100p-r06-v17-salty024。
4. 测试环境用 start.sh / start-reap.sh 拉起,pid 文件已更新。
- 新 pid:05=1731,06=1734,04=1737,offload=1740,speed_ref=1743,测试 collector=1745,reaper=1748。
- 06 的日志写在 logs/collect-s100p-r06-enable-20261019-223553.log,里面有二进制字节,grep 要加 -a。
**结果(07:22)**:
- 05:续上 13 条,隔离 3 条(OPERATION_STATE_UNKNOWN,其中 yolo11m k2 判 LOST、xfeat k2 判 INFRA_ERROR)。
- 06:续上 12 条,隔离 4 条。
- 04:续上 5 条。
- 测试环境:续上 1 条,隔离 2 条。
- 被隔离的都是断电时有操作正在执行、结果无法确认的轨迹,系统按设计不冒险续跑。
- 在跑名额很快补满:05 16 条,06 15 条,04 5 条。
- 断电导致的步骤记成了约 30 个 STAGE_EXECUTOR_EXIT。
**Why:** 断电后不取消、让新代码接管,大部分轨迹能续上;只有正在执行操作的会隔离。
**How to apply:** 再遇到断电或重启:先确认没有进程在跑,挪走旧开机租约,再按 deploy 存档拉起(offload 要显式传 salty024 配置)。相关 [[poweroff-20261016]] [[prod-switch-20261020]] [[bench-restart-hazards]]
**之后(10-21 07:56–14:13,用户批准)**:
- 监控子 agent 查出重启留下的 3 个问题,修复在 e1753ad 和 44f3142(salty-prod 已快进到 44f3142),07:56:35 热替换进生产,备份在 hotfix-20261020/*.prod.before-reboot1021:
- 断电让刚装回的结果文件变成 0 字节,swin.b 之后每一次 04/05 都报错。修法是落盘后再改名,选内存时跳过读不了的 meta。
- stageworker 对"上一次开机、没有回执"的失败步骤也视为已清理。要 collector 重启后才生效。
- speed_ref 遇到残留的 stages/ref 目录会先改名放到一边。speed_ref 已重启(新 pid 39519),卡住的 3 个参考改名后重新开算,不再报 FileExistsError。
- 7 条 OPERATION_STATE_UNKNOWN 隔离轨迹用 `harness.cli execution cancel --reason REBOOT_QUARANTINE_USER_CANCEL` 取消,库备份在 hotfix-20261020/jobs.sqlite.before-cancel7:
- 05:densenet201 k2、efficientnet.b2 k2、rtmo.s k1;
- 06:yolo11n.seg k2、hypersim.base k2、rtmo.m k2、rtmpose.x k2。
- **每条 cancel 都会卡满 30 分钟才返回**,7 条一共用了约 3.5 小时。cancel 的输出里有执行 token,要重定向到 600 权限的文件,用完删掉。
- 取消后名额马上补满,05、06 各 16 条在跑。
- 06 那 16 条 OWNERSHIP_UNKNOWN 没有动。04 仍然是 17 条暂停、3 条在跑(Qwen 服务的问题)。

View File

@ -0,0 +1,45 @@
---
name: reopen-20261031
description: 10-31 11:56 重开 05/06 被同题互斥挡住、从没按 10-16 后新规则跑过的 78 道题:r20261031-05re(43 道 S600、23 路)、r20261031-06re(35 道 S100P、15 路);补了 qwen-all 的存档和清理;导出进程等当前导出结束后自动加上两批
metadata:
node_type: memory
type: project
originSessionId: d493a7cb-ced2-4ec5-9a33-9cafbccf4225
modified: 2026-10-31T03:57:51.305Z
---
用户 10-31 选"78 道全开"(分析见 [[glm-runs-exhausted-20261031]]:新跑法对老难题约 1/4 能过,预计多过 15–27 道,光流/深度基本没戏)。
- **题单**:05/06 里 10-16 16:21 前没 PASS 过、之后没有任何结束轨迹、还有 QUEUED 被挡住的题。05 43 道、06 35 道,两边不重名。题单在 configs/reopen-20261031/jobs.json。
- **批次**:r20261031-05re、r20261031-06re,k=1,job.json 原样拷父批次(78 道 G1 BPU 门槛本来都开着),只改 run_id 和 rollout_plans。是训练数据(和 05/06 一样)。
- **collector**:用父批次 collector 的原环境(05 用 configs/fatgw-20261030/r05-fat.environ.bin,即 FAT 网关组 glm-fat-coding-test;06 拷 /proc/2273423/environ,账号 e 组 glm-coding-account-e),配置不变、不会有组规则冲突。05re 23 路、06re 15 路 = 全局 48 − Qwen 7 − 06 剩的 1 − r20261019-02 两条卡死的测试行。11:57 一分钟内 05re 领了 21、06re 7 并继续爬。日志 logs/collect-r20261031-05re.log / -06re.log。脚本 configs/reopen-20261031/start.sh(`start.sh 05|06`,加 `mkruns` 是建批)。
- 05 原 collector 10-31 11:54 最后一条(vit.l.32 #3 跑满 24h)结束后正常退出;报警脚本 ~/.bench-health/bench_health_alert.sh 的 RUNS 去掉 05、加两批(备份 .bak-20261031)。06 原 collector 剩的那条结束后也会退出,到时报警会说"06 调度程序没在跑",是正常的,把 06 从 RUNS 去掉即可。
- **导出/存档**:主清理进程 salty_offload(pid 2195312)原名单只有 05、06、formal-glm。restart_offload.sh 在后台等 09:23 提交的导出(salty-c344eac4)出结果,然后 SIGTERM、按原环境/目录/日志重起,名单追加 05re/06re(用各自 collector 的配置,05re 的 source_models 带 glm-5.3-coding)。等待记录在 configs/reopen-20261031/restart_offload.log。
- **顺手补的漏洞**:10-30 开的 qwen-all 没有任何存档和清理(18 小时已占 6.7G,跑完 11 天约 100G;agent 的 dev 作业结束后 Salty 上也没人收)。formal-qwen 存档进程(2114065)换成 configs/reopen-20261031/archive-qwen.py(名单加 qwen-all,每轮先 reap_orphans),日志仍是 logs/archive-formal.log。
- 遗留:r20261019-02(10-20 的测试批次)有 2 条 RUNNING 卡了 11 天,一直占着全局名额。11-02 12:3x 用户让取消:regnet.y.800mf #2、resnet18 #2 改成 CANCELLED(目录早没了、没有调度程序管,只改了库里两行并记了 annotation;脚本 scratchpad 里的 cancel02.py 思路:确认无进程、无目录后 UPDATE state='CANCELLED')。全局名额按库里 RUNNING/VERIFYING 行数算(db.claim_rollout),所以这两行确实占名额;该批还剩 2 条 QUEUED,没人跑、不占名额。
**How to apply:** 看进度按库里这两批的状态数;对比同题在 05/06 的老结果。下次再有"没题可领"就照这个目录的脚本建批。相关 [[qwen-all-20261030]] [[fatgw-05-20261030]] [[vm-disk-export-cycle-20261028]] [[bench-restart-hazards]]
**11-02 00:03 复查:GLM 两个账号都断了,只剩 Qwen 在跑。**
- 05re:FAT 网关 11-01 05:22 起每次都回 400 限流,18:54 回 401,组被记成 PAUSED(UPSTREAM_AUTH_OR_HARD_QUOTA),不会自己恢复。23 条全暂停,结束 13 条(PASS 8、FAIL 4、预算用完 1),排队 7 条。
- 06re:账号 e 11-01 08:07 起全 429,组每 15 分钟试一次。18 条暂停,5 条挂着在跑(多半在等自己的长命令),结束 11 条(PASS 3、FAIL 4、跑满 24h 4),排队 1 条。
- 重开两批到这时一共新过 11 道。qwen-all 7 路正常:PASS 34、结束 48、排队 149。
- 主清理进程 10-31 12:59 已按计划重启,两批已在名单里(新 pid 2910090)。06 原 collector 已退出。
- 要恢复得用户换 key:FAT 回 401 要新 key、重启 05re;账号 e 要么等额度刷新,要么换 key。换 key 的坑见 [[fatgw-05-20261030]] [[stop-06-20261017]]。
**11-02 00:17–00:35 换 key(用户在聊天里贴了两个 key,我没碰,用户自己跑 set-s600-key.sh / set-s100p-key.sh 填)**:
- 填完核对指纹:S100P_API_KEY 换成了新值;S600_API_KEY 前后两次填写都没变,说明用户给 05 的那个 key 就是原账号 d 的 key(10-29 额度用完,现在已恢复)。两个 key 各试发一次都 200。
- 05re:新配置 configs/mini/s600-r05re-rekey1102-w48.yaml(FAT 配置把 teacher 换回账号 d 的智谱 coding 地址、S600_API_KEY,新组 glm-coding-s600-account-f,规则照账号 d,并发 8;source_models 保留 glm-5.3-coding)。switch-05re.sh:SIGUSR1 → 取消 23 条暂停(绑在 FAT 组和 glm-5.3-coding 模型上,换组续跑会 EXECUTION_GROUP_CONFLICT)→ requeue.py 各补 kk1 → 00:21 按 16 路起,新 pid 3437683。5 分钟 127 次请求全成功。
- 06re:组名 glm-coding-account-e 和配置不变(10-29 rekey-e 也是这样换的),switch-06re.sh:SIGUSR1 交接 → 00:18 按 16 路起,新 pid 3437198,在跑的 5 条交接成暂停后自动续。组冷却到 00:26,00:27 试探成功、全 200。
- 06re 有 10 条暂停是"全 429"(generation reason HTTP_ATTEMPT_BUDGET_EXHAUSTED),生产版不会自动续(RESUME_NOT_ELIGIBLE)。照 10-28 的做法在组锁里改成 QUOTA_WAIT_BUDGET_EXHAUSTED、attempts 清零、记 OPERATOR_RESUMABLE;只动所有尝试都是 429 的。账本备份 VM /tmp/quota.sqlite.before-resume06re-20261102,脚本 configs/rekey-20261102/resume06re.py(不带 apply 是只看)。
- 脚本、旧环境都在 configs/rekey-20261102/。以后再换 key:同账号可沿用组名;换账号或换地址要新组名,暂停的只能取消补号。
- 00:33 复查:05re 16 条在跑(5 分钟 279 次请求全 200),06re 14 条在跑、10 条可续但在等名额。原因:00:25 另一个会话(configs/qwen-all-20261030/par16-1102.sh)把 qwen-all 从 7 路调到 16 路,全局 48 名额被占满(05re 16 + 06re 14 + Qwen 16 + r20261019-02 两条卡死)。虚拟机负载 50、内存可用 4G。06re 要等别处结束腾出名额才能续满。
- 09:46 复查(用户问 Salty 上应有/实有几个作业):应有 23 个(在跑轨迹此刻挂在 Salty 上的步骤),Salty 上 23 个全在跑,另多 2 个:1 个 05re 开发命令已结束还没停、1 个导出作业;外人的 er 作业已没了。在跑轨迹 39(Qwen 15、05re 12、06re 10、r20261019-02 两条),没占满 48。
- 账号 e 是"跑几小时就 429、过一阵自己好":00:27 恢复 → 03:18–05:00 全 429 → 自己好 → 08:39 起又全 429(10:00 仍在冷却、每 15 分钟试一次)。06re 11 条暂停原因都是可自动续的 QUOTA_WAIT_BUDGET_EXHAUSTED,不用手动改账本,账号恢复后会自己续。账号 f(05re)全天全 200,但每小时请求从 774 掉到约 130,因为 05re 在跑的 12 条里 10 条挂在 Salty 上等 agent 自己的命令。
- 有 3 个 agent 自己的开发命令在 Salty 上跑了 8 小时以上(05re flowformerplusplus、gma,06re unidepth.v1.vit.l),轨迹一直在等;同题上一条(flowformerplusplus #0)的开发命令跑了 11.7 小时后被时限杀掉(exit 124)。没查是不是卡住。
- 11:35 复查:账号 e 10:14 最后一次 429、10:30 自己恢复,之后每 20 分钟 60–80 次全 200;06re 15 条在跑、5 条暂停在等名额。两次限流都在大量请求后出现、各持续约 2 小时,控制台看额度还够,像是按时段的用量上限(没拿到 429 原文,未确认)。
- 21:40 复查:05 组 f 在 20:48 被 2 次偶发 401 整组停掉(UPSTREAM_AUTH_OR_HARD_QUOTA,不会自己恢复),同一个 key 21:40/21:45 试发都 200;账号 e 当天又两次 429 时段(13:30–15:00、17:30–20:00)。用户说"05/06 的 key 换都换了",但 .env.local 从 00:20 起没变(尾号 05 w4F1、06 h6ra),不用重启。
- 21:46 账本修复(configs/rekey-20261102/fix1102.py,备份 VM /tmp/quota.sqlite.before-fix-20261102-2145):组 f PAUSED→RECOVERING target=1;05re 11 条、06re 7 条暂停的生成改成可续;06re 到 3 次上限的 ledger resumes 3→2。21:54:05re 在跑 7→12、组 f 爬到 target 6 全 200;06re 在跑 7→9。
- **坑:续跑有两道上限**。账本 executions.resumes(quota.py max_auto_resumes=3)之外,轨迹目录 execution.json 里还有 auto_resume_count(execution.py:628,也是 3),只改账本没用,会报 AUTO_RESUME_BUDGET_EXHAUSTED 并一直停在 PAUSED_INFRA。06re 剩的 5 条(unimatch.flow、solo.r50、vkitti.small、v2.small、zoedepth.k)都是 3/3,卡在这。
- 22:01 用户把 06 的 S100P_API_KEY 换回 00:17 之前那个旧 key(尾号 zjhv,用户自己跑 configs/set-s100p-key.sh),试发 200;22:02 switch-06re.sh 交接重启(旧进程 3 秒退出,新 pid 3944035,组名 e 和配置不变),22:03 后账号 e 全 200。22:14:06re 在跑 9、暂停 5(就是到 auto_resume_count 3/3 的那 5 条);05re 在跑 12、暂停 4、排队 6。
- 05re 那 4 条暂停在 WAITING_QUOTA 和 QUOTA_SOURCE_UNAVAILABLE 之间来回:后者是查账本超时(quota.py resume_readiness 限 5 秒,账本 357MB、虚拟机负载高),22:13 有一条已到 READY 又在第二次检查时超时弹回。有暂停在等时 collector 这一轮只续不领新题(pipeline._claimable),所以 05re 的 6 条排队也领不上。

View File

@ -0,0 +1,14 @@
---
name: reply-in-chinese
description: "回复用户一律用中文(10-16 用户看到英文回复后要求\"转为中文\")"
metadata:
node_type: memory
type: feedback
originSessionId: c8e679af-e7a3-4129-a0e4-e1821fa37ce1
modified: 2026-10-16T14:33:35.172Z
---
2026-10-16 我用英文汇报断电停机/重启结果,用户回"转为中文"。
**Why:** 用户一直用中文沟通,英文汇报读着费劲。
**How to apply:** 所有回复(包括汇报、提问、表格)都用中文;命令、路径、代码保持原样。配合 [[plain-language-no-jargon]]。

View File

@ -0,0 +1,77 @@
---
name: restart-20261015
description: 10-15 下午重启前清查出的底层 bug(回执超时、暂停吃掉 24 小时、400 永久暂停、账本忙让出名额、评测一次 12 GB)、修法、v17/判分 v0.8,以及重启做法
metadata:
node_type: memory
type: project
originSessionId: cadbef09-8744-472b-81b1-a1ff37b0a735
modified: 2026-10-15T06:39:25.114Z
---
10-15 13:00–14:00 清查 10-14 19:00 重启以来所有结束的轨迹、阶段、dev 命令、collector/offload 日志、额度事件,用户要求"重启前查清所有已暴露的 bug"。
**新发现并修复(分支 feature/salty-20261009)**
- 4c98f9f 板上清理回执读取:原来 15 秒超时、不重试,比 ssh 自己的 20 秒连接超时还短;板上已跑完并回收也会判清理未确认、整条作废。历史 9 次(8 次 TimeoutExpired),10-15 12:44 05 fcn.resnet50 r02。改为 60 秒、最多 3 次。
- bf88f78 暂停期间 24 小时照算:10-14 三条 v15 轨迹(06 fcn.resnet101、depth.anything.v1.large、dpt.hybrid)被断线停了 7–16 小时,续上只剩不到 1 小时,编译/评测做到一半被截断。改为 execution.paused_credit:暂停时判超时扣除暂停时长,续跑时补回,累计最多补一个预算(防止永远续不上的暂停轨迹永不结束)。
- c2ceff5:
- 模型服务返回 400(Qwen 上下文超出,76 万 token)也被当成可续跑暂停,但续跑资格永远不收,挂到 24 小时(04 retinanet.r101)。历史 8 次全是 Qwen。现在 400 直接结束(INFRA_UPSTREAM_REJECTED)。
- resume_readiness 在额度库忙时返回 QUOTA_SOURCE_UNAVAILABLE,f191baf 不算"在等",名额会被新题拿走;现在算在等。
- b3be5cb 只取 f56ac2f 里 board.py/common.py/run.py(不在 task_contract 指纹里):每次上板按实测字节 ≤1 GiB 分批、G2 余弦按组算。05 solo.r50 G2 一批 32 张 12 GB 撑爆 8Gi 容器、回执带不回来、整条作废。v17 配置另把 08-eval 内存 8Gi→16Gi(coco_extra 一次 16 张仍在冻结文件里)。
- 41eb1d2(用户定):agent v17,提示词删「评测数据只读可见」(VM 上 bench/data 为空,dev 只挂校准集);判分 v0.8,板上 disk_full 与 board_offline 一样免罚(export/reward.py,导出时生效)。
- v17 配置(用户定):max_turns 240→400,token 上限不变;08-eval 16Gi。configs/mini/*-v17.yaml。
**查过、不是 bug**
- offload 大包上传失败(convnext.large、zoedepth.n 等)后来都重试成功,ARCHIVED.json 在。
- 阶段 OOM 后内存自动翻倍(salty_remote._memory,上限 128Gi)在起作用;depth.anything.v1.large 的 06-hbm 到 53 GB 还不够,是模型太大。
- dev 的 STAGE_EXECUTOR_EXIT 07:50 改 37 槽后归零;之后的 TERMINAL_DEADLINE_EXCEEDED 是 agent 自设超时。
- 07-board stalled 两次:S600 40015/40017 加载模型卡住,按瞬态重试;conditional.detr.r50 是 hbdk 编译挂死/崩溃,模型问题。
**已知限制,以后做**
- Salty 容器里 onnxruntime 线程没限(只限了 OMP/MKL/OPENBLAS),大模型编译常超 4 小时阶段时限(vit.h.14、dab.detr、dpt.hybrid、conditional.detr、solo.r50)。
- 板上进度停滞检测(加载卡住要等满 ~49 分钟)。
- 分割/深度/光流/特征一次多张上板:各任务文件在指纹里,等新建 run 再上 f56ac2f 其余部分。
- personal 空间有 425 个 bench-stage-*、28 个 bench-dev-* 目录没清,删要用户同意。
**重启做法**:configs/restart-20261015/(stop.sh、targets.py、requeue.py、start.sh、mkconfigs.py、deploy/ 18 个文件,md5 与分支 96d72b2 一致)。
- 测试:VM 全量 base/new 对比(72 个文件)+ Salty 容器全量对比(VM 没有 numpy)。只有固定 v0.7 的两处测试不同,已跟到 v0.8。
- VM 上跑测试要 `env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY`,否则 test_quota 的本地假上游走代理报 502(36 个假失败)。
- test_collection、test_explicit_batch 在 base 上也时过时不过,是老的不稳定测试。
- 过程:14:18 SIGTERM;等 3 条上板/评测的跑完(14:35);取消 35 条(34 在跑 + retinanet 的 400 暂停),补号 35;旧 collector 14:37 自己退出(没卡在导出)。14:37:18 用 -v17 起来,几秒内就开始领题(以前要 10–20 分钟)。
- 06 的 GLM 组因取消打断一条在途请求进入 RECONCILING,约 21 分钟后自动恢复。
- 启动时打印的「已隔离」清单(05 24 条、06 28 条、04 9 条)与上次启动完全相同,都是 10-10/10-12 的旧账。
- 14:39 核实:05 16 条、04 5 条新轨迹全是 v17、max_turns 400;部署文件 md5 与分支一致;collector 环境里是 -v17 配置。
**15:00–16:10 追加(用户:不要新建批次;没进 SFT 的可以清;继续改进),全部热部署、没重启 collector**
- 评测分批不建新批次(6ab088d,15:55 上线):
- harness/eval/__init__.py 加 EQUIVALENT_SOURCES(精确的「冻结指纹 → 现指纹」对)和 contract_holds;阶段检查(stages/base.py)、基线检查(s02_baseline.validate_baseline)、expand 比对(pipeline._check_frozen_job)都走它。
- 只批准 f56ac2f 的 5 个任务文件(seg/mde/flow/feat/coco_extra)。依据:上板逐个样本推理(board_bench.infer_inputs),每张的前后处理和指标不变。
- 批次的冻结记录不动;基线缓存按冻结指纹寻址(baseline_identity 用 job 里的合同),照常命中。
- 冻结检查在每个阶段新起的 stagerun 进程和容器里跑,不在 collector 里,所以能热部署:先上规则、5 秒后再上任务文件。
- 上线后:iseg/pose 阶段都放行,没有 frozen 报错;iseg yolov8n.seg 评测 9 次上板 7.8 分钟。
- 漏洞:harness/adapters/*.py 不在指纹里。顶层姿态和 mmdet 实例分割的适配器(topdown_pose_common、topdown_pose_batch8、rtmpose_common、mspn_common、rtmo_common、mmdet_iseg_common、mmdet_solo_common)仍然一张图一次上板:simplebaseline.r152 用了 176 次、37 分钟。要改 7 个适配器的循环,并在容器里做新旧对比,下一步再做。
- 板上加载卡住 10 分钟就按 stalled 结束(b7577de,board_perf.LOAD_STALL_S)。
- Salty 容器 onnxruntime 限线程(85ae175):
- 实测 4 核容器 resnet50:默认 125 线程 320–500 ms,限 4 线程 22 ms;hmct 校准写死 10 线程,约 35–48 ms。
- harness/container_site/sitecustomize.py 在 onnxruntime 第一次 import 时把 InferenceSession 限到 OMP_NUM_THREADS。
- worker 把这个目录放进阶段和 dev 的 PYTHONPATH。盖掉的镜像 sitecustomize 只装 apport 钩子。
- Salty 失败作业不再留(5bd0f1a):阶段失败拷完日志就删;offload.reap_orphans 也删已结束的失败作业。offload 用 configs/ops-20261015/restart-offload3.sh 等空闲时重启(原命令、原 -v16 配置,导出口径不变)。
- 一次性清理(用户同意):删 442 个已结束的 bench-stage/bench-dev 作业和目录,外加 7 个空挂目录。只删主控端那次尝试已结束的;名字不是 bench-stage-/bench-dev- 的不动(bench-repro-pending、untar 探针、失败的 export)。脚本 /tmp/saltyclean-amos.py,日志 logs/ops-20261015/saltyclean.log。
- 测试:VM 全量(去掉代理变量)和 Salty 全量,最终版 5bd0f1a 对比 a526af7,只多了新测试,其余一致。
- 自己踩的坑:两组 Salty 测试共用 /tmp/saltytest-<label> 目录,一组结束时删掉了另一组的,要用不同 label。
- 19:18 核实(热部署后 3 小时 23 分):
- 66 次阶段尝试全部 OK/SKIPPED,冻结检查误拦 0 次(iseg 24、pose 15)。
- 一次性清理删了 410 个作业、411 个目录、3 个空挂目录;32 个删除失败,多半是被同时清理的进程先删了。19:18 时 Salty 上只剩 1 个失败的阶段作业、11 个阶段目录,没有再攒。
- offload 16:06 已按原命令重启。
- 姿态 simplebaseline.r152 三次评测仍是 176 次上板、35–37 分钟(适配器逐张路径)。
- 19:24 堵 dev 泄露(172a174,热部署):
- [[sft-sample-review-20261015]] 发现 agent 能经 bench-cache/adapter-probes/*/private-source 读到 harness/registry 私有副本和参考配置。
- dev 原来挂整个 personal:/bench/cache,还能看到 dataset-downloads(带标注原始数据集)和 baseline。
- 现在只挂 onnx/weights/sources/venvs;v16/v17 的 dev 命令只用过 sources(7) 和 weights(1)。容器内实测三处都不可见,onnx/hmct 正常。
- VM 侧 bench/cache 只有 weights,没有这些副本。
**Why:** 用户原则:底层错误不能算到 agent 头上,系统故障不扣模型的时间和次数。
**How to apply:** 看到 DEADLINE_EXCEEDED / BOARD_CLEANUP_UNCONFIRMED / 长期 PAUSED_INFRA,先查是不是这几类;task_contract 只哈希 harness/eval/<任务>.py。
相关:[[overnight-check-20261015]] [[bench-restart-hazards]] [[net-resilience-board-deadline-20261014]]

View File

@ -0,0 +1,33 @@
---
name: resumable-rollout-design-20261019
description: 10-19 "collector 重启不丢轨迹"方案(待用户确认):不拆常驻服务,改成轨迹状态可续——掉线后从最后一个完整边界接着跑;6 处卡点和改动范围
metadata:
type: project
---
**现状卡点(读代码核实)**
1. process_scope.py 监督进程 PR_SET_PDEATHSIG + owner_lost:collector 一没,agent/阶段进程全被杀,回执记 QUARANTINED(即使子进程全收干净)。
2. execution.reconcile:owner 死且有未完成操作 → QUARANTINED(SIDE_EFFECT_UNKNOWN/OWNERSHIP_UNKNOWN),没操作 → LOST。
3. execution.resume/_reason:boot_id 变了一律拒(BOOT_CHANGED_RECONCILE_REQUIRED);process_status 对旧开机进程返回 UNKNOWN;deadline_monotonic 按开机计时。
4. stageworker._execute:operation.json 在、状态没 DONE、执行进程死 → SIDE_EFFECT_UNKNOWN 隔离。但 salty_remote._run 已可重入:remote.json 记着 Salty job_id,同一 attempt 重跑只会接着等,不会重交。
5. pi_session.js 续跑只接受"最后是空的模型报错"这种断点;工具调用到一半断的(有 toolCall 没 toolResult)续不了。
6. 额度账本在 sqlite,broker 重启不丢状态;结果不明的请求已有 120 秒放弃再续的路径。
**方案**:不拆常驻服务(拆出来的服务改代码也得重启,我们大多数重启正是改它们);改成进程可丢、状态可续,对应 DSec"训练重启后重连"、Belayer"动作边界检查点"。collector 不管是计划重启、崩溃还是虚拟机重启,下次起来都把这些轨迹记成"平台重启暂停"并自动续:断在工具中间的补一条如实的"被平台打断、结果未知"工具结果;Salty 上在跑的编译/导出/开发命令接着等原作业;上板/评测阶段仍按隔离处理,计划重启时先等它们跑完(≤40 分钟)。计划重启用新信号 SIGUSR1(SIGTERM 保持排空语义)。
**改动范围**:execution.py、process_scope.py、stageworker.py、salty_remote/salty_dev(核对同 attempt 重入、编译次数不重复记)、pi_session.js、rollout.py/collection_runtime.py、pipeline.py、export/trajectory.py(补的工具结果和多段会话);测试含 Mac mini 真 Pi。上线还要最后一次排空重启。
**Why:** 10-18 统计系统原因结束 52%,其中取消 54%,根子是 collector 停了在跑的全断。
**How to apply:** 用户确认后按此实现;上板阶段的续接放第二步。相关 [[rollout-infra-survey-20261019]] [[bench-restart-hazards]] [[overall-tally-20261018]]
**10-19 实现(分支 resumable-20261019,基于 6c7b19f,未上线)**
- execution.py:earlier_boot()——同主机旧开机的进程一律算 DEAD;scope_cleaned 对"上级就是 collector 本身"的顶层作用域接受 owner_lost + 全部收干净的回执(作用域登记时记下当时的 owner,续跑换主人后旧作用域仍按旧主人判;嵌套作用域仍要外层回执,原测试不动);reconcile(crash_checkpoint) 可续时记 PAUSED_INFRA/CONTROLLER_RESTARTED、在跑的工具调用记 INTERRUPTED;resume 跨开机按墙钟平移所有 monotonic 时钟,停机时间按暂停补回。
- stageworker.settle_interrupted:collector 死后,执行进程已死、没做完的操作按 STAGE_EXECUTOR_EXIT 结算(编译免次数),直接写 handle(_publish 对停止的执行不写 DONE,会让续跑的 agent 永远等);上板无干净回执仍隔离。
- collection_runtime.crash_checkpoint:先 capture_context(否则 CHECKPOINT_SYSTEM_CHANGED),再冻结会话;只接受 WAITING_LLM/RUNNING_TOOL/PAUSED_INFRA 断点。configure_pi 对恢复断点跳过账本里已完成的请求编号。
- pi_session.js:每存一条消息(含压缩)刷新断点;恢复续跑时丢掉末尾的中止/出错半截回复、给没结果的工具调用补"被平台打断"结果、不再因 nonempty_delta 拒绝;开头打 bench_recovery 事件。
- scheduler.reconcile_leases:暂停(PAUSED_INFRA)且持有者已死的本机槽位(agent/cpu/gpu)证明进程全无后释放(否则新 collector 领不到 agent 槽,排队超时)。
- pipeline:SIGUSR1 = 计划重启(停领题、等上板步骤最多 45 分钟、账本缩短在途请求占用到 120 秒、os._exit);SIGTERM 仍是排空。
- export/trajectory.py:bench_recovery 结束未闭合的段,排除重启前的半截回复(UNFINISHED_BEFORE_RESTART)。
- 测试:scripts/test_controller_restart.py(Mac mini 真 Pi:kill -9、回复中途 kill、SIGUSR1、断电+重启 4 例全过)、scripts/test_settle_interrupted.py(3 例过)。虚拟机跑测试要去掉代理变量(env -u http_proxy ...),否则本地 HTTP 测试大面积失败。
- 10-19 收尾:提交 0da66ed 推到 origin resumable-20261019(未合入 feature/salty-20261009、未上线)。虚拟机全量:新代码 48 项失败、原代码 49 项,唯一"只在新代码"的是 test_collection_joint 的 429 续跑用例(原代码 3 次全挂、新代码 3 次挂 1 次,时序不稳);本机也只多出一条已知不稳的额度测试。另外 settle_interrupted 不再区分"没开始",一律 STAGE_EXECUTOR_EXIT;崩溃断点只接受 WAITING_LLM/RUNNING_TOOL/PAUSED_INFRA。
- 上线时:新代码的对账也能接住旧(v23)collector 留下的在跑轨迹(旧作用域没记 owner 会在对账时补记),所以上线本身可以不排空,但这是新逻辑第一次碰生产,失败时退回现在的结局(丢失/隔离)。

View File

@ -0,0 +1,25 @@
---
name: rl-readiness-20261017
description: 10-17 03:30 评估能否当强化学习环境:能用,但瓶颈是慢不是稳;收尾 5 件(速度进奖励、Qwen 省略改成确定性、冻结版本、挑有好有坏的题、Qwen 推理服务扩容并记模型版本),之后不再无边界优化
metadata:
node_type: memory
type: project
originSessionId: e00ddcbc-d4da-4f81-a8f7-1fd7eeb8e8df
modified: 2026-10-16T19:20:54.154Z
---
用户问:想把它做成 RL rollout 环境,是不是还不稳定、要不要放弃优化。我的判断:能用,不建议放弃,也不建议继续无边界优化;做完收尾清单就冻结。
**依据(10-17 03:30 数据)**
- 稳定:20:57 重启后 6 小时健康检查全 ok,正式步骤 101 次失败 3 次,大模型请求 4000+ 次断 1 次;不算取消,系统出错占已结束轨迹 10-13 约 37%,10-14、10-15 约 13–16%,10-16 约 27%(含 Qwen 上下文超长和断电)。系统原因结束的轨迹都单独标记;导出时只有 PASS/FAIL 进 reward_learning(to_agentrl.py:823),所以不稳只伤吞吐、不污染奖励。
- 慢:10-10 以来 agent 自己结束的轨迹,通过的中位 3.0h(04)/4.7h(05)/6.4h(06),失败 6–11h,预算用完 13–15h,超时 24h;每天 agent 自己结束的 5–73 条(多数 30–50)。Qwen(要训的模型)只开 5 路,服务一次只处理 1 个请求。
- 学习信号:有 ≥2 个结果的题里,结果有好有坏的共 74 道(04 9、05 14、06 32,按 job 合并后 74),中位轨迹 3.8h;其中编译中位 ≤30 分钟的 31 道。全过或全不过的题对组内比较没有信号。注意多是 GLM 和旧规则下的历史。
- 奖励 v0.8(export/reward.py):G1 1 分 + G2 1 分 + G3 2 分 + 成本最多扣 1 分 + 超时扣 1 分;速度 0 分;只编译成功就拿 1 分。
- context-mask.js 的省略只发生在发送时,会话文件存原文:Qwen 训练数据和模型实际看到的不一致;和续跑必死是同一个根因(见 [[check-20261017-0215]])。
**收尾清单(都没动,等用户定)**:①速度进判定和奖励(板上实测默认配置作参考)并统一奖励口径;②context-mask 改成只由消息决定;③冻结一个训练专用版本;④从 74 道题起步挑题;⑤Qwen 推理服务支持并发、每条记模型版本。然后小规模试跑 30 题×4–8 条,测一步多久、多少题有信号,再决定在线 RL 还是批量采样+筛选训练。
**Why:** 用户在决定还要不要继续投入。
**How to apply:** 用户再提"再优化一下"时,先对照这份清单,清单外的改动默认不做;冻结后只修会把系统原因算错的 bug。
相关:[[check-20261017-0215]] [[stability-sweep-20261016]] [[verifier-audit-20261012]]

View File

@ -0,0 +1,18 @@
---
name: rollout-infra-survey-20261019
description: 10-19 调研别家 agent RL rollout 怎么保稳定(ProRL Agent、DeepSeek DSec、Belayer、KAT-Coder-V2.5、ClawGym II、Kimi AgentENV/Kimi-Dev、AReaL、slime);共性 6 条和我们的差距;我们 52% 系统原因结束里取消占 54%、系统出错 34%
metadata:
type: reference
---
**别家共性**
1. 每条 rollout 一个临时隔离沙箱,用完即毁(Kimi-Dev k8s 1 万并发、ProRL Singularity、ClawGym、DSec 每天 300 万个)。
2. rollout 和调度/训练解耦成独立服务,调度挂了不影响在跑的(ProRL rollout-as-a-service;DSec 把有状态 rollout 和可抢占的 GPU 训练分开,训练重启后直接重连,不回放)。
3. 状态可保存、可续:DSec 暂停/快照沙箱;Belayer 在动作边界做文件系统+CRIU 检查点,模型输出每 256 token 存前缀,坏了从最近检查点接着跑(从头重跑 +48.7% 时长,它 +1.5%);AReaL 可中断生成。
4. 基础设施失败的轨迹丢弃、不进梯度(ProRL、ClawGym),我们已经这么做。
5. 容量和健康:KAT-Coder 沙箱机镜像把盘撑到 95%→超时无效 6–7%,镜像回收后 <1%;沙箱造成的失败审计出 16%,修完 <2%。DSec 健康探测只往健康节点放、节点压力大时拒绝、超 80% 溢出到云。
6. 有量化指标:沙箱反馈错误率、超时占比、盘使用率。
**我们的差距(10-18 数据)**:1550 条结束里系统原因 810(52%),其中取消 436(54%,重启部署和断电/断盘)、系统出错 276(34%)、放弃 74、未验证 22。根因:额度管理器和 agent 进程都在 collector 进程里,collector 一停在跑的全断;状态绑开机,跨开机续不了;单台 Mac mini(Wi‑Fi、断电、盘满)。
**How to apply:** 用户问稳定性方案时以此为参照;优先级见当次回答。相关 [[overall-tally-20261018]] [[bench-restart-hazards]] [[stability-sweep-20261016]]

View File

@ -0,0 +1,20 @@
---
name: rollout-time-breakdown-20261008
description: "10-08 实测:轨迹时间花在哪、编译机 CPU 余量、04 时长重复计算——判断\"编译上云\"值不值的依据"
metadata:
node_type: memory
type: project
originSessionId: 1b3cd916-3faa-4ef7-be14-c3fb07244493
modified: 2026-10-08T05:21:23.910Z
---
2026-10-08 13:20 在 model-compile(120.48.151.164,244 核 / 1.4 TB)上实测,04/05/06 三个批次,608 条已结束轨迹:
- 轨迹总时长按阶段:05-compile 33%,06-hbm 16%,08-eval 7%,07-board 1%,其余约 43% 是 agent 思考和杂项。
- **stages 表里 04-calibrate 的时长是重复计算**:受保护模式下 04 的结束时间跟着 05 一起登记,1270 对里有 1085 对两者结束时间相差不到 2 分钟。看板上 04 占 34% 是假象。
- 05 拿到 cpu 槽位后的编译时长:中位 29 分钟,p90 102 分钟(OMP_NUM_THREADS=8)。
- 从提交到真正开始编译(04 合并配置 + 排队):中位 0.5 分钟,p90 18 分钟。05 从没出现过排队超时。
- 当时机器 CPU 占用约 31%(空闲 67%,负载 82–89),cpu 槽位 13/24,板卡占用 0。
**Why:** 用户 10-08 提出把 05-compile 搬到 Salty 集群(他人写的方案,要求 Salty 作业生命周期、冻结输入、epoch 对账等)。数据显示目前编译机既不缺 CPU 也不排队,搬上云不会提高吞吐,单次编译反而多了传输和拉镜像的时间。
**How to apply:** 再讨论扩并发或编译上云时,先重新采这几项数;只有目标并发大约超过当前的两倍、编译机 CPU 接近打满时,上云才有收益。相关:[[success-rate-breakdown-20261008]] [[prefer-subtraction-over-addition]]

View File

@ -0,0 +1,34 @@
---
name: rsi-disassembly-audit-20261104
description: "11-04 按\"能拆装才能解释\"核对 RSI 各部件(量化线代码 origin/salty-test c4ab240);Skill 没开关没版本、从没不带 Skill 跑过,148 和 76%/55% 都是模型加我们东西的成绩;森哥 7 月的 ebd_harness 已有同样分法"
metadata:
node_type: memory
type: project
originSessionId: b9a38822-c8ac-4d9c-a54f-dcc5c4da7f89
modified: 2026-11-04T14:10:04.878Z
---
11-04 用户提出:RSI 是一个能拆装的完整 agent 系统(任务、agent 运行环境和工具、模型 API、benchmark、评测结果;agent 内部的 Skill、知识库也能拆),能拆装才说明评得清、讲得明白。
**森哥的现成设计**:`/Users/d-robotics/project_robo/嵌入式agent/HWE_harness/DESIGN.md`(ebd_harness,qinyusen,7-31,状态 v0.9、731 case)。分成任务集、循环控制(模型适配 + 工具代理)、评测管道、打分;定位是 A/B 对比工具;原则 9 要求每题有验证过的参考解;能力评测和回归评测分开;留私有考题。和用户的分法基本一致,汇报时用这套说法。
**代码核对结果(只查了量化线,软件线代码不在本机)**
- 做题程序:harness/runners 有接口,只管进程和会话,不碰调度和判分。生产库 12,452 条是 Pi、9 条是 opencode(测试)。两边条件不一样:opencode 配置里没有 Skill 包、压缩关闭。
- 模型:每个采集进程一份配置,每条 rollout.json 记 model;但 rollouts 表没有模型列,14,068 条 policy 全是 teacher,区分模型要翻文件。
- 提示词:agent/ 下全局一份,同一目录的批次共用;每条存了原文和版本号(VERSION=25)。
- 工具:config 白名单,Pi 每条存 tools.json。
- Skill 和文档:.horizon 33 个 Skill,路径写死在 settings.json.tmpl,没有按批次的开关;.horizon/VERSION=0.2.0、不在 git 里,rollout.json 和 run manifest 都不记。
- 环境:不是一个 Docker。Agent 进程在虚拟机隔离环境,开发和正式步骤在 Salty 容器(镜像固定到 sha256),上板走 ssh。仓库 Dockerfile 只装控制面。
- 判分:和 agent 分开,gates 随批次冻结进 job.json,有 evaluator_version 和 `bench rejudge`;int16 规则还只在提示词里;产物清掉后重判是 UNVERIFIED。
- 已记录:manifest 有代码和题单指纹、工具链、板卡;verdict 有 cost(轮数、token、时长),没有板卡小时。
**最要紧的发现**:最近三批(05re、06re、qwen-all)还留着日志的 110 条里,108 条记录出现 Skill 文件路径,约 105 条读过(文本匹配粗算)。模板没有开关,所以没有"不带 Skill"的基线。148 道没做对、GLM 76%/Qwen 55% 都是"模型 + 我们的 Skill、文档、提示词、平台帮助"的成绩,不是模型原样。Skill 到底值多少从没测过。
**11-04 晚补查**:.horizon 全部 261 个文件最后修改在 9-14 23:36,生产库 4,358 条轨迹都在 9-15 04:50 以后开始,所以现有记录用的是同一版 Skill,可以整体标成 v0。版本标签写进单独的登记表,不改原 rollout.json,因为导出审核把 rollout.json 的哈希绑进了回执(export/to_agentrl.py `_gate_sources`)。用户的要求:版本随意切换,旧数据照样能用,不重采。
**用户没列、要补的部件**:运行条件(预算、时限、编译次数)、平台替 agent 做了多少、上下文压缩、权限和隔离、参考解和反例、题目分组和重复次数、系统故障归类、配置单(一条记录用了哪一版的哪个部件)、费用账、读轨迹、改进程序本身。
**调研依据**:SkillsBench(84 题、7 种配置、每题 5 次,Skill 平均 +16.2 个点,16 题变差,长文档 -2.9);Harbor 任务目录(指令、配置、环境、参考解、判分);Anthropic 评测定义(每次干净环境、要读轨迹);《Harness Engineering》7 个子系统;《Empirical Study of Harness Design》强调结果只对所测实现成立。
**Why:** 用户要能说清楚"我们的东西贡献了多少"。能拆装只是前提,还要配置单、一次只换一个、重复跑量波动。
**How to apply:** 不重写成插件架构(代码已分开大半,且生产要冻结)。只补配置单和 Skill 开关,在测试分支做;第一个实验是同一模型 Skill 开/关,不依赖 Claude Code(11-04 虚拟机里装不了,地区限制,见 [[watchdog-mac-mini-20261104]])。相关 [[plain-language-no-jargon]] [[rl-readiness-20261017]] [[verifier-audit-20261012]] [[opencode-staging-20261021]]

View File

@ -0,0 +1,23 @@
---
name: salty-06hbm-not-returned-20261020
description: 10-20 两条板上评测已通过的轨迹被判 UNVERIFIED(current HBM missing):06-hbm 第一次容器内存超限前已把 HBM 放进远端 artifacts,重试时文件没变就没被带回;worker 已改成 06 每次都带回 HBM/BC(1981488),两条恢复后重判为 PASS
metadata:
type: project
---
**现象**:r20260929-05 的 seg--hrnet.w48 k1 和 seg--ocrnet.hrnet.w18 k1,06/07/08 三步都 OK,verify 却报 `current HBM missing`,判了 UNVERIFIED。rollouts/01 下面整个 artifacts 目录都不存在。
**根因**:
- harness/salty_remote_worker.py 的 collect() 只回传本步骤里有变化的 artifacts 文件(与 before 快照对比)。
- 06-hbm 第一次跑的容器在 8 GiB 处 OOM(REMOTE_WORKER_FAILED),但在那之前已经把 HBM 拷进了远端的个人空间 artifacts,而这块空间是跨尝试保留的。
- 重试时文件已经在、也没变,就没有回传;控制端从来没拿到这个 HBM。
- 以前 verdict 里有 4 条同样的 UNVERIFIED(10-10、10-12、10-14、10-16 各 1 条)。"current HBM missing" 本身大多出现在没编出 HBM 的轨迹上,不能直接拿来计数。
**处理**(用户批准):
- collect() 里 06-hbm 一律回传 artifacts 下的 *.hbm 和 *.bc。新测试在旧代码上会失败。
- 20:45:57 热替换生产和测试的 worker(md5 695c4a57 → c756a998,备份在 hotfix-20261020/salty_remote_worker.py.*.before-06return)。worker.py 每步都会重新拷进容器,不用重启。
- 提交 1981488,salty-test 和 salty-prod 已同步。
- 两条轨迹:bench-work 里 05 的 HBM 哈希与 06 记录的一致(1dd11847… 和 97d5274f…);拷回 artifacts 后执行 `harness.cli verify`,两条都判 PASS(G1 pass,G3 pass-screen,G4 na),数据库已更新。旧 verdict 备份在 hotfix-20261020/verdict.*.before-recover.json,脚本是 recover.py。
**Why:** 远端状态跨尝试保留,"只回传有变化的文件"就会漏掉控制端从没收到过的产物。
**How to apply:** 再看到"板上已评测却判 UNVERIFIED / current HBM missing",先查 06 有没有失败过的前一次尝试,用 bench-work 里的 HBM 核对哈希后重判。相关 [[salty-jobs-list-outage-20261020]]

View File

@ -0,0 +1,19 @@
---
name: salty-cli-026-20261021
description: "10-21 17:46 起服务端改了作业列表格式,CLI 0.2.5 报\"作业列表响应不是合法的作业结构\",按名字 describe 全挂、步骤成片 REMOTE_UNAVAILABLE;20:08 测试和生产 CLI 都换成 0.2.6 后恢复;20:12 服务端 502 约 1 分钟,已自愈"
metadata:
node_type: memory
type: project
originSessionId: 8888b971-107b-4fb2-a2b6-72c0b8e37b34
modified: 2026-10-21T12:12:58.131Z
---
**现象**:10-21 17:46 第一次出现,19:20 起几乎所有 Salty 步骤都失败(19–20 点 46 个 REMOTE_UNAVAILABLE,只有 2 个成功)。`salty ps` 和按名字 `describe` 都报 `server 响应不符合协议:作业列表响应不是合法的作业结构`;按完整 ID describe 和 storage 正常。原因:服务端改了 /jobs 的格式(0.2.6 请求的是 /jobs?limit=50),0.2.5 解析不了。
**处理**(用户批准):在私有目录 ~/salty-upd-20261021/ 里对副本跑 `salty update` 得到 0.2.6(md5 af7c025c…)。ps 能列出 70 个作业,按名字 describe 正常;三种状态的作业 describe 输出与 0.2.5 只差时间戳。20:07 换测试的 configs/staging-20261019/tools/salty-0.2.4;20:08 换生产的 tools/salty-0.2.4 和 ~/.local/bin/salty(文件名不变,同目录 .new + mv 原子替换,不用重启)。备份在 configs/hotfix-20261021/*.before-0.2.6。tools/salty-0.2.5 那个文件没换,配置里也没用到它。
**结果**:20:09–20:12 有 23 个步骤 OK,0 个基础设施失败。20:12 起 Salty 服务端对所有来源(本机、Mac mini、虚拟机)都返回 502,访问百度正常,所以是平台问题,不是 CLI 的问题。20:13:24 恢复,只持续约 1 分钟,被传输层重试吸收,没有新增 REMOTE_UNAVAILABLE;20:13 ps 正常(running 22、pending 3)。
**影响**:17:46–20:08 在跑的轨迹各浪费约 2 小时额度;06 的 depth.anything.v2.metric.hypersim.large、unidepth.v2.vit.s 两条在这段时间以 DEADLINE_EXCEEDED 结束,应算系统原因。
**How to apply:** 再看到 "响应不符合协议" 这类错误,先在私有目录用副本跑 `salty update`,验证通过后原子替换配置里写的 CLI 路径(生产配置的 execution 下 `salty:` 字段)。相关 [[salty-jobs-list-outage-20261020]]

View File

@ -0,0 +1,36 @@
---
name: salty-container-threads-20261013
description: Salty 容器看到整机 244 核、只给 4–6 核,torch/numpy/onnxruntime 按 244 开线程被限流,评测慢 25 倍;10-13 已加线程上限,onnxruntime 还没处理
metadata:
node_type: memory
type: project
originSessionId: 977b3506-bd83-4ae1-9791-f48a3caf1e3d
modified: 2026-10-13T02:44:48.465Z
---
2026-10-12 晚发现,同一个模型在 Salty 容器里有几步突然变得很慢。
- 评测:rtmdet 6 分钟变成 160–173 分钟。rtmdet.l 那次,上板推理前三批几分钟就跑完,之后容器在本地计算那一步停了 107 分钟。
- 生成 HBM:yolo11s 5 分钟变成 36 分钟,efficientvit.seg 15 分钟变成 80 分钟。
- 编译:多数慢 1–1.5 倍,个别慢 2.5 倍。
stage 的 meta.duration_s 是容器自己计的时,不含排队,所以慢在容器里面。
**原因(测试容器实测,4 核、8G、cpu-shared 队列)**:
- 容器里 os.cpu_count() 和亲和性都是 244(整机),cgroup cpu.max 是 400000/100000,也就是只给 4 核。整机负载约 73,机器本身不忙。
- torch 默认开 122 线程,几乎每个 100ms 周期都被限流。1536×1536 矩阵乘每秒 2.6 次,set_num_threads(4) 后每秒 42 次,快 16 倍。
- numpy:默认每秒 31 次,设 OMP/MKL/OPENBLAS_NUM_THREADS=4 后每秒 146–158 次,快 5 倍。
- onnxruntime 1.19:默认开约 185 个线程。它不认 OMP_NUM_THREADS 这些环境变量,也不认进程亲和性。只有在 SessionOptions 里写 intra_op_num_threads=4 才快 2.2 倍(每秒约 300 次变成约 680 次)。
**已做(a7c454c,10-13 10:43 部署)**:salty_remote._submit 提交容器时加 `-e OMP_NUM_THREADS/MKL_NUM_THREADS/OPENBLAS_NUM_THREADS=分到的核数`。每个阶段都是新起的进程,部署后马上生效,不用重启调度程序。已核对:10:43 以后提交的新容器 describe 里带着这三个变量。salty_offload.py 常驻进程还是旧代码,它起的导出作业要等它重启才带上。
**没做**:onnxruntime 的线程数。我们自己的代码里只有 harness/tools/recipe_model.py 一处用它。主要用户是厂商工具链:oe-3.7.0 里 hb_compile 校准时用原始模型推理。工具链只在 personal:/bench-runtime 里,虚拟机里看不到源码。要处理,得在容器启动时加一个自动加载的脚本(sitecustomize),把 InferenceSession 默认的 intra_op_num_threads 设成核数,或者找厂商的参数。
**Why:** 用户发现迁到 Salty 后出结果极慢,怀疑系统有问题。这是一个跟题难不难无关、实打实的系统问题。
**How to apply:**
- 比较部署前后各阶段用时,要按同一个模型配对比。
- 以后任何在容器里跑的程序,线程数都按 cgroup 的 cpu.max 定,别按 cpu_count。
- 测试容器的写法:`salty run <镜像> --cpu 4 --memory 8Gi -- /bin/sh -c "ln -sfn /data/personal/bench-runtime/home/{toolchains,outputs} ... && exec <venv>/bin/python <脚本>"`,脚本先 storage cp 到个人空间。用完 salty rm 并 storage rm -r。
另:10-12 晚 Salty 共享队列一度排队 16 个作业,最久 45 分钟,我们最多同时跑约 22 个作业、116 核;10-13 上午不再排队。注意 usage.log 里的时间是北京时间,salty describe 的创建时间是 UTC。
相关:[[salty-throughput-drop-20261012]] [[selfheal-and-alert-20261012]] [[mini-salty-controller-20261009]]

View File

@ -0,0 +1,29 @@
---
name: salty-jobs-list-outage-20261020
description: 10-20 17:00–19:47 生产所有 Salty 步骤失败:新代码等目录删掉才删作业,目录删除一直失败,积了约 8000 个作业,/jobs 超过 CLI 响应上限,ps 和按名字 describe 全挂;批量删作业 + 先删作业的热修恢复;CLI 换 0.2.5
metadata:
type: project
---
**现象**:从 10-20 约 17:00 起,每个 Salty 步骤都在等满约 30 分钟后报 REMOTE_UNAVAILABLE(18 点 73 个步骤,0 个成功)。transport.log 里是 `salty describe <名字> failed: 错误:网络错误:/jobs 响应超过大小上限`,`salty ps` 也报同样的错。按完整 ID describe 仍然正常。
**根因**:15:05 换上的分支代码 `_cleanup` 要等 storage 目录删除成功才删作业([[salty-storage-rm-405-20261019]] 里那个先删作业的一次性清理版本被替换掉了)。目录删除在服务端一直失败(7461 个删除任务停在 queued),作业就一直不删。`_submit` 每次提交前都要按名字 describe 去重,而按名字查会列出整张 /jobs,于是所有新步骤都卡住。
**处理**(用户批准):
- 19:41–19:44 跑 configs/hotfix-20261020/rmjobs.py:对本地步骤已 DONE 且作业已结束的回执执行 salty rm(只删作业,不碰目录)。实际删了 691 个,7348 个原本就已经不在了。之后 ps 正常,列出 407 个。
- 19:47 热替换生产和测试的 harness/salty_remote.py(md5 f60e18de → 0d3a6e3e,备份在 hotfix-20261020/salty_remote.py.*.before-jobfirst):先删作业并记 `job_removed`,目录删除照旧在后台退避重试,两者都完成才记 cleaned。提交 89c4801,salty-test 和 salty-prod 都已推送。offload 进程里还是旧代码,作业结果路径由每步新起的进程负责,这条路径已经是新代码。
- 结果:19:47–19:51 有 35 个步骤 OK,0 个 REMOTE_UNAVAILABLE。
**CLI**:用户贴了安装说明,要求重装。0.2.5(linux-arm64 sha256 f1e39a5c…)的输出格式和 0.2.4 一致。tools/salty-0.2.4、测试的 tools/salty-0.2.4、~/.local/bin/salty(原来是 0.2.0)都换成了 0.2.5,文件名没改,免得重启;旧文件备份在 hotfix-20261020/。0.2.5 本身修不了 /jobs 过大的问题,用户说服务端要热更新。`salty update` 拒绝在组可写的目录里替换文件。
**影响**:pose--hrnet.w48.2 和 cls--mobilenet.v3.large 最后几小时全是 REMOTE_UNAVAILABLE,最终按 BUDGET_EXHAUSTED 结束,统计时记成了 agent 失败。其余在跑的轨迹各丢了约 2.75 小时的 24 小时额度。
**Why:** "删不掉就算了"只适用于目录。作业不删会撑爆列表,整个平台就停了。
**How to apply:** 作业必须在结果取回后立刻删除;看到 REMOTE_UNAVAILABLE 成片出现,先跑 `salty ps` 看列表是否过大。统计系统原因时,要把 verdict.error_class=REMOTE_UNAVAILABLE 的 BUDGET_EXHAUSTED 算作基础设施问题。
**之后的补充**:
- 19:55 补删了正式阶段尝试(stages/*/aNN)留下的已结束作业 323 个(hotfix-20261020/rmjobs2.py)。第一次删除只覆盖了 _queue 下的回执。删完后列表从 442 个降到 121 个。
- 用户批准后,按原命令、原工作目录、原环境重启了两个后台清理进程(restart.py / restart2.py),环境变量只在内存里中转、不落盘:
- 测试 reaper:20:00 537672→717225,reap-pid 文件已更新;
- 生产 offload:20:26 553623→751363,在清理阶段的两次 CLI 调用之间停止。它的一轮清理要扫几千个回执,几乎从不空闲。
- 两个进程都已在跑先删作业的新代码。测试那边重启后立刻有 445 个回执标成 job_removed。

Some files were not shown because too many files have changed in this diff Show More