Accessing dispatch_id
and node_id
in Executor.run()
#944
-
With the recent revision to the Executor interface, we no longer expose the original @abstractmethod
def run(function: Callable, args: List, kwargs: Dict): While this appears cleaner than the full
Presently, the only way to access this information is to override To make matters worse, as How to expose this information to run?
@abstractmethod
def run(function: Callable, args: List, kwargs: Dict, dispatch_id: str, node_id: int):
The first approach passes the data to The second approach is taken by the SSH and Slurm plugins. However it will cease to work in the future because we are planning to allow sharing executor instances (in fact their underlying hardware resources) between multiple tasks. I also considered storing the information in context-local variables, but unfortunately |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
@cjao I agree and I am having to deal with this short coming as I am implementing the AWSLambda executor. Given the current version where To add to this discussion, the UX can be enhanced further if the @cjao thoughts? |
Beta Was this translation helpful? Give feedback.
-
quick questions, Ideally both With this in mind, @cjao / @venkatBala can you guys tell me why
(Not a bit fan of 2 as we want the creation of executers to be as simple as possible, even if it involves extra work for us.) |
Beta Was this translation helpful? Give feedback.
-
Implemented as |
Beta Was this translation helpful? Give feedback.
Implemented as
task_metadata
in #951