I’m currently working on a Python Package / CLI which relies on dask distributed to run tasks on a given client.
I want to supply two different interfaces.
The first one would use the import dask.distributed
and would e.g. by run in a Jupyter Notebook which keeps the kernel open.
For the second interface I’d like to have two CLI commands that would start and stop the Client.
Ideally you could then submit jobs via CLI to the client as long as it is running:
mytool start <config>
mytool submit <...>
mytool submit <...>
mytool stop
Is this possible / already implemented somewhere?
Currently I’m creating a client in every mytool submit
cmd which prohibits me from submitting multiple jobs through multiple commands.