Repository navigation
feat: campaign.yaml, scheduler adapters and the GPU-partition lint (hpc-campaign p2a) - #1741
Merged
Merged
Conversation
…on lint (hpc-campaign p2a, #1740) autofit.campaign: campaign.yaml loader/validator (stages, manifest chunks of at most the site's max_array_size, one-knob --mem-per-cpu resources, per-index dependencies, success checks, propose-only retry policy, the autonerves site layer); the Scheduler protocol with FakeScheduler (tests), LocalScheduler (subprocess pool) and SlurmScheduler (batched sacct/squeue/sinfo through an injectable runner; sbatch with aftercorr, --kill-on-invalid-dep=yes, --mem-per-cpu, --signal=B:USR1@600 forwarded to the fit); the partition lint, enforced on validate, submit and update_pending: CPU-only work never goes on a GPU partition, mixed lists (ral,gpu / gpu,ral) always refused, the timing-leg exemption only for <=8 CPUs, %<=2 and no pending GPU jobs, failing closed when unknown; submit writes a job ledger; python -m autofit.campaign {validate,submit}. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
2 tasks done
Collaborator
Author
|
Full PyAutoFit suite (PyAuto313, local): 2a 4,082 passed / 2b 4,098 passed (2 skipped, 1 xfailed). Smoke |
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
PR 2a of hpc-campaign phase 2 (#1740, epic ledger
draft/research/autofit/hpc_campaign_epic.md). It adds a newautofit/campaign/package (stdlib + PyYAML; nothing calls Slurm at import), its tests, and nothing else.campaign.yamlloader and validator (spec.py):max_array_size;--mem-per-cpuknob;after:dependencies (aftercorr);success:checks;retrypolicy (ruling F5);site:layer from PyAutoNervessite.yaml.Schedulerprotocol with three adapters:FakeScheduler, for tests;LocalScheduler, a subprocess pool;SlurmScheduler: batchedsacct/squeue/sinfothrough an injectable runner, and sbatch withaftercorr,--kill-on-invalid-dep=yes,--mem-per-cpu, and--signal=B:USR1@600forwarded to the fit.lint.py): CPU-only work never goes on a GPU partition. It runs on validate, submit and every pending-job update. The timing-leg exemption needs all three of: ≤8 CPUs per task, a throttle of%2or less, and no pending GPU jobs. If any of those is unknown, it refuses.submitwrites an atomic job ledger.python -m autofit.campaign {validate,submit}.Decisions taken (please check)
ral,gpuandgpu,ralare refused for CPU work even when the exemption conditions hold; the exemption only applies to a GPU partition on its own. This is stricter than the ledger's wording, and safe.sbatchreads them: parsing stops at the first command, so a late#SBATCH --gpuscannot make a CPU job count as a GPU job.CAMPAIGN_INDEX = CAMPAIGN_OFFSET + SLURM_ARRAY_TASK_ID. That keepsaftercorraligned chunk by chunk.squeue/sinfouse classic-oformat strings rather than-O.Test plan
test_autofit/campaign(90 on this branch): spec validation, units, the lint matrix (every branch,ral,gpuandgpu,ralincluded), sacct parsing, Slurm golden sbatch text with an injected runner, submit, local scheduler, CLI, and a subprocess test that nothing runs at import.Refs #1740
🤖 Generated with Claude Code