Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Jul 1, 2024
1 parent 47934c1 commit bbc4af1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sup3r/models/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ def get_single_grad(self,
hi_res_exo = self.timer(self.get_high_res_exo_input)(hi_res_true)
hi_res_gen = self.timer(self._tf_generate)(low_res, hi_res_exo)
loss_out = self.timer(self.calc_loss)(hi_res_true, hi_res_gen,
**calc_loss_kwargs)
**calc_loss_kwargs)
loss, loss_details = loss_out
grad = self.timer(tape.gradient)(loss, training_weights)
return grad, loss_details
2 changes: 1 addition & 1 deletion sup3r/preprocessing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def get_specific_class(cls, file_arg):
msg = (
f'Can only handle H5 or NETCDF files. Received '
f'"{source_type}" for files: {file_arg}'
)
)
logger.error(msg)
raise ValueError(msg)
return SpecificClass
10 changes: 6 additions & 4 deletions sup3r/preprocessing/extracters/dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ def check_regridded_lr_data(self):
warn(msg)

if any(fill_feats):
msg = ('Doing nearest neighbor nan fill on low_res data for '
f'features = {fill_feats}')
msg = (
'Doing nearest neighbor nan fill on low_res data for '
f'features = {fill_feats}'
)
logger.info(msg)
self.lr_data = self.lr_data.interpolate_na(
features=fill_feats, method='nearest'
)
features=fill_feats, method='nearest'
)

0 comments on commit bbc4af1

Please sign in to comment.