”Deploy 4 RTX 4090 instances for a hyperparameter sweep.”
The agent provisions the fleet:list_gpu_types— confirms RTX 4090 availability and pricingcreate_instance— createssweep-1with RTX 4090create_instance— createssweep-2with RTX 4090create_instance— createssweep-3with RTX 4090create_instance— createssweep-4with RTX 4090instance_status— polls all four until running
Deployed 4 instances:Fleet burn rate: $1.40/hr. All 4 are ready for commands.
”Install dependencies on all of them and start training with different learning rates.”
The agent runs commands across the fleet:ssh_executeon each instance —pip install torch transformers datasetsfile_uploadon each instance — uploadstrain.pyssh_executeon each instance — starts training with different args:- sweep-1:
python train.py --lr 1e-4 - sweep-2:
python train.py --lr 5e-5 - sweep-3:
python train.py --lr 1e-5 - sweep-4:
python train.py --lr 5e-6
- sweep-1:
All 4 instances are running training with different learning rates:Check back in ~30 minutes for results, or ask me to monitor progress.
”Check training status on all instances and tear down any that are done.”
The agent checks each instance and cleans up:ssh_executeon each —tail -5 /root/train.logssh_executeon each —nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader
sweep-2 (lr=5e-5) has the best loss so far at 0.287. Terminating finished instances to save money.
file_downloadon sweep-1 and sweep-2 — downloads resultsdelete_instance— terminatessweep-1andsweep-2
Downloaded results from sweep-1 and sweep-2. Terminated both. Fleet cost reduced to $0.70/hr (2 remaining).