Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Oct 24, 2023
1 parent 8147954 commit 05bf8a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pvnet/models/multimodal/site_encoders/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@


class SimpleLearnedAggregator(AbstractPVSitesEncoder):
"""A simple model which learns a different weighted-average across all of the PV sites for each
GSP.
"""A simple model which learns a different weighted-average across all PV sites for each GSP.
Each sequence from each site is independently encodeded through some dense layers wih skip-
connections, then the encoded form of each sequence is aggregated through a learned weighted-sum
Expand Down
12 changes: 12 additions & 0 deletions pvnet/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def __call__(self, model):


def find_submodule_parameters(model, search_modules):
"""Finds all parameters within given submodule types
Args:
model: torch Module to search through
search_modules: List of submodule types to search for
"""
if isinstance(model, search_modules):
return model.parameters()

Expand All @@ -66,6 +72,12 @@ def find_submodule_parameters(model, search_modules):


def find_other_than_submodule_parameters(model, ignore_modules):
"""Finds all parameters not with given submodule types
Args:
model: torch Module to search through
search_modules: List of submodule types to ignore
"""
if isinstance(model, ignore_modules):
return []

Expand Down

0 comments on commit 05bf8a1

Please sign in to comment.