diff --git a/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Bangalore/requirements.txt b/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Bangalore/requirements.txt index 3a478314e8..976f84c066 100644 --- a/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Bangalore/requirements.txt +++ b/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Bangalore/requirements.txt @@ -3,6 +3,6 @@ numpy>=1.13.3 openfl>=1.2.1 scikit-learn>=0.24.1 setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability -torch==2.3.1 -torchvision==0.18.1 +torch==2.7.0 +torchvision==0.22.0 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Chandler/requirements.txt b/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Chandler/requirements.txt index 3a478314e8..976f84c066 100644 --- a/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Chandler/requirements.txt +++ b/openfl-tutorials/experimental/workflow/FederatedRuntime/301_MNIST_Watermarking/Chandler/requirements.txt @@ -3,6 +3,6 @@ numpy>=1.13.3 openfl>=1.2.1 scikit-learn>=0.24.1 setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability -torch==2.3.1 -torchvision==0.18.1 +torch==2.7.0 +torchvision==0.22.0 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/openfl-tutorials/experimental/workflow/Global_DP/requirements_global_dp.txt b/openfl-tutorials/experimental/workflow/Global_DP/requirements_global_dp.txt index f5118684aa..5b1bf5a27e 100644 --- a/openfl-tutorials/experimental/workflow/Global_DP/requirements_global_dp.txt +++ b/openfl-tutorials/experimental/workflow/Global_DP/requirements_global_dp.txt @@ -4,6 +4,6 @@ numpy==1.23.3 opacus==1.5.1 pillow==10.3.0 pyyaml==6.0 -torch==2.2.0 +torch==2.7.0 +torchvision==0.22.0 torchaudio==2.2.0 -torchvision==0.17.0 diff --git a/openfl-tutorials/experimental/workflow/Privacy_Meter/requirements_privacy_meter.txt b/openfl-tutorials/experimental/workflow/Privacy_Meter/requirements_privacy_meter.txt index c617e3a732..3817f03738 100644 --- a/openfl-tutorials/experimental/workflow/Privacy_Meter/requirements_privacy_meter.txt +++ b/openfl-tutorials/experimental/workflow/Privacy_Meter/requirements_privacy_meter.txt @@ -4,5 +4,5 @@ matplotlib opacus==1.5.2 pillow scikit-learn -torch==2.3.1 -torchvision==0.18.1 \ No newline at end of file +torch==2.7.0 +torchvision==0.22.0 \ No newline at end of file diff --git a/openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt b/openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt index 9d6a8843f7..031f62e022 100644 --- a/openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt +++ b/openfl-tutorials/experimental/workflow/workflow_interface_requirements.txt @@ -7,5 +7,5 @@ nbdev==2.3.37 nbformat==5.10.4 ray==2.43.0 tabulate==0.9.0 -torch==2.3.1 -torchvision==0.18.1 +torch==2.7.0 +torchvision==0.22.0 diff --git a/openfl-workspace/keras/torch/mnist/requirements.txt b/openfl-workspace/keras/torch/mnist/requirements.txt index 3e105f3d5b..edb3597b21 100644 --- a/openfl-workspace/keras/torch/mnist/requirements.txt +++ b/openfl-workspace/keras/torch/mnist/requirements.txt @@ -1,5 +1,5 @@ keras==3.9.0 -torch==2.6.0 +torch==2.7.0 torch-xla==2.6.0 -torchvision==0.21.0 +torchvision==0.22.0 tensorflow==2.18.0 \ No newline at end of file diff --git a/openfl-workspace/torch/histology/requirements.txt b/openfl-workspace/torch/histology/requirements.txt index 241bea49f4..0e3e5542f9 100644 --- a/openfl-workspace/torch/histology/requirements.txt +++ b/openfl-workspace/torch/histology/requirements.txt @@ -1,3 +1,3 @@ setuptools>=65.5.1 -torch==2.4.1 -torchvision==0.19.1 \ No newline at end of file +torch==2.7.0 +torchvision==0.22.0 \ No newline at end of file diff --git a/openfl-workspace/torch/histology_fedcurv/requirements.txt b/openfl-workspace/torch/histology_fedcurv/requirements.txt index 241bea49f4..0e3e5542f9 100644 --- a/openfl-workspace/torch/histology_fedcurv/requirements.txt +++ b/openfl-workspace/torch/histology_fedcurv/requirements.txt @@ -1,3 +1,3 @@ setuptools>=65.5.1 -torch==2.4.1 -torchvision==0.19.1 \ No newline at end of file +torch==2.7.0 +torchvision==0.22.0 \ No newline at end of file diff --git a/openfl-workspace/torch/mnist/requirements.txt b/openfl-workspace/torch/mnist/requirements.txt index 241bea49f4..0e3e5542f9 100644 --- a/openfl-workspace/torch/mnist/requirements.txt +++ b/openfl-workspace/torch/mnist/requirements.txt @@ -1,3 +1,3 @@ setuptools>=65.5.1 -torch==2.4.1 -torchvision==0.19.1 \ No newline at end of file +torch==2.7.0 +torchvision==0.22.0 \ No newline at end of file diff --git a/openfl-workspace/torch/mnist_eden_compression/requirements.txt b/openfl-workspace/torch/mnist_eden_compression/requirements.txt index 786c4801c2..93853a3970 100644 --- a/openfl-workspace/torch/mnist_eden_compression/requirements.txt +++ b/openfl-workspace/torch/mnist_eden_compression/requirements.txt @@ -1,5 +1,5 @@ setuptools>=65.5.1 tensorboard -torch==2.4.1 -torchvision==0.19.1 +torch==2.7.0 +torchvision==0.22.0 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file diff --git a/openfl-workspace/torch/mnist_fed_eval/requirements.txt b/openfl-workspace/torch/mnist_fed_eval/requirements.txt index edce0d704d..af70a604c2 100644 --- a/openfl-workspace/torch/mnist_fed_eval/requirements.txt +++ b/openfl-workspace/torch/mnist_fed_eval/requirements.txt @@ -1,5 +1,5 @@ setuptools>=65.5.1 tensorboard -torch==2.4.1 -torchvision==0.19.1 +torch==2.7.0 +torchvision==0.22.0 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file diff --git a/openfl-workspace/torch/mnist_straggler_check/requirements.txt b/openfl-workspace/torch/mnist_straggler_check/requirements.txt index 5238b15a47..f6463c65bf 100644 --- a/openfl-workspace/torch/mnist_straggler_check/requirements.txt +++ b/openfl-workspace/torch/mnist_straggler_check/requirements.txt @@ -2,6 +2,6 @@ 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>=65.5.1 tensorboard -torch==2.4.1 -torchvision==0.19.1 +torch==2.7.0 +torchvision==0.22.0 wheel>=0.38.0 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file diff --git a/openfl-workspace/torch/template/requirements.txt b/openfl-workspace/torch/template/requirements.txt index 3b0bc9433a..908f007b5d 100644 --- a/openfl-workspace/torch/template/requirements.txt +++ b/openfl-workspace/torch/template/requirements.txt @@ -1,4 +1,4 @@ # Set your workspace's requirements here setuptools>=65.5.1 -torch==2.4.1 -torchvision==0.19.1 +torch==2.7.0 +torchvision==0.22.0 diff --git a/openfl/federated/__init__.py b/openfl/federated/__init__.py index 72aaac4aea..a8b443c059 100644 --- a/openfl/federated/__init__.py +++ b/openfl/federated/__init__.py @@ -16,6 +16,11 @@ from openfl.federated.task import KerasTaskRunner if util.find_spec("torch") is not None: os.environ["SETUPTOOLS_USE_DISTUTILS"] = "stdlib" + import sys + + import typing_extensions + + sys.modules["pip._vendor.typing_extensions"] = typing_extensions from openfl.federated.data import PyTorchDataLoader from openfl.federated.task import PyTorchTaskRunner if util.find_spec("xgboost") is not None: diff --git a/pyproject.toml b/pyproject.toml index 026272aff0..0c3e920427 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,4 +32,10 @@ ignore = [ [tool.ruff.lint.isort] force-single-line = false -known-first-party = ["openfl"] \ No newline at end of file +known-first-party = ["openfl"] + +[tool.coverage.run] +omit = [ + # omit pytorch-generated files in /tmp + "/tmp/*", +] \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 4685c1532c..b27cca091a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,7 +9,7 @@ matplotlib==3.10.1 fpdf2==2.8.2 papermill==2.6.0 pyfakefs==5.8.0 -torch==2.4.1 +torch==2.7.0 boto3==1.37.19 moto==5.1.1 -torchvision==0.19.1 \ No newline at end of file +torchvision==0.22.0