Non-agentic evals: parameterize evalchemy sbatch paths by $USER - #85
Open
mrinal-bespoke wants to merge 5 commits into
Open
Non-agentic evals: parameterize evalchemy sbatch paths by $USER#85mrinal-bespoke wants to merge 5 commits into
mrinal-bespoke wants to merge 5 commits into
Conversation
…ed runtime falls back) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… prior commit) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…st the miniforge3 root Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The --output paths are now $USER-scoped via SLURM's %u. That is correct, but
SLURM opens the log file BEFORE the job script runs and does not create
intermediate directories, so a new operator whose
/leonardo_work/AIFAC_5C0_290/$USER/experiments/delphi-eval/ does not exist yet
gets an instant job failure ('Unable to open file') that reads like a launch bug
rather than a missing mkdir.
The job script cannot self-heal this -- its own mkdir -p runs far too late. So
document the one-time setup inline, next to the path it applies to, including
the qwen3-baseline subdirectory that only that sbatch needs.
No behaviour change: comments only. Byte-identical for the original operator,
whose directories already exist.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…l checkout Review catch (P2). _OTA_REPO defaulted to $WORK/$USER/code/OpenThoughts-Agent, which only holds for operators who cloned at exactly that path. Anyone else fell through to the BASH_SOURCE branch — which under SLURM is the /var/spool/slurmd/jobNNN/ copy — so it re-created the very ExitCode-127 'No such file or directory' that the comment three lines above says this block exists to prevent. The blast radius was wider than the exec target. _OTA_REPO also feeds CHAT_TEMPLATE_OVERRIDE (delphi_eval) and THINK_TEMPLATE (delphi_rl_think_eval), so a noncanonical checkout silently pointed lm-eval at a missing chat template instead of reporting that the repo was not found. Resolve by PROBING for a marker file (eval/evalchemy/evalchemy_eval.sbatch), taking the first candidate that actually contains it: 1. OTAGENT_REPO_DIR explicit override 2. $WORK/$USER/code/... canonical per-user checkout 3. SLURM_SUBMIT_DIR + parents where the operator actually ran sbatch 4. shared bfeuer00 checkout same borrow pattern as conda/evalchemy-marin 5. script dir + parents interactive / non-SLURM only Walking up from SLURM_SUBMIT_DIR matters because operators typically submit from a subdirectory of the repo, not its root. If nothing matches, fail LOUDLY listing every candidate tried, instead of exec'ing a nonexistent path and leaving a bare 127. Unchanged for the original operator: candidate 2 hits first when USER=bfeuer00. Verified: canonical operator, noncanonical checkout via SLURM_SUBMIT_DIR, noncanonical with only the spool dir (falls back to shared), explicit override, and the nothing-found path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The four evalchemy sbatch scripts hardcode
/leonardo_work/AIFAC_5C0_290/bfeuer00/...for every path — conda root, the evalchemy-marin clone, nltk data, HF cache, JIT
caches, and the output root. A second operator cannot run a non-agentic eval at all.
Change
Split paths by whether they are read-only shared runtime or per-user writable:
submitter's own copy if present, else fall back to the shared
bfeuer00one. A newoperator does not have to duplicate a ~20 GB conda env to run an eval.
HF_HOME/HF_HUB_CACHE,CACHE_ROOT,OUT_ROOT) — always per-user.#SBATCH --outputuses SLURM's%u.Each is
${VAR:-<default>}, so an explicit env var still wins.This is a no-op for the original operator: with
USER=bfeuer00every path resolvesto the same byte-identical string as before.
Notable fixes
Conda fallback must validate the env, not the root. Testing only for a
miniforge3directory is not enough — an operator can have a partial install (e.g.
otagentbut notevalchemy-marin) and would then fail withEnvironmentNameNotFound: evalchemy-marininstead of falling back to the shared root. The check is now for
<root>/envs/evalchemy-marin.--outputdirectories must pre-exist. SLURM opens the log file before the job scriptruns and does not create intermediate directories, so a new operator gets an instant
"Unable to open file" that reads like a launch bug rather than a missing mkdir. The script
cannot self-heal this — its own
mkdir -pruns far too late — so the one-time setup isdocumented inline next to each path.
Reviewer note
With
HF_HUB_OFFLINE=1andHF_HOMEnow per-user, a new operator's cache starts empty,so models will not resolve until they pre-cache or symlink them in. That is inherent to
making the cache writable (one shared HF cache across operators is not safe), and the
symlink workaround is documented in the diff — but it is a genuine behaviour change for a
new user.
Testing
bash -nclean on all four scripts.new operator (shared fallback for runtime, per-user for writable), and partial install
(correctly prefers shared over an incomplete own root).
🤖 Generated with Claude Code