Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 22, 2023
1 parent ae3a800 commit 024139f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nobrainer/processing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def save(self, save_dir):
# are stored as members, which doesn't leave room for
# parameters that are specific to the runtime context.
# (e.g. multi_gpu).
if key == 'multi_gpu':
if key == "multi_gpu":
continue
model_info["__init__"][key] = getattr(self, key)
for val in self.state_variables:
Expand Down
4 changes: 1 addition & 3 deletions nobrainer/processing/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def _compile():
mod = importlib.import_module("..models", "nobrainer.processing")
base_model = getattr(mod, self.base_model)
if batch_size % self.strategy.num_replicas_in_sync:
raise ValueError(
"batch size must be a multiple of the number of GPUs"
)
raise ValueError("batch size must be a multiple of the number of GPUs")

with self.strategy.scope():
_create(base_model)
Expand Down

0 comments on commit 024139f

Please sign in to comment.