Skip to content

Commit

Permalink
chore: rename use_gpu to disable_gpu in TorchAlgo
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>
  • Loading branch information
ThibaultFy committed Aug 12, 2024
1 parent c642aa9 commit eec0bd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
" index_generator=index_generator,\n",
" dataset=TorchDataset,\n",
" seed=seed,\n",
" use_gpu=False,\n",
" disable_gpu=True,\n",
" )"
]
},
Expand Down Expand Up @@ -558,7 +558,7 @@
"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."
"The CPU torch version is installed here to have a `Dependency` object as light as possible as we don't use GPUs (`disable_gpu` set to `True`). Remove the `--extra-index-url` to install the cuda torch version."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@
" index_generator: NpIndexGenerator,\n",
" dataset: torch.utils.data.Dataset,\n",
" seed: Optional[int] = None,\n",
" use_gpu: bool = True,\n",
" disable_gpu: bool = False,\n",
" *args,\n",
" **kwargs,\n",
" ):\n",
Expand All @@ -678,7 +678,7 @@
" dataset (torch.utils.data.Dataset): an instantiable dataset class whose ``__init__`` arguments are\n",
" ``x``, ``y`` and ``is_inference``.\n",
" seed (typing.Optional[int]): Seed set at the algo initialization on each organization. Defaults to None.\n",
" use_gpu (bool): Whether to use the GPUs if they are available. Defaults to True.\n",
" disable_gpu (bool): Force to disable GPUs usage. Defaults to False.\n",
" \"\"\"\n",
" super().__init__(\n",
" model=model,\n",
Expand All @@ -688,7 +688,7 @@
" dataset=dataset,\n",
" scheduler=None,\n",
" seed=seed,\n",
" use_gpu=use_gpu,\n",
" disable_gpu=disable_gpu,\n",
" *args,\n",
" **kwargs,\n",
" )\n",
Expand Down Expand Up @@ -815,7 +815,7 @@
" index_generator=index_generator,\n",
" dataset=TorchDataset,\n",
" seed=seed,\n",
" use_gpu=False,\n",
" disable_gpu=True,\n",
" )\n",
"\n",
"\n",
Expand Down

0 comments on commit eec0bd9

Please sign in to comment.