I'm running a hour long computation that fetches an external API, process it and save to a dataframe. The API is using Python's request library.
By tweaking the request lib, I managed to fend off problems related to retries and reading errors, but not all possible problems are handled, of course.
Everytime the API fails, my computation just stops, and I lose one hour worth of work.
I'm calling dask like this:
dd = daskDataFrame.from_pandas(result, npartitions=20)
future = dd.compute()
Is there any way to restart Dask from the point it if failed?
By reading the documentation, there now the Client.retry() function: https://distributed.dask.org/en/latest/api.html#distributed.Client.retry
By I don't know how to use it in my code.
Is the retry function the solution? if yes, how to use it?
I also found this correlated question in SO:
Retries in dask.compute() are unclear
But I don't know if I need to implement the suggested code in the answer, or just call my compute() function with the retries parameter.