custom_overrides flag in sdk
Describe the feature you'd like Add a flag that can be passed to the sagemaker-training-toolkit from an estimator that allows a user to provide: custom_override=dict[list,list] (default can be None)
How would this feature be used? Please describe. This would enable the sagemaker-training-toolkit to have additional functionality where users could override commands and provide their own custom launch scripts. For instance, rather than having to use MPI, I could use torch.distributed.launch, deepspeed, or my fork of any of the above.
Describe alternatives you've considered You could embed these into hyperparameters but this would be a poor user experience. You could use environment variables, but those don't transfer to local sessions (previously listed as a bug).
This is resolved in SageMaker Python SDK V3 (3.21.0). In V3 the ModelTrainer runs any launch command you give it via sagemaker.train.configs.SourceCode(command=...), so you can use deepspeed, torch.distributed.launch, or your own launcher instead of being forced onto MPI. For managed distributed launchers V3 also ships sagemaker.train.distributed.Torchrun, MPI, and SMP.
from sagemaker.train.configs import SourceCode
SourceCode(source_dir="src", command="deepspeed train.py")
Upgrade with pip install --upgrade sagemaker (3.21.0 or later). If you still hit this on V3, please reopen with a traceback and we will take another look.