Open rbavery opened 5 years ago
solved, I switched to using the dashboard
Also present in Dask 2.9.2. Just ran into this when trying to run on a machine where I would prefer not opening a webpage.
x = dask.compute(*results) # start computation in the background
progress(x) # watch progress
This bug arises because x
doesn't have any Dask futures attached to it. The dask.compute function is blocking and returns concrete results, not things on which you can reasonably call progress
. Probably you wanted something like dask.persist
here.
But, we shouldn't err in this case. I think that the challenge here is that we're only calling _draw_bar
if there are keys to draw
if self.keys and not self.widget.children:
self.make_widget(all)
If someone wants to make things more robust to empty key sets that would be welcome. This shouldn't require deep Dask experience to solve.
@mrocklin -- I just tried this code which - if I understand your comment above correctly - shouldn't work, but it does. Any pointers to better understand what's going on here?
import random
from time import sleep
import dask
# simulate work
@dask.delayed
def work(x):
sleep(x)
return True
# generate tasks
random.seed(42)
tasks = [work(random.randint(1,5)) for x in range(50)]
client = Client()
futures = client.compute(tasks)
progress(futures)
@rrpelgrim confusingly, client.compute
and dask.compute
are different. client.compute
is non-blocking and returns Futures. dask.compute
blocks until the computation is done and returns the actual results (not Futures).
Canonical code that used to run doesn't seem to anymore. ds = xr.open_dataset(... progress(ds)
Seems distributed is just broken then? Adding client.compute(ds) in between has no effect either.
I was getting an error that ipywidgets was not installed when I ran the following code
so then I installed ipywidgets version 7.5.1 in my conda environment that contains Dask and got this error when running the same code again
I'm not sure what the issue is here, seems to be some sort of version conflict between packages or other internal issue since I'm not invoking the "elapsed_time" attribute directly.
I'm using jupyterlab version 1.0.9, python 3.7, and dask version 2.3