AutoStrategy#
- class braintools.trainer.AutoStrategy(prefer_fsdp=False)#
Automatically select the best strategy based on available devices.
This strategy inspects the available hardware and selects an appropriate distribution strategy.
- Parameters:
prefer_fsdp (
bool) – Whether to prefer FSDP over simple data parallelism when multiple devices are available.
Examples
>>> strategy = AutoStrategy() >>> trainer = Trainer(strategy=strategy)