Open kszucs opened 7 years ago
If you have many futures then as_completed may work for you. See http://distributed.readthedocs.io/en/latest/api.html#distributed.client.as_completed
It also supports the __aiter__
protocol.
On Tue, Apr 18, 2017 at 6:46 AM, Krisztián Szűcs notifications@github.com wrote:
I'd like to send progress reports through a websocket. Currently I can't find a nice way to achieve that.
Could we implement an interface similar to the following?
from distributed.diagnostics import Progress
future = client.compute(...) async for processed_key, completeness in Progress(future): logging.info(processed_key) websocket.send(completeness)
Somewhat related to #1020 https://github.com/dask/distributed/issues/1020
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dask/distributed/issues/1024, or mute the thread https://github.com/notifications/unsubscribe-auth/AASszCBdnNlKJ6n6dMe7dKoNrIKdTcMxks5rxJR_gaJpZM4NALTI .
I've tried. The same bad yield problem occurs when using on top of asyncio runner.
I also need the actual completeness percentage. How about an async iterable version of distributed.diagnostics.progress
?
Is this different from as_completed combined with some counting and division by the total number of futures?
On Tue, Apr 18, 2017 at 8:14 AM, Krisztián Szűcs notifications@github.com wrote:
I've tried. The same bad yield problem occurs when using on top of asyncio runner.
I also need the actual completeness percentage. How about an async iterable version of distributed.diagnostics.progress?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dask/distributed/issues/1024#issuecomment-294813320, or mute the thread https://github.com/notifications/unsubscribe-auth/AASszIqqZnjRHuQiBgqNV7yJO-VRgmvUks5rxKk5gaJpZM4NALTI .
Your question implicates it is not.
# dask's ProgressBar
with ProgressBar():
a_delayed_value.compute()
However what if I have just one future, which is the tip of a more complicated dag?
OK, that makes sense. You might be able to copy something in distributed/diagnostics/progressbar.py
On Tue, Apr 18, 2017 at 8:22 AM, Krisztián Szűcs notifications@github.com wrote:
Your question implicates it is not.
dask's ProgressBarwith ProgressBar():
a_delayed_value.compute()
However what if I have just one future, which is the tip of a more complicated dag?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dask/distributed/issues/1024#issuecomment-294816300, or mute the thread https://github.com/notifications/unsubscribe-auth/AASszMkbl6OCurtOdCSQSdGqXqt7-0Fvks5rxKrqgaJpZM4NALTI .
Well, I guess this depends on https://github.com/dask/distributed/pull/1021
Is the recent GroupProgress related to this issue? Could You give me a hint how to implement this one?
@kszucs these links may be helpful:
If this isn't sufficient then let me know
I'd like to send progress reports through a websocket. Currently I can't find a nice way to achieve that.
Could we implement an interface similar to the following?
Somewhat related to https://github.com/dask/distributed/issues/1020