From fade03cea01a3a45fe505434ba6e675892633e26 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 19:43:38 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.10.0 → 24.3.0](https://github.com/psf/black/compare/23.10.0...24.3.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38d57d6a..06f36a93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,15 +12,15 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.10.0 + rev: 24.3.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort exclude: ^(nobrainer/_version\.py|versioneer\.py)$ From c9fa1f3164c8e8a9bab322a20577007085d58707 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 19:43:50 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- nobrainer/io.py | 1 + nobrainer/models/autoencoder.py | 1 + nobrainer/models/dcgan.py | 1 + nobrainer/models/progressiveae.py | 1 + nobrainer/processing/segmentation.py | 6 +++--- setup.py | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nobrainer/io.py b/nobrainer/io.py index e9f64c6a..7bfcf7b0 100644 --- a/nobrainer/io.py +++ b/nobrainer/io.py @@ -1,4 +1,5 @@ """Input/output methods.""" + import csv import functools import multiprocessing diff --git a/nobrainer/models/autoencoder.py b/nobrainer/models/autoencoder.py index 779f4b17..5288466b 100644 --- a/nobrainer/models/autoencoder.py +++ b/nobrainer/models/autoencoder.py @@ -1,5 +1,6 @@ """Model definition for Autoencoder. """ + import math from tensorflow.keras import layers, models diff --git a/nobrainer/models/dcgan.py b/nobrainer/models/dcgan.py index 2b5f3698..0e4a94d3 100644 --- a/nobrainer/models/dcgan.py +++ b/nobrainer/models/dcgan.py @@ -1,5 +1,6 @@ """Model definition for DCGAN. """ + import math from tensorflow.keras import layers, models diff --git a/nobrainer/models/progressiveae.py b/nobrainer/models/progressiveae.py index a2ed1551..23c62d21 100644 --- a/nobrainer/models/progressiveae.py +++ b/nobrainer/models/progressiveae.py @@ -1,5 +1,6 @@ """Model definition for ProgressiveAE. """ + import tensorflow as tf from tensorflow.keras import layers, models diff --git a/nobrainer/processing/segmentation.py b/nobrainer/processing/segmentation.py index 66e1768d..7ceaf821 100644 --- a/nobrainer/processing/segmentation.py +++ b/nobrainer/processing/segmentation.py @@ -90,9 +90,9 @@ def _compile(): epochs=epochs, steps_per_epoch=dataset_train.get_steps_per_epoch(), validation_data=dataset_validate.dataset if dataset_validate else None, - validation_steps=dataset_validate.get_steps_per_epoch() - if dataset_validate - else None, + validation_steps=( + dataset_validate.get_steps_per_epoch() if dataset_validate else None + ), callbacks=callbacks, ) diff --git a/setup.py b/setup.py index 84d34993..d2d2c60a 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ To install, run `python3 setup.py install`. """ + import os import sys From 8c8afb03a742c9b24613e131c930e313fe3dcde3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 22:40:09 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- nobrainer/models/unetr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nobrainer/models/unetr.py b/nobrainer/models/unetr.py index 30861617..3969199b 100644 --- a/nobrainer/models/unetr.py +++ b/nobrainer/models/unetr.py @@ -2,6 +2,7 @@ Adapted from https://www.kaggle.com/code/usharengaraju/tensorflow-unetr-w-b """ + import math import tensorflow as tf