experiment-queue
Skill này làm gì
Skill này quản lý các nhóm công việc học máy lớn trên máy chủ GPU từ xa qua SSH. Dành cho nhà nghiên cứu chạy nhiều seed hoặc cài đặt và cần chúng hoàn thành mà không phải kiểm tra liên tục.
Khi nào nên dùng
- ✓Khi bạn có mười công việc thí nghiệm trở lên cần chạy theo lô.
- ✓Khi bạn muốn một lưới quét nhiều seed qua nhiều cài đặt trên GPU từ xa.
- ✓Khi một số lần chạy thất bại do giới hạn bộ nhớ và cần được thử lại tự động.
Liên kết skill
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/experiment-queue/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi cần lưới thí nghiệm 21 seed của mình được xếp hàng trên máy chủ GPU từ xa, với các lần chạy hết bộ nhớ được thử lại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thiết lập một bộ lập lịch nền trên máy chủ, theo dõi từng công việc, đợi các phụ thuộc, thử lại các lỗi hết bộ nhớ và chuyển sang đợt kế tiếp. Nó báo cáo tiến độ khi bạn yêu cầu.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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/CronCreatepoll — that duplicates the scheduler on an uncoordinated clock and races the wave-transition logic it was built to prevent. Seeshared-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:
- Stale screens — python finishes, wandb uploads, screen hangs, next wave blocked
- OOM on shared GPU — previous job's memory not yet released
- Wave race — new wave launches before previous wave fully settles
- Missing checkpoints — student launches before teacher saved
- 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>.mdledger 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 parksfailed_otherjobs asstuck— that part is code and unchanged. Before handing astuckbatch 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_*.pyyou didn't write), the manifest, queue state, logs, or results (seeshared-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
Câu hỏi thường gặp
Khi nào không nên dùng nó?
Với một thí nghiệm đơn lẻ, skill chạy thí nghiệm đơn giản hơn là đủ. Nó cũng không dành cho các công việc trên Modal hoặc Vast.ai.
Tôi có thể kiểm tra tiến độ khi nó chạy không?
Có. Đầu ra trạng thái cho biết bao nhiêu công việc đã xong, đang chạy và đang chờ.
Tôi có cần đặt bộ hẹn giờ không?
Không. Skill đã chạy bộ lập lịch riêng, nên bộ hẹn giờ thứ hai sẽ trùng lặp.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10535
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
ablation-planner
18kGiúp agent của bạn lên kế hoạch thí nghiệm ablation cho một bài báo, chọn các thí nghiệm mà người phản biện có khả năng yêu cầu khi kết quả chính đã ổn.
alphaxiv
18kCho phép agent của bạn đọc nhanh một bài báo nghiên cứu bằng các bản tóm tắt AlphaXiv, với toàn văn hoặc mã LaTeX dự phòng, từ liên kết arXiv hoặc ID.
analyze-results
18kGiúp agent của bạn phân tích kết quả thí nghiệm học máy, so sánh các lần chạy với một baseline, và biến các con số thành phát hiện rõ ràng và bước tiếp theo.
arxiv
18kCho phép agent của bạn tìm bài báo trên arXiv, đọc chi tiết của chúng và lưu PDF vào thư viện của bạn theo một chủ đề nghiên cứu.
Skill tương tự
pytorch-patterns
280kGiúp agent của bạn dùng PyTorch cho các mô hình học máy. Áp dụng thực hành tốt nhất để huấn luyện mô hình hiệu quả và đảm bảo kết quả có thể lặp lại.
evm-token-decimals
280kGiúp agent tránh lỗi về số thập phân khi làm việc với các mạng blockchain khác nhau. Đảm bảo giá trị token chính xác trong giao dịch và phép tính.
ito-inference
280kGiúp agent kiểm tra xem các mô hình AI đã sẵn sàng để dùng chưa. Kết nối yêu cầu tài nguyên tính toán với dịch vụ mô hình đã sẵn sàng.