Giving executors access to the original electron function #1023
kessler-frost
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now the only interface of an executor with the runnable function is through that executor's
run
method. Which takes a callable partial function, list of serialized args, and dict of serialized kwargs.Now this is sufficient for the most part assuming an executor, usually, is only responsible for sending the given function to a remote machine and retrieving its result. But there are some cases where the original function might need to be verified for certain arguments or even edited in some way before being sent to the remote machine. Something like that cannot be done for now since that'll require deserializing the function on server side, where
executor.run()
is run.One use case of this is say someone wants to check whether the function being submitted contains certain arguments, before starting to provision resources for them and submitting it, they will be able to do it on the client side during electron creation. So that if there's an issue, it is raised right when an executor gets assigned to an electron.
The UX from the user side is not going to change, the only change will be in the decorator part of electron:
and in the executor we implement the
edit_func
function.Beta Was this translation helpful? Give feedback.
All reactions