Hello Team,
Background:
- I am using python to create an Dask SSH cluster with workers, and use it.
- I have created a try except method:
Try
for creating the SSH cluster andfinally
for closing the client and cluster. - I am using passwordless SSH currently
Question:
-
Does the client update the SSH authentication key or known host file by any chance? I have an SSH authorized key updated and wanted to clear my understanding if there is no update made by dask?
-
Can there be a chance that the dask cluster will keep running the background? is there a way to find if the cluster is still running after the code finished or failed?
-
If i donot have a authroized key but i have the host in known_host file, then will i need to provided password in the paramter here?
connect_options={"known_hosts": None, "username":<<username>>, "password":<<password>>}
-
Can i implement a code to understand that which delayed task is executed across which worker node?
Current code:
if __name__ == '__main__':
try:
# CLIENT MODE
# cluster = LocalCluster(dashboard_address=':8787', n_workers=3, threads_per_worker=1, memory_limit='16GB')
# client = Client(cluster)
# CLUSTER MODE
cluster = SSHCluster(
["localhost", "localhost", "localhost", "localhost"],
connect_options={"known_hosts": None, "username":<<username>>},
worker_options={"nthreads": 2},
scheduler_options={"port": 0, "dashboard_address": ":8797"}
remote_python = ["virtual_env_path/bin/python","virtual_env_path/bin/python"]*3
)
client = Client(cluster)
client.upload_file("test_2.py")
delayed_func()
except Exception as e:
print(f"Failed - Exception {e}")
finally:
if client:
client.close()
if cluster:
cluster.close()