-
Notifications
You must be signed in to change notification settings - Fork 135
Description
When I originally heard the term coffea.compute, I thought it's going to be a function (and the namespace would have a different name).
I was imagining something like coffea.compute(some computable, executor=something) sort of like what dask.compute does where you tell it what to compute and some executor/scheduler.
Is this out of the question? Is there a strong reason why you preferred coffea.compute be a namespace and have backend.compute do the execution?
I thought about that originally, but context managers are very nice things to have. I see bugs in clearing the progress bar, for example, that are probably as a result of the lack of these currently that would be nice to get past once and for all.
Originally posted by @nsmith- in #1470 (comment)
A possible compromise to have both is as follows:
No context manager approach:
backend = Backend()
result = backend.compute(blah) # blockingContext manager approach:
with Backend() as backend:
task = backend.compute(blah) # non-blocking
out = task.result() # blockingInternally, the context manager just does with self: to implement.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status