experiment-queue

Orchestrates batched ML experiments on SSH GPU servers with OOM retry and wave scheduling.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/Lingjie-wang/autoRL --skill experiment-queue-lingjie-wang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: experiment-queue
Source: https://github.com/Lingjie-wang/autoRL/tree/main/Auto-claude-code-research-in-sleep/skills/experiment-queue
Command: npx skills add https://github.com/Lingjie-wang/autoRL --skill experiment-queue-lingjie-wang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) components.

What problem does it solve? Running large batches of ML experiments (multi-seed sweeps, grid searches, teacher-student chains) on remote GPU servers is plagued by stale screen sessions, CUDA OOM failures, wave-transition races, and lost state when connections drop. This Skill deploys a detached scheduler that handles all of that orchestration automatically. ## Core Features & Use Cases - Declarative job manifests: Define jobs via YAML manifest, grid spec (Cartesian product expansion), or natural language, with per-phase dependencies (e.g., distill students only after teachers finish). - Automatic failure handling: Detects CUDA OOM from logs and retries with backoff, kills stale screens whose Python process exited, and parks unrecoverable jobs as stuck. - Persistent state and resume: Writes queue_state.json continuously, so a crashed scheduler can be relaunched idempotently without losing progress. - Use Case: You need to run 42 jobs (2 teacher trainings, then 24 distillation runs across 3 seeds and 4 dataset sizes, plus 16 validation runs) across 8 GPUs overnight. The scheduler assigns jobs to free GPUs, retries OOMs, chains the phases, and produces a summary report. ## Quick Start Ask the AI to queue and run your multi-seed experiment grid on your SSH GPU server, for example: "Run N in {64,128,256} x 4 dataset sizes x 3 seeds on gpu-server, with distillation depending on teacher checkpoints."

Frequently Asked Questions about experiment-queue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run multi-seed ML experiments in parallel across multiple GPUs?

Define a grid spec with seeds and hyperparameters, and the scheduler expands it into jobs, assigns each to a free GPU via screen sessions, and polls every 60 seconds. It waits for GPU memory to drop below 500 MiB before launching the next wave.

How to automatically retry CUDA out of memory failures in batch experiments?

The scheduler scans per-job logs for CUDA OOM patterns, marks the job failed_oom, waits a configurable delay (default 120s), then requeues it on a free GPU. After the configured max attempts (default 3), the job is marked stuck for manual review.

When should I use a job queue instead of running experiments one at a time?

Use the queue for 10 or more jobs, multi-seed sweeps, or phased pipelines like teacher-then-student training. For single ad-hoc experiments or five or fewer jobs, a simple single-run launcher is sufficient and less overhead.

Does the experiment scheduler survive SSH disconnects or crashes?

Yes. The scheduler runs as a detached nohup process on the remote host and writes queue_state.json continuously. To resume after a crash, reload the recorded run metadata and relaunch the scheduler; it picks up from the saved state idempotently.

Can I chain dependent experiment phases like teacher training before distillation?

Yes. Add depends_on to a phase in the manifest, and its jobs stay pending until all jobs in the dependency phases complete. Preconditions such as checkpoint file existence can also gate job launches.

Why do stale screen sessions block my next experiment wave?

A screen can remain attached after its Python process exits, blocking GPU reuse. The scheduler detects this by checking both screen existence and process liveness, then kills the stale screen and marks the job completed or failed based on output files.