Skip to content

Commit 6d6c39a

Browse files
yeyu-nvidiaclaude
andcommitted
style: apply ruff formatting to eagle_utils.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ye Yu <yeyu@nvidia.com>
1 parent ddddb81 commit 6d6c39a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

examples/speculative_decoding/eagle_utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,7 @@ def create_optimizer(self):
179179
super().create_optimizer()
180180
if self.lora_lr_multiplier != 1.0:
181181
lora_ids = {
182-
id(p)
183-
for n, p in self.model.named_parameters()
184-
if "lora_" in n and p.requires_grad
182+
id(p) for n, p in self.model.named_parameters() if "lora_" in n and p.requires_grad
185183
}
186184
if lora_ids:
187185
new_groups = []
@@ -194,9 +192,7 @@ def create_optimizer(self):
194192
{**group, "params": lora, "lr": group["lr"] * self.lora_lr_multiplier}
195193
)
196194
elif lora:
197-
new_groups.append(
198-
{**group, "lr": group["lr"] * self.lora_lr_multiplier}
199-
)
195+
new_groups.append({**group, "lr": group["lr"] * self.lora_lr_multiplier})
200196
else:
201197
new_groups.append(group)
202198
self.optimizer.param_groups = new_groups

0 commit comments

Comments
 (0)