feat(slurm): uv env prefetch + conda→uv for ephys jobs#97
Open
tabedzki wants to merge 1 commit into
Open
Conversation
…ephys generator Compute nodes have no network, so packages must be present before sbatch. The submitter already SSHes to the head node, so sync the uv env there first: - prefetch_uv_env(): on the head node (which has network), run `uv python install 3.14 && uv sync --locked` before sbatch, reusing the existing ssh connection and mirroring the on-spock local-run branch. Raises so a dependency problem surfaces at submit time, not minutes later on a node. Gated to the BrainCogsEphysSorters repo; imaging is untouched. - Dispatch ephys (process_repository == BrainCogsEphysSorters) to the previously dead generate_slurm_spockmk2_ephys; imaging spock keeps generate_slurm_spock on conda. - generate_slurm_spockmk2_ephys: replace conda with `uv sync --frozen --offline` + `uv run --frozen --offline`; keep `module load matlab` for the KS2/KS3 shell-outs; add --cpus-per-task=8 (DREDge peak detection is the CPU-parallel bottleneck) and --time=16:00:00. Also fix a pre-existing bug where `source ~/.bashrc` was concatenated onto the first #SBATCH line and swallowed it. Companion to BrainCOGS/BrainCogsEphysSorters#5 (DREDge) and the uv migration. Closes #94 Closes #54
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.
🤖 AI text below 🤖
Summary
Wires DREDge/uv support into the orchestration layer. Companion to BrainCOGS/BrainCogsEphysSorters#5 (DREDge motion correction) and BrainCOGS/BrainCogsEphysSorters#4.
Compute nodes have no network, so all packages must be present before
sbatch. The submitter already SSHes to the head node, so we sync the uv environment there first, then the job runs fully offline.Changes (
u19_pipeline/automatic_job/slurm_creator.py)prefetch_uv_env()— on the head node (which has network), runsuv python install 3.14 && uv sync --lockedbeforesbatch, reusing the existing ssh connection and mirroring the on-spock local-run branch. Raises so a dependency problem surfaces at submit time rather than minutes later on a compute node. Gated to theBrainCogsEphysSortersrepo — imaging is untouched.process_repository == BrainCogsEphysSorters) to the previously-deadgenerate_slurm_spockmk2_ephys; imaging spock keepsgenerate_slurm_spockon conda.generate_slurm_spockmk2_ephys— conda replaced withuv sync --frozen --offline+uv run --frozen --offline;module load matlabkept for the KS2/KS3 shell-outs; added--cpus-per-task=8(DREDge peak detection is the CPU-parallel bottleneck) and--time=16:00:00.source ~/.bashrcwas concatenated onto the first#SBATCHline and silently swallowed it; moved into the script body after the directives.Notes
UV_CACHE_DIRis intentionally left unset — uv defaults to~/.cache/uvon the mounted\$HOME, and honors the env var if the account sets one later (e.g./scratch).Closes #94
Closes #54
Relates to #53 (uv migration — this covers the Automation Pipeline / ephys slice)
Relates to BrainCOGS/BrainCogsEphysSorters#5, BrainCOGS/BrainCogsEphysSorters#4
🤖 Generated with Claude Code