run-experiment
하는 일
이 Codex 버전의 실험 실행 스킬은 프로젝트가 쓰는 컴퓨팅 환경에서 학습 작업을 시작합니다. Codex에서 GPU로 코드를 돌리고 싶은 연구자를 위한 스킬입니다.
사용하는 경우
- ✓로컬 GPU나 원격 서버에서 학습 작업을 시작하고 싶을 때.
- ✓Vast.ai 또는 Modal에서 실험을 실행해야 할 때.
- ✓긴 실행이 시작되기 전에 환경을 확인하고 싶을 때.
스킬 링크
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/run-experiment/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“프로젝트 노트에 적힌 원격 GPU 서버에서 제 학습 실험을 시작해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 프로젝트 노트를 읽어 환경을 찾고, GPU를 확인한 뒤 작업을 시작합니다. 새 환경이라면 사양을 작성하고, 설정을 믿기 전에 간단한 점검을 실행합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Run Experiment
Deploy and run ML experiment: $ARGUMENTS
Workflow
Step 1: Detect Environment
Read the project's AGENTS.md to determine the experiment environment:
- Local GPU: Look for local CUDA/MPS setup info
- Remote server: Look for SSH alias, conda env, code directory
- Vast.ai instance: Look for
gpu: vast,vast_instance, SSH host/port, remote path, and optionalauto_destroy - Modal serverless: Look for
gpu: modal, app/function name, image/dependency setup, and secrets
If no server info is found in AGENTS.md, ask the user.
Environment contract (../shared-references/compute-env-contract.md): before
building or trusting any environment, read the provider's env ledger
(.aris/compute/<provider>.md) — an unchanged spec hash means warm-reuse, a
changed one means rebuild. New env → write the declarative spec first, render it
for this provider's shape, and never declare it ready on import-success alone:
run the seeded kernel witness, and after any rebuild/doc edit run the
agent-follows-doc pass (a fresh subagent executes the documented invocation
verbatim and reports doc-vs-reality divergence).
Step 2: Pre-flight Check
Check GPU availability on the target machine:
Remote:
ssh <server> nvidia-smi --query-gpu=index,memory.used,memory.total --format=csv,noheader
Local:
nvidia-smi --query-gpu=index,memory.used,memory.total --format=csv,noheader
# or for Mac MPS:
python -c "import torch; print('MPS available:', torch.backends.mps.is_available())"
Free GPU = memory.used < 500 MiB.
Step 3: Sync Code (Remote Only)
Check the project's AGENTS.md for a code_sync setting. If not specified, default to rsync.
Option A: rsync (default)
Only sync necessary files — NOT data, checkpoints, or large files:
rsync -avz --include='*.py' --exclude='*' <local_src>/ <server>:<remote_dst>/
Option B: git (when code_sync: git is set in AGENTS.md)
Push local changes to remote repo, then pull on the server:
# 1. Push from local
git add -A && git commit -m "sync: experiment deployment" && git push
# 2. Pull on server
ssh <server> "cd <remote_dst> && git pull"
Benefits: version-tracked, multi-server sync with one push, no rsync include/exclude rules needed.
Option C: Vast.ai instance
If gpu: vast is configured, treat the Vast.ai machine as a remote server with an explicit lifecycle:
- Verify the instance is running and reachable.
- Sync code to the configured remote path.
- Confirm data/checkpoints are already mounted or intentionally copied.
- Record the instance id in the launch summary for later cleanup.
Do not silently ignore a requested Vast.ai route. If Vast.ai CLI credentials or instance metadata are missing, stop and ask the user to configure them.
Step 3.5: W&B Integration (when wandb: true in AGENTS.md)
Skip this step entirely if wandb is not set or is false in AGENTS.md.
Before deploying, ensure the experiment scripts have W&B logging:
Check if wandb is already in the script — look for
import wandborwandb.init. If present, skip to Step 4.If not present, add W&B logging to the training script:
import wandb wandb.init(project=WANDB_PROJECT, name=EXP_NAME, config={...hyperparams...}) # Inside training loop: wandb.log({"train/loss": loss, "train/lr": lr, "step": step}) # After eval: wandb.log({"eval/loss": eval_loss, "eval/ppl": ppl, "eval/accuracy": acc}) # At end: wandb.finish()Metrics to log (add whichever apply to the experiment):
train/loss— training loss per steptrain/lr— learning rateeval/loss,eval/ppl,eval/accuracy— eval metrics per epochgpu/memory_used— GPU memory (viatorch.cuda.max_memory_allocated())speed/samples_per_sec— throughput- Any custom metrics the experiment already computes
Verify wandb login on the target machine:
ssh <server> "wandb status" # should show logged in # If not logged in: ssh <server> "wandb login <WANDB_API_KEY>"
The W&B project name and API key come from
AGENTS.md(see example below). The experiment name is auto-generated from the script name + timestamp.
Step 4: Deploy
Remote (via SSH + screen)
For each experiment, create a dedicated screen session with GPU binding:
ssh <server> "screen -dmS <exp_name> bash -c '\
eval \"\$(<conda_path>/co
자주 묻는 질문
서버 정보는 어디에서 찾나요?
프로젝트의 AGENTS.md 파일을 읽으며, 서버 정보가 없으면 사용자에게 묻습니다.
먼저 GPU를 확인하나요?
네. 작업을 시작하기 전에 GPU 사용 가능 여부에 대한 사전 점검을 실행합니다.
Modal은 어떻게 다루나요?
스킬 설명대로 Modal은 서버리스 앱과 의존성 설정을 통해 처리됩니다.
상세 정보
작성자의 원본 설명
Deploy and run ML experiments on local or remote GPU servers. Use when user says \"run experiment\", \"deploy to server\", \"\u8dd1\u5b9e\u9a8c\", or needs to launch training jobs.
인기도
- GitHub 스타
- 18k
- 순위
- #10615
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
ablation-planner
18k에이전트가 논문의 제거 실험(ablation)을 계획하도록 돕습니다. 주요 결과가 좋아 보이면 심사위원이 요청할 가능성이 높은 실험을 고릅니다.
alphaxiv
18k에이전트가 arXiv 링크나 ID로 AlphaXiv 요약을 써서 논문 한 편을 빠르게 읽도록 합니다. 요약이 없으면 원문이나 LaTeX를 씁니다.
analyze-results
18k에이전트가 머신러닝 실험 결과를 분석하고, 실행 결과를 기준선과 비교하며, 숫자를 명확한 발견과 다음 단계로 정리하도록 돕습니다.
arxiv
18k에이전트가 arXiv에서 학술 논문을 검색하고, 세부 정보를 읽고, 연구 주제에 맞는 PDF를 내 라이브러리에 저장하도록 돕습니다.