From d6de852038e4d3a6d2afb4bffdc1eed5329a1116 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:46:17 +0000 Subject: [PATCH 1/2] [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.2.0](https://github.com/psf/black/compare/23.10.0...24.2.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 58cada26..c73fb154 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.2.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 ecf23d9f10984360c67d902bbf2c40e842a2998a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:46:27 +0000 Subject: [PATCH 2/2] [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