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

docs: Improve readability in .py files #209

Merged
merged 1 commit into from
Jun 7, 2022
Merged
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
2 changes: 1 addition & 1 deletion src/dalle_mini/model/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from huggingface_hub import hf_hub_download
from unidecode import unidecode

# based on wiki word occurence
# based on wiki word occurrence
person_token = [("a person", 282265), ("someone", 121194), ("somebody", 12219)]
temp_token = "xtokx" # avoid repeating chars

Expand Down
4 changes: 2 additions & 2 deletions tools/train/scalable_shampoo/distributed_shampoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _convert_to_parameter_stats(global_stats, local_stat):


def _convert_from_parameter_stats(parameter_stats, local_stats):
"""Creates sharded stats from paramter stats."""
"""Creates sharded stats from parameter stats."""
return LocalShardedParameterStats(
parameter_stats.diagonal_statistics,
parameter_stats.diagonal_momentum,
Expand Down Expand Up @@ -846,7 +846,7 @@ def distributed_shampoo(
"""

def _graft_type_has_diagonal_statistics():
"""Returns True if using diagonal firt order method for grafting."""
"""Returns True if using diagonal first order method for grafting."""
return graft_type != GraftingType.SGD and graft_type != GraftingType.SQRT_N

def _graft_type_has_diagonal_momentum_states():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def row_abs_maxes(mat):

For example the symmetric matrix M = [[1, 6], [6, 2]] is represented using
mat = [1, 6, 2] with block_size = 1. In this case the function returns the
aboslute row maxes of the original symmetric matrix, [6, 6].
absolute row maxes of the original symmetric matrix, [6, 6].

Args:
mat: The symmetric matrix represented as the concatenated blocks.
Expand Down