본문으로 건너뛰기
Skillpedia
머신러닝18k · #10535

experiment-queue

하는 일

이 스킬은 SSH로 원격 GPU 서버의 많은 머신러닝 작업을 관리합니다. 여러 시드나 설정을 돌리면서 계속 확인하지 않고도 끝나기를 원하는 연구자를 위한 스킬입니다.

사용하는 경우

  • ✓묶음 단위로 실행해야 하는 실험 작업이 열 개 이상 있을 때.
  • ✓원격 GPU에서 여러 설정에 걸쳐 다중 시드 스윕을 돌리고 싶을 때.
  • ✓일부 실행이 메모리 한도로 실패해 자동으로 다시 시도해야 할 때.

스킬 링크

https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/experiment-queue/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/experiment-queue/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“21개 시드로 된 제 실험 격자를 원격 GPU 서버에 대기열로 올려 주세요. 메모리 부족으로 실패한 실행은 다시 시도해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 서버에 백그라운드 스케줄러를 설정합니다. 이 스케줄러는 각 작업을 추적하고, 의존성을 기다리고, 메모리 부족 실패를 다시 시도한 뒤 다음 묶음으로 넘어갑니다. 요청하면 진행 상황을 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Experiment Queue

⏱ External cadence: visibility only. This skill already runs its own detached server-side scheduler (60s poll + depends_on + wave transitions). Use its status output for overnight visibility (N done / N running / N pending); do not wrap it in a second /loop / CronCreate poll — that duplicates the scheduler on an uncoordinated clock and races the wave-transition logic it was built to prevent. See shared-references/external-cadence.md ("don't duplicate an existing scheduler").

Orchestrate large batches of ML experiments on SSH remote GPU servers with proper state tracking, OOM retry, stale cleanup, and wave transitions.

When to Use This Skill

Use when /run-experiment is insufficient:

  • ≥10 jobs that need batching across GPUs
  • Multi-seed sweeps (e.g., 21 seeds × 12 cells)
  • Wave transitions (run wave 1, wait, run wave 2, wait, run wave 3...)
  • Teacher+student chains (train teacher then distill; auto-trigger student after teacher done)
  • OOM-prone configs where you need to retry with different GPU or wait
  • Mixed seed grids where failed cells need re-running

Do NOT use for:

  • Single ad-hoc experiment (use /run-experiment)
  • Modal/Vast.ai deployments (those have their own orchestration)
  • Experiments that need manual inspection between runs

Why This Exists

Based on session audit (2026-04-16), the major wall-clock sinks in multi-seed grid experiments are:

  1. Stale screens — python finishes, wandb uploads, screen hangs, next wave blocked
  2. OOM on shared GPU — previous job's memory not yet released
  3. Wave race — new wave launches before previous wave fully settles
  4. Missing checkpoints — student launches before teacher saved
  5. Parser duplication — rewriting multi-seed analysis python every batch

All of these are pure engineering friction that can be orchestrated.

Core Concepts

Environment contract: queue jobs assume the target env is already built and validated per ../shared-references/compute-env-contract.md (spec-hash ledger + kernel witness). A wave of jobs dying at import time = the env contract was skipped, not a queue bug; check the provider's .aris/compute/<provider>.md ledger before re-queueing.

Job Manifest

A manifest lists jobs with explicit state:

project: my_grid_experiment
cwd: /home/user/your_project
conda: my_env
# Optional: override conda hook path if conda is not at a standard location.
# Can be a bare path (wrapped automatically) or a full `eval "$(... shell.bash hook)"` string.
# Falls back to auto-detect of ~/anaconda3, ~/miniconda3, /opt/anaconda3, etc.,
# or the ARIS_CONDA_HOOK environment variable.
# conda_hook: /custom/path/to/conda
ssh: gpu-server
default_cmd: >
  python run_distill.py --backbone softmax --lam 0.5
  --K 500 --L 96 --W 16 --n_steps 30000 --batch_size 128 --lr 1e-4

preconditions:
  - type: checkpoint_exists
    path: checkpoints/transformer/teacher_L96_K500_N{N}.pt

gpus: [0, 1, 2, 3, 4, 5, 6, 7]
max_parallel: 8
gpu_free_threshold_mib: 500  # optional, default 500; raise for shared servers, lower for tight packing
oom_retry:
  delay: 120
  max_attempts: 3

jobs:
  - id: s200_N64_n50K
    args: {seed: 200, n_hidden: 64, n_train_subset: 50000, subset_seed: 2024}
  - id: s200_N128_n50K
    args: {seed: 200, n_hidden: 128, n_train_subset: 50000, subset_seed: 2024}
  # ... 14 more

Job State Machine

pending → running → completed
                 ↘ failed_oom → pending (after delay) [retry up to N]
                 ↘ failed_other → stuck (needs manual inspection)
stale screen (process gone, screen lingering) → failed_other → stuck

Operator note on stuck (the agent's move, not the queue's): the queue deterministically parks failed_other jobs as stuck — that part is code and unchanged. Before handing a stuck batch to the human, the OPERATING AGENT should check: if the same failure repeats across jobs, try ONE clean reimplement of the agent-generated wrapper/attempt script only — never user/project source (run_*.py you didn't write), the manifest, queue state, logs, or results (see shared-references/external-cadence.md § Let a broken attempt restart, not just patch). Reserve the human handoff for contract/environment doubts, not merely broken attempt code.

Wave Orchestration

A "wave" is a batch of jobs that fit available GPUs. Next w

자주 묻는 질문

언제 쓰지 말아야 하나요?

단발성 실험 하나에는 더 간단한 run-experiment 스킬이면 충분합니다. Modal이나 Vast.ai 작업용도 아닙니다.

실행 중에도 진행 상황을 볼 수 있나요?

네. 상태 출력에 완료, 실행 중, 대기 중인 작업 수가 나옵니다.

타이머를 설정해야 하나요?

아니요. 스킬이 이미 자체 스케줄러를 실행하므로, 두 번째 타이머는 중복입니다.

상세 정보

작성자의 원본 설명

SSH job queue for multi-seed/multi-config ML experiments with OOM-aware retry, stale-screen cleanup, and wave-transition race prevention. Use when user says "batch experiments", "队列实验", "run grid", "multi-seed sweep", "auto-chain experiments", or when /run-experiment is insufficient for 10+ jobs that need orchestration.

repo: wanshuiyin/Auto-claude-code-research-in-sleep

인기도

GitHub 스타
18k
순위
#10535
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬