Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: torch examples on cpu #375

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
" index_generator=index_generator,\n",
" dataset=TorchDataset,\n",
" seed=seed,\n",
" use_gpu=False,\n",
" )"
]
},
Expand Down Expand Up @@ -574,6 +575,8 @@
"As a last step before launching our experiment, we need to specify the third parties dependencies required to run it.\n",
"The [Dependency](https://docs.substra.org/en/stable/substrafl_doc/api/dependency.html) object is instantiated in order to install the right libraries in\n",
"the Python environment of each organization.\n",
"\n",
"The CPU torch version is installed here to have a `Dependency` object as light as possible as we don't use GPUs (`use_gpu` set to `False`). Remove the `--extra-index-url` to install the cuda torch version.\n",
"\n"
]
},
Expand All @@ -587,7 +590,7 @@
"source": [
"from substrafl.dependency import Dependency\n",
"\n",
"dependencies = Dependency(pypi_dependencies=[\"numpy==1.24.3\", \"torch==2.0.1\", \"scikit-learn==1.3.1\"])"
"dependencies = Dependency(pypi_dependencies=[\"numpy==1.24.3\", \"scikit-learn==1.3.1\", \"torch==2.0.1\", \"--extra-index-url https://download.pytorch.org/whl/cpu\"])"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@
" index_generator=index_generator,\n",
" dataset=TorchDataset,\n",
" seed=seed,\n",
" use_gpu=False,\n",
" )\n",
"\n",
"\n",
Expand Down Expand Up @@ -923,7 +924,7 @@
"source": [
"from substrafl.dependency import Dependency\n",
"\n",
"dependencies = Dependency(pypi_dependencies=[\"numpy==1.24.3\", \"torch==2.0.1\", \"scikit-learn==1.3.1\"])"
"dependencies = Dependency(pypi_dependencies=[\"numpy==1.24.3\", \"scikit-learn==1.3.1\", \"torch==2.0.1\", \"--extra-index-url https://download.pytorch.org/whl/cpu\"])"
]
},
{
Expand Down
Loading