diff --git a/scripts/run_analysis.py b/scripts/run_analysis.py index 4d72c9e1..aa252751 100644 --- a/scripts/run_analysis.py +++ b/scripts/run_analysis.py @@ -9,7 +9,7 @@ import dask from dask.diagnostics import ProgressBar -from dask.distributed import Client, LocalCluster, performance_report, progress +from dask.distributed import Client, LocalCluster, performance_report from egamma_tnp.config import binning_manager from egamma_tnp.utils import runner_utils @@ -198,9 +198,7 @@ def main(): if client: with performance_report(filename="/tmp/dask-report.html"): logger.info("The performance report will be saved in /tmp/dask-report.html") - futures = client.compute(to_compute) - progress(futures) - out = client.gather(futures) + (out,) = dask.compute(to_compute, scheduler="distributed") else: with ProgressBar(): (out,) = dask.compute(to_compute, scheduler=scheduler) diff --git a/tests/test_cli.py b/tests/test_cli.py index bc7849a1..2d6c6d4a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -29,7 +29,7 @@ def assert_arrays_equal(a1, a2): def test_cli(): subprocess.run( - "run_analysis --config tests/example_runner.json --settings tests/example_settings.json --fileset tests/example_fileset.json --binning tests/example_binning.json --output tests/output --executor distributed --cores 1 --dashboard_address 8786", + "run_analysis --config tests/example_runner.json --settings tests/example_settings.json --fileset tests/example_fileset.json --binning tests/example_binning.json --output tests/output --executor threads", shell=True, check=True, )