fix(bench): stop baseline benchmarking from a private InferenceX copy - #1456
Conversation
45ce86f to
25ece24
Compare
9fe9cca to
722fdc3
Compare
|
The diagnosis is right and the baseline-only mirror clearly has to go. What is blocking is the shape: relocation is modelled as a per-task operation with its own cross-process garbage collector, when it is a session-level path resolution that this repo already has a single owner for. BlockingB1 — Make relocation happen once, at Preflight already resolves, validates writability, and pins the checkout. Relocate there and the process has one truth value, so env and config can never disagree. That deletes, not defers, most of this PR:
What is left is Please also record B2 — Keying on B3 — Cross-host sweep deletes a live benchmark's cwd. B4 — The destination is never checked to be local disk. B5 — Delete the B6 — Degradations are invisible where it counts. Every fallback is a Non-blocking
|
722fdc3 to
244a439
Compare
2af5eea to
ac08519
Compare
`materialize_config_with_envs` owns `benchmark.inferencex_path` for all three callers, but only `baseline` passed the argument: it handed in a copy of the checkout made on local disk, while `explore` and `integrate_patch` fell through to `$INFERENCEX_PATH`. In the reported session that is 87 of 109 materialized configs naming the network checkout and 22 naming a mirror nobody else could see, interleaved inside one coordinator process. Which tree a round benchmarks from stopped being a property of the session and became a property of the executor. Deleting the copy is what makes the three agree, rather than teaching the other two to copy as well. An exported `$INFERENCEX_PATH` is the operator's tree: they may edit it between rounds, and a copy taken once would go on serving the contents it had then without ever saying so -- the contract `session.paths.resolve_dep_dir` already gives Magpie and TraceLens. The deployment that produced the ESTALE failure exports that variable from `Hyperloom-dev/.env`, so no amount of relocation downstream was ever going to fire for it. That widens the exposure rather than narrowing it: every round now reads whatever `$INFERENCEX_PATH` names, and where that is a revocable mount the baseline rounds lose the protection they had. So preflight records it. A checkout on a network filesystem warns once and lands in the install ledger as `network_fs`, which is what tells the next `magpie_nonzero_after_valid_measurement` apart from a variant that genuinely cannot serve -- the failure was diagnosable last time only because it killed the shell. The two fixes that do close it are both path resolution, not executor behaviour, and neither belongs here: the `.env` pin names another clone's cache at the same SHA and buys nothing, and `deps_cache_root()` defaults to `$REPO_ROOT/.cache`, which follows the repo onto the mount. Removing the mirror removes the only reader of `INFERENCE_OPTIMIZER_DISABLE_LOCAL_INFERENCEX` and `INFERENCE_OPTIMIZER_LOCAL_INFERENCEX_ROOT`; both were undocumented and are now gone. Co-authored-by: Cursor <cursoragent@cursor.com>
ac08519 to
519dd06
Compare
|
Pushed a revision that goes the other way on B1, so it needs an explanation rather than just a re-read. B1 landed as asked: relocation moved to Then a second rule landed on top: an exported dependency path is used verbatim and is never copied, because the operator may edit that tree between rounds — the contract So this revision deletes it and keeps only what the original report asked for: Against your points:
The non-blocking points are all moot with the module gone, except the two undocumented env vars: One thing worth pushing back on before approving. This widens the exposure rather than narrowing it: the baseline rounds lose the protection they had, so it goes from 87 of 109 configs on the mount to all of them. The description says so, and names the two changes that actually close it — dropping the |
Description: what and why
materialize_config_with_envsownsbenchmark.inferencex_pathfor all three of itscallers, but only
baselinepassed the argument. It handed in a copy of the checkoutit had made on local disk;
exploreandintegrate_patchfell through to$INFERENCEX_PATH. In the reported session that is 87 of 109 materialized configsnaming the network checkout and 22 naming a mirror nobody else could see, interleaved
inside a single coordinator process — 11:10 baseline local, 11:39 integrate_patch NFS,
11:47 baseline local. Which tree a round benchmarks from had stopped being a property
of the session and become a property of the executor.
This deletes the copy, rather than teaching the other two callers to make one.
An exported
$INFERENCEX_PATHis the operator's tree. They may edit it betweenrounds, and a copy taken once would go on serving the contents it had then without
ever saying so. That is the contract
session.paths.resolve_dep_diralready givesMagpie and TraceLens: an exported path wins verbatim, anything else resolves under the
cache root.
baselinewas the one caller that did not honour it.It also would not have helped. The deployment that produced the ESTALE failure exports
INFERENCEX_PATHfromHyperloom-dev/.env, so under that contract nothing downstreammay relocate that tree — a session-level relocation would never have fired for the
session the report came from.
What this costs, and why it is still the right shape
Every round now reads whatever
$INFERENCEX_PATHnames. Where that is a revocablemount, the baseline rounds lose the protection they had, so the exposure goes from 87
of 109 configs to all of them until the two fixes below land.
So preflight records it instead of working around it. A checkout on a network
filesystem warns once and lands in the install ledger as
network_fs. That is whattells the next
magpie_nonzero_after_valid_measurementapart from a variant thatgenuinely cannot serve — last time it was diagnosable only because the flap happened
to kill the shell:
Removing the mirror removes the only reader of
INFERENCE_OPTIMIZER_DISABLE_LOCAL_INFERENCEXandINFERENCE_OPTIMIZER_LOCAL_INFERENCEX_ROOT. Both were undocumented; they are now gonerather than newly documented.
The two changes that do close the exposure — neither belongs here
Both are path resolution, not executor behaviour, and both are follow-ups:
Hyperloom-dev/.envpinsINFERENCEX_PATHat/shared_nfs/zgong/Hyperloom/.cache/InferenceX@3d55815…, a checkout under adifferent Hyperloom clone.
Hyperloom-dev/.cache/InferenceX@3d55815…exists atthe same SHA, so the pin buys nothing while making every session in the workspace
depend on a path another clone's installer may re-clone underneath it. Deleting the
line is a deployment change.
deps_cache_root()defaults to$REPO_ROOT/.cache, so Hyperloom's own dependencycheckouts follow the repo onto whatever filesystem it lives on. Putting that root
on local disk is what makes "the resolved checkout is on a network mount"
impossible rather than merely reported — and it applies to GEAK and TraceLens too,
so it wants its own PR and a decision about multi-node sharing.
Linked issue(s)
Follows 4 June-9 June run analysis #523 (the cuda-graph dump that motivated the original baseline-only mirror)
and Profiling Fix: InferenceX in HyperLoom #210 (the
MAGPIE_INFERENCEX_PATHpin). Filed from an internal run analysis ofGLM-5.3-Quark-MXFP4-AttnFP8_20260908T111000Z_3e95db1e.Tests: added/updated? commands run?
Updated. The 7 tests covering
_ensure_local_inferencexgo with it. One added, in thesame source-inspection style as its neighbours, for the ledger field that replaces it.
Breaking changes: no
Behavioural change for a deployment whose
$INFERENCEX_PATHis on a network mount:baseline rounds now run from it directly, with a warning, as the other executors
already did.
PR addresses single concern: yes
Which InferenceX checkout a round benchmarks from is the session's to decide, not the
executor's.
Root cause is upstream: no
Hyperloom-side path resolution. See the two follow-ups above.