diff --git a/CHANGELOG.md b/CHANGELOG.md index 06412602..a26cbf7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add `shared state` and `local state` definition in SubstraFL overview ([#321](https://github.com/Substra/substra-documentation/pull/321)) - add `rank` definition in the Substra concepts ([#321](https://github.com/Substra/substra-documentation/pull/321)) - Add experiment name for SubstraFL example ([#323](https://github.com/Substra/substra-documentation/pull/323)) +- Use `Client.wait_compute_plan` in `substrafl_examples/get_started/run_mnist_torch.py` ([#327](https://github.com/Substra/substra-documentation/pull/327)) ## [0.28.0] diff --git a/substrafl_examples/get_started/run_mnist_torch.py b/substrafl_examples/get_started/run_mnist_torch.py index 90ad1d39..be0d5b99 100644 --- a/substrafl_examples/get_started/run_mnist_torch.py +++ b/substrafl_examples/get_started/run_mnist_torch.py @@ -474,14 +474,8 @@ def __init__(self): # Explore the results # ******************* -import time - -# if we are using remote clients, we have to wait until the compute plan is done before getting the results -while ( - client_0.get_compute_plan(compute_plan.key).status == "PLAN_STATUS_DOING" - or client_0.get_compute_plan(compute_plan.key).status == "PLAN_STATUS_TODO" -): - time.sleep(2) +# The results will be available once the compute plan is completed +client_0.wait_compute_plan(compute_plan.key) # %% # List results # ============