Summary
--auto_batch_finding is documented (via its --help text) as "Only available for TP trainer", but in practice it is also wired up for the single-GPU/CPU trainer and the DDP trainer — just not for FSDP. When combined with --trainer torchFSDP, the flag is silently accepted and has no effect: TorchFSDPTrainer never reads self.attributes.auto_batch_finding and just uses --batch_size as given.
Details
- Flag definition:
dicee/config.py:171 (self.auto_batch_finding: bool = False) and dicee/scripts/run.py:153 (--auto_batch_finding, help: "Find a batch size fitting in GPUs. Only available for TP trainer").
- Implemented in:
dicee/trainer/torch_trainer.py:92-109 (single-GPU/CPU)
dicee/trainer/torch_trainer_ddp.py:134-149 (DDP)
dicee/trainer/model_parallelism.py:77-92 (TP)
- Not implemented in
dicee/trainer/torch_trainer_fsdp.py — no reference to auto_batch_finding anywhere in the file. It reads self.attributes.batch_size directly (line 202) and never attempts auto-sizing.
Impact
Running dicee --trainer torchFSDP --auto_batch_finding ... gives no error or warning; users may assume batch size is being auto-tuned when it is not, and must set --batch_size manually for FSDP runs.
Suggested fix
Either:
- Wire
auto_batch_finding into TorchFSDPTrainer (analogous to the DDP implementation, respecting rank-0 discovery + broadcast), or
- Explicitly warn/raise when
--auto_batch_finding is combined with --trainer torchFSDP, and update the --help text/README to reflect actual trainer support instead of only mentioning TP.
Summary
--auto_batch_findingis documented (via its--helptext) as "Only available for TP trainer", but in practice it is also wired up for the single-GPU/CPU trainer and the DDP trainer — just not for FSDP. When combined with--trainer torchFSDP, the flag is silently accepted and has no effect:TorchFSDPTrainernever readsself.attributes.auto_batch_findingand just uses--batch_sizeas given.Details
dicee/config.py:171(self.auto_batch_finding: bool = False) anddicee/scripts/run.py:153(--auto_batch_finding, help: "Find a batch size fitting in GPUs. Only available for TP trainer").dicee/trainer/torch_trainer.py:92-109(single-GPU/CPU)dicee/trainer/torch_trainer_ddp.py:134-149(DDP)dicee/trainer/model_parallelism.py:77-92(TP)dicee/trainer/torch_trainer_fsdp.py— no reference toauto_batch_findinganywhere in the file. It readsself.attributes.batch_sizedirectly (line 202) and never attempts auto-sizing.Impact
Running
dicee --trainer torchFSDP --auto_batch_finding ...gives no error or warning; users may assume batch size is being auto-tuned when it is not, and must set--batch_sizemanually for FSDP runs.Suggested fix
Either:
auto_batch_findingintoTorchFSDPTrainer(analogous to the DDP implementation, respecting rank-0 discovery + broadcast), or--auto_batch_findingis combined with--trainer torchFSDP, and update the--helptext/README to reflect actual trainer support instead of only mentioning TP.