run-experiment
यह क्या करती है
यह स्किल आपके प्रोजेक्ट में इस्तेमाल हो रहे कंप्यूट सेटअप पर ट्रेनिंग और प्रयोग जॉब्स शुरू करती है। यह उन शोधकर्ताओं के लिए है जो हर प्लेटफ़ॉर्म को हाथ से सेट किए बिना GPU पर कोड चलाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप स्थानीय GPU या दूरस्थ सर्वर पर ट्रेनिंग जॉब शुरू करना चाहते हों।
- ✓जब आपको Vast.ai या Modal serverless GPU पर प्रयोग चलाना हो।
- ✓जब आप चाहते हों कि रन तभी शुरू हो जब उसका एनवायरनमेंट जाँच लिया गया हो।
Skill का लिंक
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/run-experiment/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे प्रोजेक्ट सेटिंग्स में बताए दूरस्थ GPU सर्वर पर मेरा ट्रेनिंग प्रयोग शुरू कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट सही एनवायरनमेंट, जैसे सर्वर, Vast.ai इंस्टेंस या Modal ऐप, खोजने के लिए आपकी प्रोजेक्ट सेटिंग्स पढ़ता है। फिर वह जॉब शुरू करता है और लंबे रन से पहले जाँचता है कि एनवायरनमेंट काम कर रहा है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Run Experiment
Deploy and run ML experiment: $ARGUMENTS
Workflow
Step 1: Detect Environment
Read the project's CLAUDE.md to determine the experiment environment:
- Local GPU (
gpu: local): Look for local CUDA/MPS setup info - Remote server (
gpu: remote): Look for SSH alias, conda env, code directory - Vast.ai (
gpu: vast): Check forvast-instances.jsonat project root — if a running instance exists, use it. Also checkCLAUDE.mdfor a## Vast.aisection. - Modal (
gpu: modal): Serverless GPU via Modal. No SSH, no Docker, auto scale-to-zero. Delegate to/serverless-modal.
Modal detection: If CLAUDE.md has gpu: modal or a ## Modal section, the entire deployment is handled by /serverless-modal. Jump to Step 4: Deploy (Modal) — Steps 2-3 are not needed (Modal handles code sync and GPU allocation automatically).
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).
Vast.ai detection priority:
- If
CLAUDE.mdhasgpu: vastor a## Vast.aisection:- If
vast-instances.jsonexists and has a running instance → use that instance - If no running instance → call
/vast-gpu provisionwhich analyzes the task, presents cost-optimized GPU options, and rents the user's choice
- If
- If no server info is found in
CLAUDE.md, ask the user.
Step 2: Pre-flight Check
Check GPU availability on the target machine:
Remote (SSH):
ssh <server> nvidia-smi --query-gpu=index,memory.used,memory.total --format=csv,noheader
Remote (Vast.ai):
ssh -p <PORT> root@<HOST> nvidia-smi --query-gpu=index,memory.used,memory.total --format=csv,noheader
(Read ssh_host and ssh_port from vast-instances.json, or run vastai ssh-url <INSTANCE_ID> which returns ssh://root@HOST:PORT)
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 CLAUDE.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 CLAUDE.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
Sync code to the vast.ai instance (always rsync, code dir is /workspace/project/):
rsync -avz -e "ssh -p <PORT>" \
--include='*.py' --include='*.yaml' --include='*.yml' --include='*.json' \
--include='*.txt' --include='*.sh' --include='*/' \
--exclude='*.pt' --exclude='*.pth' --exclude='*.ckpt' \
--exclude='__pycache__' --exclude='.git' --exclude='data/' \
--exclude='wandb/' --exclude='outputs/' \
./ root@<HOST>:/workspace/project/
Install dependencies per the env contract (ordered phases — pins first, one
pip install per phase; see ../shared-references/compute-env-contract.md):
ssh -p <PORT> root@<HOST> "pip install -q torch==<pinned>" # phase 1: pins
ssh -p <PORT> root@<HOST> "pip install -q <remaining packages>" # phase 2+
Legacy fallback — requirements.txt only, no env spec: install as one phase,
and treat any version fight as the signal to convert to ordered phases:
scp -P <PORT> requirements.txt root@<HOST>:/workspace/
ssh -p <PORT> root@<HOST> "pip install -q -r /workspace/requirements.txt"
Step 3.5: W&B Integration (when wandb: true in CLAUDE.md)
**Skip this step entirely if wandb is not set o
अक्सर पूछे जाने वाले सवाल
इसे कैसे पता चलता है कि कौन-सा GPU इस्तेमाल करना है?
यह आपकी प्रोजेक्ट नोट्स में एनवायरनमेंट सेटिंग पढ़ती है, जैसे लोकल, दूरस्थ, Vast.ai या Modal।
क्या यह पहले एनवायरनमेंट जाँचती है?
हाँ। स्किल कहती है कि लंबे जॉब पर भरोसा करने से पहले एनवायरनमेंट रिकॉर्ड जाँचें और एक सरल टेस्ट चलाएँ।
Modal के बारे में क्या?
Modal जॉब्स serverless Modal स्किल को सौंपे जाते हैं, जो डिप्लॉयमेंट अपने-आप संभालती है।
जानकारी
लेखक का मूल विवरण
Deploy and run ML experiments on local, remote, Vast.ai, or Modal serverless GPU. Use when user says "run experiment", "deploy to server", "跑实验", or needs to launch training jobs.
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10589
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
ablation-planner
18kआपके एजेंट को किसी शोधपत्र के लिए ablation अध्ययन की योजना बनाने में मदद करती है, मुख्य परिणाम अच्छे दिखने पर समीक्षकों द्वारा माँगे जाने वाले परीक्षण चुनते हुए।
alphaxiv
18kआपके एजेंट को AlphaXiv सार से एक शोधपत्र जल्दी पढ़ने देती है, पूरे पाठ या LaTeX स्रोत को बैकअप के रूप में रखकर, arXiv लिंक या ID से।
analyze-results
18kआपके एजेंट को मशीन लर्निंग प्रयोगों के परिणामों का विश्लेषण करने देती है, रनों की तुलना आधार रेखा से करती है, और आँकड़ों को स्पष्ट निष्कर्षों और अगले कदमों में बदलती है।
arxiv
18kआपके एजेंट को arXiv पर शैक्षणिक शोधपत्र खोजने, उनका विवरण पढ़ने, और किसी शोध विषय के लिए PDF आपकी लाइब्रेरी में सहेजने देती है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।