Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type hints #45

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions distributed_shampoo/utils/shampoo_ddp_distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def __init__(

# Determine communication type.
if distributed_config.communication_dtype == CommunicationDType.BF16:
communication_dtype: torch.dtype = torch.bfloat16
communication_dtype = torch.bfloat16
elif distributed_config.communication_dtype == CommunicationDType.FP16:
communication_dtype: torch.dtype = torch.float16
communication_dtype = torch.float16
else:
assert distributed_config.communication_dtype in [
CommunicationDType.FP32,
Expand Down
4 changes: 2 additions & 2 deletions distributed_shampoo/utils/shampoo_hsdp_distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def __init__(

# Determine communication type.
if distributed_config.communication_dtype == CommunicationDType.BF16:
communication_dtype: torch.dtype = torch.bfloat16
communication_dtype = torch.bfloat16
elif distributed_config.communication_dtype == CommunicationDType.FP16:
communication_dtype: torch.dtype = torch.float16
communication_dtype = torch.float16
else:
assert distributed_config.communication_dtype in [
CommunicationDType.FP32,
Expand Down
Loading