executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
distributedComposer distributed launch, rank, device, sampler, auto microbatching, and parallelism workflows.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task needs Composer-specific distributed launch, rank or world-size reasoning, sampler wiring, device/backend selection, auto microbatching caveats, or FSDP/FSDP2/tensor-parallel configuration basics.
composer launcher command.--nproc, --world_size, --node_rank, --base_rank, --master_addr, and --master_port for single-node or multi-node runs.{rank} or {local_rank}.composer.utils.dist instead of parsing environment variables by hand.dist.get_sampler(dataset, shuffle=True) for map-style datasets.device="cpu", device="gpu", MPS, TPU, HPU, and Neuron device helpers.device_train_microbatch_size="auto" can recover from CUDA OOMs.parallelism_config for DDP/FSDP/FSDP2/tensor-parallel work.Trainer fit/eval loops, optimizer stepping, checkpoint scheduling, or non-distributed resume: use ../training/SKILL.md.../methods/SKILL.md.../observability/SKILL.md.../inference-export/SKILL.md.Single node with every visible GPU:
composer -n 8 train.py --config config.yaml
Single node with rank-specific child logs:
composer -n 8 --stdout stdout_{rank}.log --stderr stderr_{rank}.log train.py
Module mode, useful when the training entry point is importable:
composer -n 4 -m package.train --arg value
Multi-node requires explicit topology:
composer -n 8 --world_size 16 --node_rank 1 --master_addr host0 --master_port 29500 train.py
If world_size > nproc, provide enough information for Composer to infer the global ranks on this node.
from torch.utils.data import DataLoader
from composer.utils import dist
sampler = dist.get_sampler(dataset, shuffle=True)
loader = DataLoader(dataset, batch_size=32, sampler=sampler)
if dist.get_global_rank() == 0:
print("rank zero logs once")
Use get_world_size(), get_local_rank(), get_global_rank(), get_node_rank(), and get_local_world_size() for diagnostics that also work in non-distributed runs.
device="gpu" only after PyTorch reports CUDA availability and the requested precision is supported.Set device_train_microbatch_size="auto" when a CUDA training run OOMs during forward/backward and the full batch should be split dynamically. It does not fix dataloader memory, CPU OOM, model construction OOM, callback OOM, or algorithm work that runs outside the Trainer forward/backward path. Be careful with BatchNorm when auto microbatching makes microbatches very small.
python scripts/device_probe.py to inspect import/device availability.python scripts/launcher_help.py before composing launch commands.python train.py or python -m package.train before multi-rank launch.dist.get_sampler for map-style datasets.