计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
composer【效率与协作】Use MosaicML Composer for PyTorch training loops, speedup methods, loggers, checkpoints, distributed launch, profiling, and model export.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves MosaicML Composer, the mosaicml Python distribution, or the importable composer package for PyTorch training engines, efficient training methods, callbacks/loggers, checkpoints, distributed launch, profiling, or model export.
Public install:
pip install mosaicml
Minimal import check:
python - <<'PY'
import composer
print(composer.__version__)
from composer import Trainer
print(Trainer)
PY
For optional integrations, read installation and package map before adding extras.
Trainer, ComposerModel, ComposerClassifier, DataSpec, Evaluator, Time, State, manual checkpoint load, autoresume, and basic device/precision choices.composer.algorithms, composer.functional, MixUp/CutMix/LabelSmoothing, model surgery, batch-key routing, and method recipe placement.composer_collect_env, and observability troubleshooting.composer launcher, rank/world-size helpers, distributed samplers, get_device, FSDP/FSDP2/TP basics, and auto microbatching caveats.export_for_inference, ExportForInferenceCallback, TorchScript/ONNX validation, checkpoint-backed export, and optional HuggingFace/PEFT caveats.python scripts/check_import.py from this skill root.mosaicml[all] unless the task truly spans many optional backends.device_probe.py before launching training.Trainer is the high-level training loop that manages fit/eval/predict, checkpoint save/load, callbacks, algorithms, logging, precision, devices, and distributed integration.ComposerModel is the model contract for batches; ComposerClassifier wraps simple (input, target) classification modules.Algorithm classes integrate methods through Trainer events; composer.functional helpers are for custom loops or one-off model/batch mutation.LoggerDestination subclasses receive metrics and uploaded files; callbacks and trace handlers generate many of those files.composer console entry point launches multi-process distributed jobs and configures rank environment variables.export_for_inference and ExportForInferenceCallback produce TorchScript or ONNX artifacts after optional load/surgery/transform steps.The generated skill favors CPU-safe, no-download workflows first and documents CUDA/distributed behavior with backend caveats. Optional CUDA was available during construction and a PyTorch CUDA smoke passed, but production-scale multi-rank training should still be verified in the user's target environment before relying on it.