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
add %%px --local
for local execution
#2753
Conversation
So that a cell can be run on engines *as well as* the local namespace. Prompted by SO Question [14184621](http://stackoverflow.com/questions/14184621).
Wow, neat idea.
|
Agreed with @bfroehle. Ideally, the command might return a future from remote execution, starts local execution in a new thread, then waits on both. |
There are advantages to both:
@ahmadia - there is really no reason at all to do the local execution in a thread. If we do local execution after remote, all n+1 execuctions will be concurrent. I chose 1., since I really intended this for interactive definitions, where the first choice is always preferable, |
ensures concurrent execution of all n+1 executions
local is now run after async submission of remote |
@minrk - I suggested that you execute locally in a thread so that in the case the local execution spinlocks but the remote execution does not, you will be able to retrieve the remote results in a "good" state even if you have to signal/interrupt local execution. If you are not using threads to protect against this sort of behavior elsewhere in IPython I agree there's not much point in using one here. |
@ahmadia - yes, it makes sense in the abstract, just not in the Context of IPython, where there is no async local execution. |
+1 for merging the current impl from my point of view. |
add `%%px --local` for local execution local execution is concurrent with remote.
add `%%px --local` for local execution local execution is concurrent with remote.
So that a cell can be run on engines as well as the local namespace.
Prompted by SO Question 14184621.