SkyPilot Workflow: GPT-OSS Training Pipeline

This document explains the end-to-end workflow of launching GPT-OSS training jobs via SkyPilot, and what data is stored at each stage.

Architecture Overview

┌─────────────┐      ┌─────────────────────┐      ┌─────────────────────────────┐
│   LAPTOP    │ ───► │  SKYPILOT API       │ ───► │     KUBERNETES CLUSTER      │
│             │      │  SERVER             │      │                             │
│ sky jobs    │      │ (skypilot.rbst.io)  │      │  ┌─────────────────────┐    │
│ launch      │      │                     │      │  │  ORCHESTRATOR POD   │    │
│             │      │ - Job queue         │      │  │  (1 CPU pod)        │    │
└─────────────┘      │ - Log storage       │      │  └──────────┬──────────┘    │
                     │ - Workdir staging   │      │             │               │
                     └─────────────────────┘      │             ▼               │
                                                  │  ┌─────────────────────┐    │
                                                  │  │   TRAINING PODS     │    │
                                                  │  │   (4 × 8 H100)      │    │
                                                  │  └─────────────────────┘    │
                                                  └─────────────────────────────┘

Step-by-Step Workflow

Step 1: Launch from Laptop

cd examples/gpt_oss/train
sky jobs launch launcher_120b.yaml -y --env WANDB_API_KEY=$WANDB_API_KEY

What happens:

  1. SkyPilot CLI reads launcher_120b.yaml
  2. Connects to API server at skypilot.rbst.io:8080
  3. Uploads workdir (train/ directory) to API server
  4. Registers job in the managed jobs queue

What gets uploaded to API server:

/tmp/sky-tmp-<random>/
└── workdir/
    ├── launcher_120b.yaml      (~8 KB)
    ├── run_training.py         (~6 KB)
    ├── recipes/
    │   ├── __init__.py
    │   ├── debug_callback.py   (~30 KB)
    │   └── gpt_oss_*.py        (~10 KB each)
    └── README.md
    ────────────────────────────
    TOTAL: ~100 KB

Step 2: API Server Creates Orchestrator Pod

The API server (managed jobs controller) creates an orchestrator pod on Kubernetes.

Orchestrator pod specs:

  • Image: nvcr.io/nvidia/nemo:25.07.gpt_oss (pulled from nvcr.io, NOT stored on API server)
  • Resources: 4 CPUs, 16GB memory, NO GPUs
  • Purpose: Run run_training.py which launches the actual training

What the orchestrator does during setup:

  1. Installs SkyPilot and nemo_run via pip
  2. Configures kubectl with in-cluster credentials
  3. Writes SkyPilot config for Kubernetes

Step 3: Orchestrator Launches Training Pods

The orchestrator runs run_training.py, which uses nemo_run.SkypilotExecutor:

executor = run.SkypilotExecutor(
    gpus="H100",
    gpus_per_node=8,
    num_nodes=4,  # 32 GPUs total
    container_image="nvcr.io/nvidia/nemo:25.07.gpt_oss",
    packager=GitArchivePackager(subpath="."),
    ...
)

Key point: SkypilotExecutor talks directly to Kubernetes, NOT through the API server. The training pods are created directly on K8s.

ORCHESTRATOR POD                          KUBERNETES
────────────────                          ──────────
SkypilotExecutor  ──── kubectl/K8s API ──►  Creates 4 training pods
     │                                      (8 H100 GPUs each)
     │
     └── Packages workdir via GitArchivePackager
         and syncs to training pods directly

Step 4: Training Runs

The 4 training pods:

  • Pull the Docker image from nvcr.io (cached on K8s nodes)
  • Mount /nemo-workspace PVC for data/checkpoints
  • Run distributed training with NCCL
  • Log metrics to WandB

What is Stored Where

On SkyPilot API Server (skypilot.rbst.io)

ItemLocationSizePersists?
Workdir staging/tmp/sky-tmp-*/~100 KB per jobUntil cleaned
SkyPilot wheel/tmp/<hash>/skypilot-*.whl~1.8 MBCached
Job logs~/sky_logs/api_server/requests/*.log100 MB - 67 GBYes
Job database~/.sky/jobs.db~50 KBYes

NOT on API Server

ItemActual Location
Docker imagesK8s nodes (pulled from nvcr.io)
Model checkpointsPVC /nemo-workspace
Training pod filesEphemeral (deleted when pod terminates)
Conda/pip packagesInside Docker image

Why Logs Can Be Huge

With debug settings enabled:

env_vars = {
    "NCCL_DEBUG": "INFO",        # Logs ALL NCCL communication
    "NCCL_DEBUG_SUBSYS": "ALL",  # Every subsystem
}

Each GPU logs every collective operation:

[GPU 0] NCCL INFO: AllReduce: 4194304 bytes, float16, sum, comm 0x...
[GPU 1] NCCL INFO: AllReduce: 4194304 bytes, float16, sum, comm 0x...
... (× 32 GPUs × thousands of operations × every step)

Result: A single job can produce 67GB of logs!

Log Size Comparison

Job TypeTypical Log Size
Normal job (NCCL_DEBUG=WARN)2-10 MB
Debug job (NCCL_DEBUG=INFO)1-67 GB

Recommendations

1. For Production Runs

Reduce debug verbosity in run_training.py:

env_vars = {
    "NCCL_DEBUG": "WARN",  # Only warnings/errors
    # Remove NCCL_DEBUG_SUBSYS
    ...
}

2. Add .skyignore

Create .skyignore in your project to avoid syncing unnecessary files:

# .skyignore
.venv/
venv/
__pycache__/
*.pyc
.git/
node_modules/
*.log

3. Clean Old Logs

After debugging, clean old job logs:

# On API server
rm -rf ~/sky_logs/api_server/requests/*.log

4. Monitor Disk Usage

Before launching many jobs:

# Check API server disk
ssh skypilot.rbst.io "df -h /"

Summary Diagram

LAPTOP                    API SERVER                 K8S CLUSTER
──────                    ──────────                 ───────────

sky jobs launch
     │
     ├─► Workdir (100KB) ──────► /tmp/sky-tmp-*/
     │
     └─► Job registered ───────► ~/.sky/jobs.db
                                      │
                                      ▼
                                 Create orchestrator ─────► ORCHESTRATOR POD
                                      │                          │
                                      │                          │
                                 Log stdout ◄────────────────────┤
                                 (CAN BE HUGE                    │
                                  with NCCL_DEBUG)               ▼
                                                          SkypilotExecutor
                                                          (direct to K8s)
                                                                 │
                                                                 ▼
                                                          TRAINING PODS
                                                          (4 × 8 H100)
                                                                 │
                                                                 ▼
                                                          Logs to WandB
                                                          Checkpoints to PVC