Is it possible to wait for caching in dask to complete `.persist ()`?

Since it .persist()caches data in the background, I wonder if it is possible to wait until the caching is complete, and then perform the following steps. Also, is there a way to get a progress bar for the caching process? Many thanks

+4
source share
1 answer

Yes, the features you are looking for are exactly named waitand progress.

from dask.distributed import wait, progress

The function progressaccepts any object as an icon and displays a progress bar.

>>> progress(x)
[XXXXXXX................]  5.2 seconds

IPython, IPython. IPython Python, progress .

Jupyter, wait, .

wait(x)

http://distributed.readthedocs.io/en/latest/api.html#distributed.client.wait http://distributed.readthedocs.io/en/latest/api.html#distributed.diagnostics.progress

+2

Source: https://habr.com/ru/post/1668066/


All Articles