-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix(benchmark/camelyon): actually rely on gpu setup at Dependency
level
#244
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ def substrafl_fed_avg( | |
asset_keys_path: Path, | ||
cp_name: Optional[str], | ||
cancel_cp: bool = False, | ||
torch_gpu: bool = False, | ||
use_gpu: bool = False, | ||
) -> benchmark_metrics.BenchmarkResults: | ||
"""Execute Weldon algorithm for a fed avg strategy with substrafl API. | ||
|
||
|
@@ -68,7 +68,7 @@ def substrafl_fed_avg( | |
Otherwise, all present keys in this fill will be reused per Substra in remote mode. | ||
cp_name ben): (Optional[str]): Compute Plan name to display | ||
cancel_cp (bool): if set to True, the CP will be canceled as soon as it's registered. Only work for remote mode. | ||
torch_gpu (bool): Use GPU default index for pytorch | ||
use_gpu (bool): Use GPU for Dependency object | ||
Returns: | ||
dict: Results of the experiment. | ||
""" | ||
|
@@ -97,7 +97,7 @@ def substrafl_fed_avg( | |
"torch==2.3.0", | ||
"scikit-learn==1.5.1", | ||
] | ||
if not torch_gpu: | ||
if not use_gpu: | ||
pypi_dependencies += ["--extra-index-url https://download.pytorch.org/whl/cpu"] | ||
|
||
# Dependencies | ||
|
@@ -108,6 +108,7 @@ def substrafl_fed_avg( | |
# Keeping editable_mode=True to ensure nightly test benchmarks are ran against main substrafl git ref | ||
editable_mode=True, | ||
compile=True, | ||
use_gpu=use_gpu, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The renaming is not necessary, you can just set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it was mainly for consistency through the workflow and to avoid having a third variable name for this. If you prefer keeping |
||
) | ||
|
||
# Metrics | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Actually trigger the GPU docker configuration with `use_gpu` flag when running Camelyon benchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break the CI, need to do a companion PR on
test-release-dev.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is identified, and it will be updated - but thanks for the reminder!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/owkin/substra-ci/pull/174/commits/dbc718caaf32a04e38700eee48f7ca35bef2ad4d