Skip to content

Commit

Permalink
fix type issue (#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored May 31, 2024
1 parent 8b4c684 commit b3c6664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def _get_initial_device_train_microbatch_size(
"`device_train_microbatch_size='auto'` requires the `state.train_dataloader` to have a `batch_size` attribute.",
) from e
return batch_size
elif isinstance(device_train_microbatch_size, Union[int, float]):
elif isinstance(device_train_microbatch_size, (int, float)):
return device_train_microbatch_size
else:
raise ValueError("device_train_microbatch_size must be an int or ``'auto'``")
Expand Down

0 comments on commit b3c6664

Please sign in to comment.