diff --git a/openfl-workspace/torch_cnn_histology/requirements.txt b/openfl-workspace/torch_cnn_histology/requirements.txt index 8769713a29..241bea49f4 100644 --- a/openfl-workspace/torch_cnn_histology/requirements.txt +++ b/openfl-workspace/torch_cnn_histology/requirements.txt @@ -1,3 +1,3 @@ -setuptools==65.5.1 +setuptools>=65.5.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 28cfa849a6..2e87113a01 100644 --- a/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt +++ b/openfl-workspace/torch_cnn_histology_fedcurv/requirements.txt @@ -1,3 +1,3 @@ -setuptools==65.5.1 +setuptools>=65.5.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 8769713a29..241bea49f4 100644 --- a/openfl-workspace/torch_cnn_mnist/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist/requirements.txt @@ -1,3 +1,3 @@ -setuptools==65.5.1 +setuptools>=65.5.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 387b4c3b68..2dbd508654 100644 --- a/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_eden_compression/requirements.txt @@ -1,4 +1,4 @@ -setuptools==65.5.1 +setuptools>=65.5.1 tensorboard torch==2.4.1 torchvision==0.19.1 diff --git a/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt b/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt index 387b4c3b68..2dbd508654 100644 --- a/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_fed_eval/requirements.txt @@ -1,4 +1,4 @@ -setuptools==65.5.1 +setuptools>=65.5.1 tensorboard torch==2.4.1 torchvision==0.19.1 diff --git a/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt b/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt index c17d7cd3cf..fc4c47d516 100644 --- a/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt +++ b/openfl-workspace/torch_cnn_mnist_straggler_check/requirements.txt @@ -1,6 +1,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 +setuptools>=65.5.1 tensorboard torch==2.4.1 torchvision==0.19.1 diff --git a/openfl-workspace/torch_llm_horovod/requirements.txt b/openfl-workspace/torch_llm_horovod/requirements.txt index d428d8239b..63b7bc9f72 100644 --- a/openfl-workspace/torch_llm_horovod/requirements.txt +++ b/openfl-workspace/torch_llm_horovod/requirements.txt @@ -1,4 +1,4 @@ -setuptools==65.5.1 +setuptools>=65.5.1 accelerate datasets evaluate diff --git a/openfl-workspace/torch_template/requirements.txt b/openfl-workspace/torch_template/requirements.txt index 77baf21fd1..3b0bc9433a 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 +setuptools>=65.5.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 a1facd5bfd..073013d389 100644 --- a/openfl-workspace/torch_unet_kvasir/requirements.txt +++ b/openfl-workspace/torch_unet_kvasir/requirements.txt @@ -1,4 +1,4 @@ -setuptools==65.5.1 +setuptools>=65.5.1 scikit-image==0.24.0 torch==2.4.1 torchvision==0.19.1 diff --git a/openfl/interface/workspace.py b/openfl/interface/workspace.py index 522ff99b5f..ddf473de82 100644 --- a/openfl/interface/workspace.py +++ b/openfl/interface/workspace.py @@ -4,6 +4,7 @@ """Workspace module.""" +import setuptools # this import is added to avoid error: assert '_distutils' in core.__file__, core.__file__ import logging import os import shutil @@ -66,7 +67,6 @@ def create_dirs(prefix): (prefix / "data").mkdir(parents=True, exist_ok=True) # training data (prefix / "logs").mkdir(parents=True, exist_ok=True) # training logs (prefix / "save").mkdir(parents=True, exist_ok=True) # model weight saves / initialization - (prefix / "local_state").mkdir(parents=True, exist_ok=True) # persistent state (prefix / "src").mkdir(parents=True, exist_ok=True) # model code shutil.copyfile(WORKSPACE / "workspace" / ".workspace", prefix / ".workspace") @@ -355,7 +355,6 @@ def export_() -> str: # os.makedirs(os.path.join(tmp_dir, 'save'), exist_ok=True) os.makedirs(os.path.join(tmp_dir, "logs"), exist_ok=True) os.makedirs(os.path.join(tmp_dir, "data"), exist_ok=True) - os.makedirs(os.path.join(tmp_dir, "local_state"), exist_ok=True) shutil.copytree("src", os.path.join(tmp_dir, "src"), ignore=ignore) shutil.copytree("plan", os.path.join(tmp_dir, "plan"), ignore=ignore) shutil.copytree("save", os.path.join(tmp_dir, "save")) @@ -365,7 +364,7 @@ def export_() -> str: if not os.path.isfile(_ws_identifier_file): openfl_ws_identifier_file = os.path.join(WORKSPACE, "workspace", _ws_identifier_file) logging.warning( - f"`{_ws_identifier_file}` is missing, copying {openfl_ws_identifier_file} as-is." + f"`{_ws_identifier_file}` is missing, " f"copying {openfl_ws_identifier_file} as-is." ) shutil.copy2(openfl_ws_identifier_file, tmp_dir) shutil.copy2(_ws_identifier_file, tmp_dir) @@ -430,7 +429,10 @@ def dockerize_(context, save: bool, rebuild: bool, enclave_key: str, revision: s # Build OpenFL base image. logging.info("Building OpenFL Base image") base_image_build_cmd = ( - "DOCKER_BUILDKIT=1 docker build {options} -t {image_name} -f {dockerfile} {build_context}" + "DOCKER_BUILDKIT=1 docker build {options} " + "-t {image_name} " + "-f {dockerfile} " + "{build_context}" ).format( options=options, image_name="openfl",