From 7897068081abdfcaf4ee0cd5e6c6a81d0343fb5e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:34:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 10 +++------- yeast_mrcnn/model.py | 2 +- yeast_mrcnn/train.py | 2 -- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0ddc0c5..5180a04 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ url = https://github.com/Hekstra-Lab/yeast-mcrnn author = Ian Hunt-Isaak, John Russell author_email = ianhuntisaak@g.harvard.edu, johnrussell@g.harvard.edu license = MIT -license_file = LICENSE +license_files = LICENSE platforms = Linux, Mac OS X, Windows classifiers = Intended Audience :: Developers @@ -16,10 +16,6 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 Programming Language :: Python :: Implementation :: CPython [options] @@ -29,10 +25,10 @@ install_requires = fast-overlap numpy pandas - read_roi + read-roi tifffile torch -python_requires = >=3.6 +python_requires = >=3.8 [options.extras_require] test = diff --git a/yeast_mrcnn/model.py b/yeast_mrcnn/model.py index 115baef..582d62c 100644 --- a/yeast_mrcnn/model.py +++ b/yeast_mrcnn/model.py @@ -33,7 +33,7 @@ def mrcnn(): ) # Make anchor generator with 3 sizes per feature map and 5 aspect ratios - sizes = tuple(2.0 ** x for x in range(5, 12)) + sizes = tuple(2.0**x for x in range(5, 12)) aspects = tuple(0.5 * x for x in range(1, 5)) n_feature_maps = 5 # true for resnet50 with FPN ag_sizes = tuple(tuple(sizes[i : i + 3]) for i in range(n_feature_maps)) diff --git a/yeast_mrcnn/train.py b/yeast_mrcnn/train.py index b1908e3..cef3bbd 100644 --- a/yeast_mrcnn/train.py +++ b/yeast_mrcnn/train.py @@ -15,7 +15,6 @@ def train_one_epoch(model, dataloader, optimizer, epoch, device): - loss_df = pd.DataFrame() lr_scheduler = None @@ -70,7 +69,6 @@ def train( model.train() for e in range(epochs): - loss_df = train_one_epoch(model, train_dataloader, optimizer, e, device) loss_df = loss_df.join(evaluate_test(model, val_dataloader, device))