parse_deepspeed_config#
- composer.distributed.parse_deepspeed_config(config, state)[source]#
Parses the provided DeepSpeed config for compatibility with the Mosaic trainer.
Broadly speaking, this function does three things.
Check for settings that are unsupported, like DeepSpeed optimizers.
Check for inconsistencies between Mosaic trainer config and DeepSpeed config.
Use Mosaic trainer config to fill in some defaults for DeepSpeed config.
- Parameters
config (dict[str, Any]) โ The DeepSpeed config to use. Must follow the format specified in DeepSpeedโs documentation.
state (State) โ The state of the trainer.
- Returns
dict[str, Any] โ The DeepSpeed config updated with values from the arguments passed to the
Trainer
.- Raises
ValueError โ If any of the values in the DeepSpeed config conflict with arguments passed to the trainer.
RuntimeError โ If the batch size of the train dataloader in the provided state is not set.