2.14.0, its own runtime. It is the platform’s only
supervised method: labelled pairs trained from initialisation, with no base model anywhere in
the spec.
What the data looks like
The directory name is the class name. No label file, no CSV:torchvision.datasets.ImageFolder convention. Put the class count in config.yaml
as num_classes and no code changes.
val/ is required and must not overlap train/. The accuracy the platform reports is measured
on it, and mixing training images in makes that number mean nothing.
Create
train.py and config.yaml, both yours. In train.py only build_model and
build_datasets are meant to be edited. The rest is the platform contract: how arguments
arrive, reporting from rank zero, where artifacts are written.
Configure
config.yaml is flat, with no inheritance. Every key is declared by the recipe, so a typo or an
out-of-range value fails at tp validate rather than after a queue wait:
--set overrides the same keys against the same declaration:
Get the images to the cluster
- A dataset
- A volume
Versioned and immutable. Use this when you need to say which version a run trained on.
input_pipeline: imagefolder reads data/{train,val} under the working
directory, which is for local debugging. mnist and cifar10 try to download instead — fine
locally, usually no route out of a cluster node. Declare one of the two for a real run. See
datasets and volumes.
Scale up
torchrun from the topology the server assigned. With several cards
batch_size is per process. Two machines or more become a process group with a rendezvous, one
launcher per machine — your experiment never reads the GPU count, because RANK, LOCAL_RANK
and WORLD_SIZE are already set when train.py starts.
Multi-node needs a node, kubernetes or slurm Fleet, the same as every other process-group framework
here.
Check it worked
The Charts tab showstrain/loss, validation/loss, validation/accuracy and train/lr. The
accuracy is correct / total over val/. Artifacts hold checkpoints/best.pt plus a snapshot
of every evaluated epoch.
This method has no tp export and no tp eval, and that is stated rather than omitted: a
classifier has no HuggingFace export that would mean anything, and there is no benchmark harness
here to score it against. tp submit --then export is refused at compile time.
Bring your own model
Two functions intrain.py:
Why not custom/custom
A shell script can calltorchrun too, so the difference is worth naming:
Reach for custom training when your trainer is genuinely not this
shape.
Publishing the image (an administrator does this once)
Publishing the image (an administrator does this once)
The catalogue embeds no address for Then Settings → Runtime → Images → Default PyTorch image. A tag is enough and it takes
effect without a restart.
pytorch-2.14.0. Build it and name it:TUNEPLANE_IMAGE_PYTORCH sets the same field from the environment
and is the baseline a saved value overrides.Without it, submission fails with runtime_id='pytorch-2.14.0' has no built-in OCI source.