Skip to content

Commit

Permalink
Remove unnecessary generator (#8470)
Browse files Browse the repository at this point in the history
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Jul 19, 2021
1 parent cfc0410 commit 4bc3d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/callbacks/lr_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _duplicate_param_group_names(self, param_groups: List[Dict]) -> Set[str]:
unique = set(names)
if len(names) == len(unique):
return set()
return set(n for n in names if names.count(n) > 1)
return {n for n in names if names.count(n) > 1}

def _find_names(self, lr_schedulers: List, add_lr_sch_names: bool = True) -> List[str]:
# Create unique names in the case we have multiple of the same learning
Expand Down

0 comments on commit 4bc3d70

Please sign in to comment.