From e208d03d866fd8c79db1a809757a8927971f6dd4 Mon Sep 17 00:00:00 2001 From: yes Date: Tue, 7 Jan 2025 22:31:11 -0800 Subject: [PATCH] changes for torch version 2.4.1 Signed-off-by: yes --- openfl-workspace/torch_cnn_histology/requirements.txt | 5 ++--- .../torch_cnn_histology_fedcurv/requirements.txt | 4 ++-- openfl-workspace/torch_cnn_mnist/requirements.txt | 5 ++--- .../torch_cnn_mnist_eden_compression/requirements.txt | 5 ++--- openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt | 5 ++--- .../torch_cnn_mnist_straggler_check/requirements.txt | 6 +++--- openfl-workspace/torch_llm_horovod/requirements.txt | 5 ++--- openfl-workspace/torch_template/requirements.txt | 5 ++--- openfl-workspace/torch_unet_kvasir/requirements.txt | 5 ++--- openfl/federated/data/loader_pt.py | 4 ---- 10 files changed, 19 insertions(+), 30 deletions(-) diff --git a/openfl-workspace/torch_cnn_histology/requirements.txt b/openfl-workspace/torch_cnn_histology/requirements.txt index f2b6eff264..f78cdbd9a2 100644 --- a/openfl-workspace/torch_cnn_histology/requirements.txt +++ b/openfl-workspace/torch_cnn_histology/requirements.txt @@ -1,3 +1,2 @@ -setuptools==59.6.0 -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 \ No newline at end of file diff --git a/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt b/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt index 58b9f15677..32b37ab091 100644 --- a/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt +++ b/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt @@ -1,2 +1,2 @@ -torch==2.3.1 -torchvision==0.18.1 +torch==2.4.1 +torchvision==0.19.1 diff --git a/openfl-workspace/torch_cnn_mnist/requirements.txt b/openfl-workspace/torch_cnn_mnist/requirements.txt index f2b6eff264..f78cdbd9a2 100644 --- a/openfl-workspace/torch_cnn_mnist/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist/requirements.txt @@ -1,3 +1,2 @@ -setuptools==59.6.0 -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 \ No newline at end of file diff --git a/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt b/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt index 3cc03dc1c2..ab1d13b0dc 100644 --- a/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt @@ -1,5 +1,4 @@ -setuptools==59.6.0 tensorboard -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt b/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt index 3cc03dc1c2..ab1d13b0dc 100644 --- a/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt @@ -1,5 +1,4 @@ -setuptools==59.6.0 tensorboard -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt b/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt index 0b13aac1de..995690a5d0 100644 --- a/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt @@ -1,7 +1,7 @@ numpy>=1.22.2 # not directly required, pinned by Snyk to avoid a vulnerability rsa>=4.7 # not directly required, pinned by Snyk to avoid a vulnerability -setuptools==59.6.0 +setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability tensorboard -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-workspace/torch_llm_horovod/requirements.txt b/openfl-workspace/torch_llm_horovod/requirements.txt index e6b56e71ed..43ec99dd2c 100644 --- a/openfl-workspace/torch_llm_horovod/requirements.txt +++ b/openfl-workspace/torch_llm_horovod/requirements.txt @@ -7,9 +7,8 @@ jupyter peft sentencepiece seqeval -setuptools==59.6.0 tensorboard -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 transformers[torch] wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-workspace/torch_template/requirements.txt b/openfl-workspace/torch_template/requirements.txt index 4fe04aec85..d42d6e4e68 100644 --- a/openfl-workspace/torch_template/requirements.txt +++ b/openfl-workspace/torch_template/requirements.txt @@ -1,4 +1,3 @@ # Set your workspace's requirements here -setuptools==59.6.0 -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 diff --git a/openfl-workspace/torch_unet_kvasir/requirements.txt b/openfl-workspace/torch_unet_kvasir/requirements.txt index abc8c0d196..cfbd9337f7 100644 --- a/openfl-workspace/torch_unet_kvasir/requirements.txt +++ b/openfl-workspace/torch_unet_kvasir/requirements.txt @@ -1,4 +1,3 @@ scikit-image==0.24.0 -setuptools==59.6.0 -torch==2.5.1 -torchvision==0.20.1 +torch==2.4.1 +torchvision==0.19.1 diff --git a/openfl/federated/data/loader_pt.py b/openfl/federated/data/loader_pt.py index c4184ab9a4..de5c10e450 100644 --- a/openfl/federated/data/loader_pt.py +++ b/openfl/federated/data/loader_pt.py @@ -4,16 +4,12 @@ """PyTorchDataLoader module.""" -import sys from math import ceil import numpy as np -import typing_extensions from openfl.federated.data.loader import DataLoader -sys.modules["pip._vendor.typing_extensions"] = typing_extensions - class PyTorchDataLoader(DataLoader): """A class used to represent a Federation Data Loader for PyTorch models.