Langsung ke konten
Skillpedia
Machine learning18k ยท #10589

run-experiment

Fungsinya

Skill ini meluncurkan pekerjaan pelatihan dan eksperimen di setup komputasi yang dipakai proyek Anda. Skill ini untuk peneliti yang ingin menjalankan kode di GPU tanpa menyiapkan setiap platform secara manual.

Kapan dipakai

  • โœ“Saat Anda ingin memulai pekerjaan pelatihan di GPU lokal atau server jarak jauh.
  • โœ“Saat Anda perlu menjalankan eksperimen di Vast.ai atau Modal serverless GPU.
  • โœ“Saat Anda ingin pekerjaan diluncurkan hanya setelah lingkungannya diperiksa.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/run-experiment/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya perlu eksperimen pelatihan saya diluncurkan di server GPU jarak jauh yang didefinisikan dalam pengaturan proyek saya.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membaca pengaturan proyek untuk menemukan lingkungan yang tepat, seperti server, instans Vast.ai, atau aplikasi Modal. Lalu agent memulai pekerjaan dan memeriksa bahwa lingkungan berfungsi sebelum proses panjang.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 for vast-instances.json at project root โ€” if a running instance exists, use it. Also check CLAUDE.md for a ## Vast.ai section.
  • 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:

  1. If CLAUDE.md has gpu: vast or a ## Vast.ai section:
    • If vast-instances.json exists and has a running instance โ†’ use that instance
    • If no running instance โ†’ call /vast-gpu provision which analyzes the task, presents cost-optimized GPU options, and rents the user's choice
  2. 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

Pertanyaan umum

Bagaimana skill tahu GPU mana yang dipakai?

Skill membaca pengaturan lingkungan di catatan proyek Anda, seperti lokal, jarak jauh, Vast.ai, atau Modal.

Apakah skill memeriksa lingkungan dulu?

Ya. Skill menyatakan untuk memeriksa catatan lingkungan dan menjalankan tes sederhana sebelum mempercayai proses panjang.

Bagaimana dengan Modal?

Pekerjaan Modal diserahkan ke skill Modal serverless, yang menangani deployment secara otomatis.

Detail

Deskripsi asli dari pembuat

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.

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

Popularitas

Bintang GitHub
18k
Peringkat
#10589
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa