From 593f0b0a08653fbcdb957e59898b3c64fe769d12 Mon Sep 17 00:00:00 2001 From: Isaac Corley <22203655+isaaccorley@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:29:53 -0500 Subject: [PATCH] Update CI Dependency Upper Bounds (#21) * update upper bounds of all deps * format --- requirements/required.txt | 6 +++--- requirements/style.txt | 4 ++-- requirements/tests.txt | 4 ++-- torchseg/decoders/manet/decoder.py | 8 +++++--- torchseg/losses/lovasz.py | 1 + 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/requirements/required.txt b/requirements/required.txt index 4a875efb..4d5490bb 100644 --- a/requirements/required.txt +++ b/requirements/required.txt @@ -1,7 +1,7 @@ # setup -setuptools==69.0.0 +setuptools==69.2.0 # install einops==0.7.0 -timm==0.9.12 -torch==2.1.2 \ No newline at end of file +timm==0.9.16 +torch==2.2.2 \ No newline at end of file diff --git a/requirements/style.txt b/requirements/style.txt index d7e52846..5080345a 100644 --- a/requirements/style.txt +++ b/requirements/style.txt @@ -1,5 +1,5 @@ # style -black[jupyter]==23.12.1 +black[jupyter]==24.3.0 flake8==7.0.0 isort[colors]==5.13.2 -pyupgrade==3.15.0 \ No newline at end of file +pyupgrade==3.15.2 \ No newline at end of file diff --git a/requirements/tests.txt b/requirements/tests.txt index 1a9c5bc1..75df37c3 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,3 +1,3 @@ # tests -pytest==7.4.4 -pytest-cov==4.1.0 \ No newline at end of file +pytest==8.1.1 +pytest-cov==5.0.0 \ No newline at end of file diff --git a/torchseg/decoders/manet/decoder.py b/torchseg/decoders/manet/decoder.py index d2f1398b..c9a21954 100644 --- a/torchseg/decoders/manet/decoder.py +++ b/torchseg/decoders/manet/decoder.py @@ -161,9 +161,11 @@ def __init__( # combine decoder keyword arguments kwargs = dict(use_batchnorm=use_batchnorm) # no attention type here blocks = [ - MFAB(in_ch, skip_ch, out_ch, reduction=reduction, **kwargs) - if skip_ch > 0 - else DecoderBlock(in_ch, skip_ch, out_ch, **kwargs) + ( + MFAB(in_ch, skip_ch, out_ch, reduction=reduction, **kwargs) + if skip_ch > 0 + else DecoderBlock(in_ch, skip_ch, out_ch, **kwargs) + ) for in_ch, skip_ch, out_ch in zip(in_channels, skip_channels, out_channels) ] # for the last we dont have skip connection -> use simple decoder block diff --git a/torchseg/losses/lovasz.py b/torchseg/losses/lovasz.py index 242be61d..afb2d750 100644 --- a/torchseg/losses/lovasz.py +++ b/torchseg/losses/lovasz.py @@ -2,6 +2,7 @@ Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License) """ + from typing import Optional import torch