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 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/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 diff --git a/setup.cfg b/setup.cfg index b3949213c2..f1b651694e 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]