Skip to content

copyfree_battery_v8_tiny (7.1x cheaper eval) + torch-only imports + complete battery legs - #53

Open
sileod wants to merge 3 commits into
mainfrom
battery-copyfree-v8-tiny
Open

copyfree_battery_v8_tiny (7.1x cheaper eval) + torch-only imports + complete battery legs#53
sileod wants to merge 3 commits into
mainfrom
battery-copyfree-v8-tiny

Conversation

@sileod

@sileod sileod commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Three independent fixes to the eval battery, all verified against the 214 shipped cells.

1. copyfree_battery_v8_tiny (7.1x) — a per-leg keep field on EvalLeg subsets each leg's rows instead of dropping legs, so the compressed battery keeps all 39 legs. Leave-one-shard-out rank correlation with full v8 is rho 0.999; end-to-end arm time drops ~4.2x (eval is ~90% of an arm). Not the default: --eval-manifest selects it while v8 shards are in flight.

2. Never import tensorflow — transformers probes for TF at import (image_transforms.py) whenever it can find it. This project is torch-only, so USE_TF=0/USE_FLAX=0 in the package init and in conftest.py. It removes a multi-second import from every arm, and TF's x86 build aborts outright on hosts without SSE4.1 — which is why the test suite could not be collected at all on some machines.

3. battery_legs.zip was missing 7 legs the shipped manifests name, so copyfree_battery_v8 could not resolve from a fresh clone — silently, because unpack only writes files that are absent. Repaired additively: every pre-existing entry is byte-identical, so no battery id moves. Verified: v8 resolves from a clean tree with 0 missing legs at id 1a482a2aeb5d, matching every existing cell.

tests/test_training_runtime.py passes 37/37.

🤖 Generated with Claude Code

https://claude.ai/code/session_0151Q74oFN2bRyuoXnTJLXir

Damien Sileo and others added 3 commits September 3, 2026 20:39
EvalLeg.keep selects examples by position AFTER the prefix limit, so a battery can be
subsampled without touching the eval files. keep is omitted from the leg identifier when
unset, so every pre-existing battery id is byte-identical (verified: v8 hashes the same
before and after this change) and running shards are unaffected.

copyfree_battery_v8_tiny: 6,504 of 46,427 scored sequences (7.1x), seeded-random indices
(seed 0) from 809 arms of per-example sidecars. Reproduces the aux-task ranking at
Spearman 0.9994 headline / 0.9994 cloze / 0.9949 pairwise. Random, not fitted anchors:
OMP looked better under leave-one-shard-out but that split leaks (the same rgA tasks recur
across shards) and it loses to random under a task-grouped split. Random also means the
fidelity claim is about subset SIZE, so it survives any row reordering.

Selection is by index, never by shrinking limit: limit is a prefix over unshuffled files
and at b=16/f=10% it inflated the carry hop 30% (-0.0329 vs -0.0254).

Also gitignore per_example/ -- sidecars are ~260KB/arm and origin is public.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0151Q74oFN2bRyuoXnTJLXir
load_battery_manifest defaults data_dir to data_cache -- which is what paper_battery and every
influence run rely on -- but the test asserted the leg path resolved against the manifest own
directory, so it could only ever pass by accident. Pass tmp_path explicitly, which is what the
assertion was actually checking.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0151Q74oFN2bRyuoXnTJLXir
…ctually name

transformers probes for tensorflow at import (image_transforms.py) whenever it can
find it. This project is torch-only, so switch the probe off in the package inits and
in conftest: it drops a multi-second import from every arm, and TF x86 aborts outright
on hosts without SSE4.1.

battery_legs.zip was missing 7 legs that the shipped manifests name, so a fresh clone
could not resolve copyfree_battery_v8 at all -- and failed silently, since unpack only
writes files that are absent. Added additively: every pre-existing entry is byte-identical,
so no battery id moves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant