run-experiment

Deploy and run ML experiments on local, remote, Vast.ai, or Modal GPU environments.

75|7|Updated May 2, 2026
One-click install
npx skills add https://github.com/zjunlp/Mechanist --skill run-experiment-zjunlp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-experiment
Source: https://github.com/zjunlp/Mechanist/tree/main/skills/run-experiment
Command: npx skills add https://github.com/zjunlp/Mechanist --skill run-experiment-zjunlp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Launching ML training jobs across heterogeneous GPU environments (local machines, SSH servers, Vast.ai rentals, Modal serverless) requires repetitive manual work: checking GPU availability, syncing code, managing screen sessions, and tracking costs. This Skill automates that entire deployment workflow from a single experiment description. ## Core Features & Use Cases - Multi-Environment Deployment: Detects the target environment from the project's CLAUDE.md and deploys to local CUDA/MPS, remote SSH servers, Vast.ai instances, or Modal serverless GPUs. - Code Sync & Launch: Syncs code via rsync or git, launches experiments in dedicated screen sessions with GPU binding, and tees logs for inspection. - Cost & Lifecycle Management: Writes a canonical cost.json manifest per run, auto-destroys Vast.ai instances after completion, and optionally injects W&B logging into training scripts. - Use Case: A researcher with a PyTorch training script sets gpu: vast in CLAUDE.md, then asks to run the experiment — the Skill provisions a cost-optimized GPU, syncs code, runs training, downloads results, and destroys the instance to stop billing. ## Quick Start Tell the agent to run your training script as an experiment, for example: run my train.py experiment on the remote GPU server with seed 42.

Frequently Asked Questions about run-experiment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a training script on a remote GPU server?

Add your SSH alias, conda environment, and code directory to the project's CLAUDE.md with `gpu: remote`, then invoke the run-experiment workflow. It checks GPU availability with nvidia-smi, syncs code via rsync, and launches the script in a screen session with CUDA_VISIBLE_DEVICES binding.

How do I run ML experiments on Vast.ai rented GPUs?

Set `gpu: vast` in CLAUDE.md after installing the vastai CLI and setting your API key. The workflow provisions a cost-optimized instance, syncs code to /workspace/project/, runs the experiment, downloads results, and auto-destroys the instance when auto_destroy is true.

Can I run experiments on Modal serverless GPUs instead of SSH servers?

Yes, set `gpu: modal` in CLAUDE.md and the deployment delegates to the serverless-modal workflow. Modal handles code sync and GPU allocation automatically, so no SSH, screen sessions, or manual cleanup are needed, and billing scales to zero when idle.

Does the experiment runner support Weights & Biases logging?

Yes, when `wandb: true` is set in CLAUDE.md, the workflow checks training scripts for existing wandb usage and injects wandb.init and wandb.log calls for training loss, eval metrics, GPU memory, and throughput. Project name and entity are read from CLAUDE.md.

How do I run multiple experiments in parallel on different GPUs?

The workflow launches each experiment in its own screen session or background process bound to a different GPU via CUDA_VISIBLE_DEVICES. For local parallel runs it uses nohup with shell wait, and each run gets its own runs/<run-id>/cost.json manifest.

Why does the Vast.ai instance keep billing after my experiment finishes?

Billing continues until the instance is explicitly destroyed. Set `auto_destroy: true` in CLAUDE.md so the workflow downloads results and logs, runs vastai destroy instance, and updates vast-instances.json automatically after completion.