-
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
chore: centralize wait task in substrasdk #147
chore: centralize wait task in substrasdk #147
Conversation
FL-1052 move `wait_task` & `wait_compute_plan`
ContextCurrently we have 3 imlementations to wait for compute tasks/ compute plans: SpecificationAcceptance criteriaHaving these features defined once in |
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.
thx a lot :D did you try that it work in local mode too ?
tests/dependency/test_dependency.py
Outdated
@@ -142,7 +141,7 @@ def test_pypi_dependency( | |||
function_key = self._register_function(dummy_algo_class(), algo_deps, client, session_dir) | |||
|
|||
train_task = self._register_train_task(function_key, numpy_datasets[0], constant_samples[0], client) | |||
utils.wait(client, train_task) | |||
client.wait_task(train_task.key, raises=True) |
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.
client.wait_task(train_task.key, raises=True) | |
client.wait_task(train_task.key) |
Nitpicking but raises=True is the default
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.
I was thinking about that, but knowing that this is used instead of the assert
, if we change the default, these tests will stop testing anything silently. But if you consider this is not a risk, happy to revert it!
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.
Makes sense ! lets keep it this way :)
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.
LGTM thanks !
tests/dependency/test_dependency.py
Outdated
@@ -142,7 +141,7 @@ def test_pypi_dependency( | |||
function_key = self._register_function(dummy_algo_class(), algo_deps, client, session_dir) | |||
|
|||
train_task = self._register_train_task(function_key, numpy_datasets[0], constant_samples[0], client) | |||
utils.wait(client, train_task) | |||
client.wait_task(train_task.key, raises=True) |
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.
Makes sense ! lets keep it this way :)
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
…ient.wait_xxx` in tests Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
7af0e75
to
b61f8d5
Compare
Related issue
_wait
,wait_task
andwait_compute_plan
onsubstra.Client
substra#368Client.wait_compute_plan
substra-documentation#327Summary
Centralize
wait_task
andwait_compute_plan
, and re-use the implementation added insubstra
through the other components.Notes
Fixes FL-1052
Please check if the PR fulfills these requirements