From b219cf5fd828b0f1fd37e4e09624d55691787308 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Tue, 12 Aug 2025 01:59:23 +0100 Subject: [PATCH 1/5] Updates frequency test and adds torchaudio as a dependency Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- monai/transforms/signal/array.py | 5 +++-- requirements-dev.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/monai/transforms/signal/array.py b/monai/transforms/signal/array.py index 97df04f233..d75ab4351a 100644 --- a/monai/transforms/signal/array.py +++ b/monai/transforms/signal/array.py @@ -411,10 +411,11 @@ def __call__(self, signal: np.ndarray) -> Any: Args: signal: signal to be frequency removed """ + signal = convert_to_tensor(signal, dtype=torch.double) b_notch, a_notch = convert_to_tensor( - iirnotch(self.frequency, self.quality_factor, self.sampling_freq), dtype=torch.float + iirnotch(self.frequency, self.quality_factor, self.sampling_freq), dtype=torch.double ) - y_notched = filtfilt(convert_to_tensor(signal), a_notch, b_notch) + y_notched = filtfilt(signal, a_notch, b_notch) return y_notched diff --git a/requirements-dev.txt b/requirements-dev.txt index 87840556ee..a1edc3a922 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ # Full requirements for developments -r requirements-min.txt pytorch-ignite==0.4.11 +torchaudio gdown>=4.7.3 scipy>=1.12.0; python_version >= '3.9' itk>=5.2 From 912820f1cedb650823910f47d17673d75b9fa706 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:37:27 -0400 Subject: [PATCH 2/5] Attempting version fix Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- pyproject.toml | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 76b26731bf..ddd13d2d78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "wheel", "setuptools", - "torch>=2.4.1", + "torch>=2.5.1", "ninja", "packaging" ] diff --git a/requirements.txt b/requirements.txt index c43fb21f92..19f1a28a29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -torch>=2.4.1; platform_system != "Windows" -torch>=2.4.1, !=2.7.0; platform_system == "Windows" +torch>=2.5.1; platform_system != "Windows" +torch>=2.5.1, !=2.7.0; platform_system == "Windows" numpy>=1.24,<3.0 From 1785d18de2c1de2385889aae56fe1d8fedf9c979 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:36:57 -0400 Subject: [PATCH 3/5] Changing install process to prevent torchaudio from installing different PyTorch version Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/pythonapp.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index c68c879231..09128c8c0b 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -103,9 +103,8 @@ jobs: - name: Install the dependencies run: | python -m pip install --user --upgrade pip wheel - python -m pip install torch==2.5.1 torchvision==0.20.1 cat "requirements-dev.txt" - python -m pip install -r requirements-dev.txt + python -m pip install torch==2.5.1 torchvision==0.20.1 -r requirements-dev.txt python -m pip list python setup.py develop # test no compile installation shell: bash From 9f18655f50ec295a315a633333a84d2bfd263c02 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Tue, 9 Sep 2025 12:13:16 +0100 Subject: [PATCH 4/5] Version update Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- setup.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index b3949213c2..75b79100d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ setup_requires = ninja packaging install_requires = - torch>=2.4.1 + torch>=2.5.1 numpy>=1.24,<3.0 [options.extras_require] @@ -108,6 +108,8 @@ torchio = torchio torchvision = torchvision +torchaudio = + torchaudio itk = itk>=5.2 tqdm = From db37c6008f9b109ce14a17d8809bf317dc02dbf0 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:23:59 +0100 Subject: [PATCH 5/5] Removing torchaudio requirement Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- requirements-dev.txt | 1 - setup.cfg | 2 -- 2 files changed, 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6acf01ea76..fff622b021 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,6 @@ # Full requirements for developments -r requirements-min.txt pytorch-ignite==0.4.11 -torchaudio gdown>=4.7.3 scipy>=1.12.0; python_version >= '3.9' itk>=5.2 diff --git a/setup.cfg b/setup.cfg index 75b79100d5..f1b651694e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -108,8 +108,6 @@ torchio = torchio torchvision = torchvision -torchaudio = - torchaudio itk = itk>=5.2 tqdm =