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_KEYWhat happens:
- SkyPilot CLI reads
launcher_120b.yaml - Connects to API server at
skypilot.rbst.io:8080 - Uploads workdir (
train/directory) to API server - 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.pywhich launches the actual training
What the orchestrator does during setup:
- Installs SkyPilot and nemo_run via pip
- Configures kubectl with in-cluster credentials
- 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-workspacePVC for data/checkpoints - Run distributed training with NCCL
- Log metrics to WandB
What is Stored Where
On SkyPilot API Server (skypilot.rbst.io)
| Item | Location | Size | Persists? |
|---|---|---|---|
| Workdir staging | /tmp/sky-tmp-*/ | ~100 KB per job | Until cleaned |
| SkyPilot wheel | /tmp/<hash>/skypilot-*.whl | ~1.8 MB | Cached |
| Job logs | ~/sky_logs/api_server/requests/*.log | 100 MB - 67 GB | Yes |
| Job database | ~/.sky/jobs.db | ~50 KB | Yes |
NOT on API Server
| Item | Actual Location |
|---|---|
| Docker images | K8s nodes (pulled from nvcr.io) |
| Model checkpoints | PVC /nemo-workspace |
| Training pod files | Ephemeral (deleted when pod terminates) |
| Conda/pip packages | Inside 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 Type | Typical 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/*.log4. 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