-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threads and multiprocessing #18
Comments
|
i'm thinking that it could take a while to execute a remote command on the cluster. but we could help the code execute faster on the user side by running the submit function in a thread so that their interpreter can continue before the function actually returns |
Ah, okay, that makes sense. The only command I can think of that we'd want to be non-blocking (i.e., subsequent operations are unlikely to directly depend on its output) is
|
some special cases:
|
to make the cluster.submit function return faster, it could be implemented as a thread (or multiprocess).
the submit process could also be made more robust by having cluster.submit run a single "meta" job whose sole function is to submit all of the other jobs and then save out a file with the corresponding job IDs. that way if the user ends their session after calling cluster.submit, their jobs will still be submitted and run as long as that first meta job has been submitted.
one tricky thing will be to handle job IDs, since only the meta job would have access to those IDs (i.e., not whatever session the user was running). a potential solution would be to have the meta job return only its own id. but then when cluster.collect is run on a meta job's id, it would load in the saved IDs, and then load in the corresponding results files for those IDs in a second pass (or None for jobs that haven't finished running yet).
The text was updated successfully, but these errors were encountered: