Commit 28ca9ae5 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

[dask] Remove the explicit dask client shutdown.

parent 33e18405
Pipeline #45358 failed with stage
in 4 minutes and 26 seconds
......@@ -148,15 +148,14 @@ def annotate(
else:
scheduler="single-threaded"
# Splits the samples list into bags
dask_bags = to_dask_bags.transform(samples)
logger.info(f"Saving annotations in {output_dir}.")
logger.info(f"Annotating {len(samples)} samples...")
dask_bags = to_dask_bags.transform(samples)
annotator.transform(dask_bags).compute(scheduler=scheduler)
if dask_client is not None:
logger.info("Shutdown workers...")
dask_client.shutdown()
logger.info("Done.")
logger.info("All annotations written.")
@click.command(
......@@ -254,6 +253,7 @@ def annotate_samples(
)
for s in samples
]
# Splits the samples list into bags
dask_bags = to_dask_bags.transform(samples_obj)
......@@ -261,7 +261,4 @@ def annotate_samples(
logger.info(f"Annotating {len(samples_obj)} samples...")
annotator.transform(dask_bags).compute(scheduler=scheduler)
if dask_client is not None:
logger.info("Shutdown workers...")
dask_client.shutdown()
logger.info("Done.")
logger.info("All annotations written.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment