Skip to content

Commit

Permalink
Merge pull request #106 from ikrommyd/revert-104-progress-with-client
Browse files Browse the repository at this point in the history
fix: Revert "fix: show progress bar with client"
  • Loading branch information
ikrommyd authored Oct 4, 2024
2 parents a8aa8dd + a93c8fb commit b152500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions scripts/run_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit b152500

Please sign in to comment.