Skip to content

Commit

Permalink
fix: get_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Dec 3, 2024
1 parent a043fa5 commit 64486e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pytorch_optimizer/optimizer/muon.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ def __init__(
params = self.get_parameters(params)
adamw_params = self.get_parameters(adamw_params) if adamw_params is not None else []
params.extend(adamw_params)
# print(params)
# print(adamw_params)

self.world_size: int = os.environ.get('WORLD_SIZE', 1)
self.rank: int = os.environ.get('RANK', 0)
Expand Down Expand Up @@ -128,7 +126,7 @@ def get_parameters(params: PARAMETERS) -> PARAMETERS:
new_params = []
for group in params:
if isinstance(group, dict) and 'params' in group:
new_params.extend(group['params'])
new_params.extend(list(group['params']))
else:
new_params.append(group)

Expand Down

0 comments on commit 64486e4

Please sign in to comment.