diff --git a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py index 731b47c..b69a06b 100644 --- a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py +++ b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py @@ -44,6 +44,8 @@ def run_prediction_processing(*, fn, predictions): - if any child process is terminated, all prediction processing will abort - after prediction processing is done, all child processes are terminated + Note that the results are returned in completing order. + Parameters ---------- fn : function diff --git a/tests/test_evaluate_helpers.py b/tests/test_evaluate_helpers.py index 20d75dd..d0856b6 100644 --- a/tests/test_evaluate_helpers.py +++ b/tests/test_evaluate_helpers.py @@ -31,6 +31,8 @@ def working_process(p): + if p == "prediction1": + time.sleep(2) return f"{p} result" @@ -75,7 +77,7 @@ def test_prediction_processing(): result = run_prediction_processing( fn=working_process, predictions=predictions ) - assert ["prediction1 result", "prediction2 result"] == result + assert {"prediction1 result", "prediction2 result"} == set(result) def test_prediction_processing_error():