Skip to content

Training Runs

A training run executes an RL training loop on cloud GPUs using Isaac Sim. You provide a GitHub repo with a gym environment, Canard clones it onto a GPU worker, trains, and uploads results.

Basic Training Run

from canard import Client

client = Client(api_url="https://api.canard.cloud")

run = client.submit_training_run(
    name="go2-standing-v1",
    task_name="Template-Go2-Standing-Direct-v0",
    code_url="https://github.com/canard-cloud/go2-standing-env",
    num_envs=4096,
    max_iterations=5000,
    gpu_count=2,
)

Parameters

Parameter Type Default Description
name str required Human-readable run name
task_name str Template-G1-Training-Direct-v0 Gym environment ID
code_url str required GitHub repo with your environment
code_ref str None Branch, tag, or commit (default: repo default branch)
num_envs int 1000 Parallel environments per GPU
max_iterations int 1500 Training iterations
gpu_count int 2 Number of GPUs (1, 2, or 4)
enable_video bool False Record training videos
video_interval int 2000 Steps between video recordings
seed int None Random seed for reproducibility
checkpoint_url str None S3 URL to resume training from
wait bool False Block until completion

Choosing num_envs

More environments = more physics work per iteration = faster convergence but longer per-step time.

GPU Recommended num_envs Reason
RTX 4090 (24GB) 4096 Fills VRAM without OOM
RTX 5090 (32GB) 8192 3.5x throughput vs 4090

Choosing gpu_count

Multi-GPU provides near-linear speedup for Isaac Sim (physics is embarrassingly parallel).

GPUs Speedup Hourly Rate Best For
1 1.0x ~$0.50/hr Prototyping, debugging
2 1.7x ~$1.00/hr Research (default)
4 2.9x ~$2.00/hr Sweeps, deadlines

PPO Hyperparameters

Pass PPO hyperparameters directly:

run = client.submit_training_run(
    name="custom-ppo",
    task_name="Template-Go2-Standing-Direct-v0",
    code_url="https://github.com/canard-cloud/go2-standing-env",
    num_envs=4096,
    max_iterations=5000,
    gpu_count=2,
    learning_rate=3e-4,
    clip_param=0.2,
    entropy_coef=0.01,
    gamma=0.99,
    desired_kl=0.01,
)

See TrainingConfig for all available hyperparameters.

Resume from Checkpoint

run = client.submit_training_run(
    name="go2-continued",
    task_name="Template-Go2-Standing-Direct-v0",
    code_url="https://github.com/canard-cloud/go2-standing-env",
    checkpoint_url="s3://isaac-sim-results/runs/run_a1b2c3d4/checkpoints/model_5000.pt",
    max_iterations=10000,
    gpu_count=2,
)

Monitor and Download

# Wait with live progress bar
run.wait_for_completion(show_progress=True)

# Check metrics
metrics = run.get_metrics()
print(f"Final reward: {metrics.training.mean_reward:.2f}")

# Download best checkpoint
run.download_best_checkpoint("./checkpoints")

Fault Tolerance

If a spot GPU instance is preempted mid-training:

  1. The task is marked as failed on that worker
  2. The task re-enters the queue
  3. Another worker picks it up and restarts

You don't need to handle this — it's automatic.