From 243987bbb69d01e32dede0d1f4ca8e4b281528a3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 18:55:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- nobrainer/processing/base.py | 2 +- nobrainer/processing/segmentation.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nobrainer/processing/base.py b/nobrainer/processing/base.py index e1b657a2..75db6b93 100644 --- a/nobrainer/processing/base.py +++ b/nobrainer/processing/base.py @@ -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: diff --git a/nobrainer/processing/segmentation.py b/nobrainer/processing/segmentation.py index 394113b0..513706d0 100644 --- a/nobrainer/processing/segmentation.py +++ b/nobrainer/processing/segmentation.py @@ -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)