Skip to content

Commit

Permalink
decrease number or daemons
Browse files Browse the repository at this point in the history
  • Loading branch information
agoscinski committed Sep 10, 2024
1 parent f27c25c commit 45eb592
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/gallery/howto/autogen/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,16 @@ def parallel_add(nb_it):
)

# %%
# We increase the number of workers by one
# We increase the number of workers by one. One can also do this in the workgraph GUI.

client = get_daemon_client()
client.increase_workers(5)
client.increase_workers(1)

# %%
# Now we submit again and the time have shortens a bit.

wg = WorkGraph("wg_daemon_worker_2")
wg.add_task(parallel_add, name="parallel_add", nb_it=5)
# wg.submit(wait=True)
wg.submit(wait=True)
print(
f"Time for running with {client.get_numprocesses()['numprocesses']} worker",
Expand Down

0 comments on commit 45eb592

Please sign in to comment.