Repository navigation
feat(hpc): hpc/sync submit passes --time, --no-requeue and env vars, logged - #72
Merged
Merged
Conversation
…logged `hpc/sync submit` now takes allow-listed sbatch overrides (--time, --no-requeue, --mem, --array, alongside --dependency) and repeatable --env NAME=VALUE, which is exported in the login-node shell before sbatch so the job sees it. Every submit and cancel appends the AUTONOMY.md "Scheduler actions" JSON line to campaign/<name>/actions.log on RAL (--campaign, $CAMPAIGN, else adhoc), refusing to act if the log cannot be written. --dry-run prints the remote command. Unknown options are refused instead of being read as the script name. A phase-4 timing resubmit (24 h, no requeue, XLA eigen workaround) is now one hpc/sync command, with no PYAUTO_SKIP_SCHEDULER_GUARD exception. Closes #71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d and log-line build Review findings on #71: --env SBATCH_PARTITION=gpu would get round the allow-list; an append failing after the pre-check left the submit unrecorded with exit 0; a failed json_list inside the argument list escaped set -e. Co-Authored-By: Claude Opus 5.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.
Summary
hpc/sync submitcan now carry what a likelihood-lifecycle phase-4 timing resubmit needs, so it no longer has to go through a rawsbatchunderPYAUTO_SKIP_SCHEDULER_GUARD=1(414362, 414392, 414639–414641 all did):--time,--no-requeue,--mem,--array(beside the existing--dependency), each checked against SLURM's own format, in--flag valueor--flag=valueform;--env NAME=VALUE, exported (shell-quoted) in the login-node shell beforesbatch, so sbatch's default--export=ALLcarries it into the job;--envrefuses names that sbatch or the shell reads itself (SBATCH_*,SLURM_*,SALLOC_*,SRUN_*,LD_*,PATH,BASH_ENV,ENV,IFS), so the partition cannot be changed that way;submitandcancelappends the AUTONOMY.md "Scheduler actions" JSON line{utc, user, campaign, action, args, exit}tocampaign/<name>/actions.logon RAL (--campaign, else$CAMPAIGN, elseadhoc) and prints it; if the log cannot be written nothing is done;exitis sbatch's own code;--dry-runprints the exact remote command and touches nothing.hpc/sync submit --cpu --campaign p4_validation --time 24:00:00 --no-requeue \ --env XLA_FLAGS=--xla_cpu_multi_thread_eigen=false \ submit_p4_validation_mge_hst_jax_cpu_denseCloses #71. Mind prompt:
active/hpc_sync_submit_pass_time_requeue_env.md(epic likelihood-lifecycle, phase 4).effective level: supervised; merge mode: human /prm
Decision taken (decide-and-flag)
--no-requeueforp4_validation/timing submits and a generator-side eigen flag inscripts/misc/campaigns/validation_p4.py. This PR leaves the generator alone and makes both flags per-submit choices; a generator default changes every generatedsubmit_p4_*file and its--checktest, which belongs in its own task. Say if you want it folded in here instead.ssh(runs the remote line in local bash) and stubsbatch.Validation
python -m pytest -q -n 4 scripts/misc/test/test_hpc_sync_submit.py→ 30 passed.ruff check ./ruff format --check .clean.argv == ["--time=24:00:00", "--no-requeue", "submit_p4_validation_mge_hst_jax_cpu_dense"],XLA_FLAGS == "--xla_cpu_multi_thread_eigen=false", run fromhpc/batch_cpu/, with onep4_validationactions.log line,exit: 0.scheduler_action_guard.check_commandon thehpc/sync submit …line: ALLOWED with no skip variable; on the old rawssh … sbatch …form: refused.pyauto-heart smoke --targeted— "no curated script references the change and no own workspace to import-check"; nothing to run.--env SBATCH_PARTITION=gpugot round the allow-list; a log append that failed after the pre-check went unreported; a failed log-line build slipped pastset -e. All three are fixed in ec96d96, each with a test. The re-review returned CLEAN.🤖 Generated with Claude Code