Robert Banick
11/19/2024, 8:55 PM2.19.1
to Prefect 3.1.2
. Every run incurs the following error, which I've never seen before in 18 months of using Prefect 2:
Task run failed with exception: TypeError('Could not serialize object of type HighLevelGraph', '<ToPickle: HighLevelGraph with 1 layers.\n<dask.highlevelgraph.HighLevelGraph object at 0x7f4e3b547400>\n 0. 139974151916736\n>') - Retries are exhausted
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/distributed/protocol/pickle.py", line 63, in dumps
result = pickle.dumps(x, **dump_kwargs)
File "/usr/local/lib/python3.10/dist-packages/prefect/docker/__init__.py", line 20, in __getattr__
raise ImportError(f"module {__name__!r} has no attribute {name!r}")
ImportError: module 'prefect.docker' has no attribute 'isnan'
<---Long series of stack traces--->
The above exception was the direct cause of the following exception:
<<---Long stack trace--->>
File "/usr/local/lib/python3.10/dist-packages/distributed/protocol/serialize.py", line 392, in serialize
raise TypeError(msg, str_x) from exc
TypeError: ('Could not serialize object of type HighLevelGraph', '<ToPickle: HighLevelGraph with 1 layers.\n<dask.highlevelgraph.HighLevelGraph object at 0x7f4e3b547400>\n 0. 139974151916736\n>')
All of my flows write to Zarr N-Dimensional data stores using Xarray's to_zarr
method,. to_zarr
leverages Dask under the hood to vastly speed up this operation. I don't use Dask Task Runners or any specialized Prefect Dask objects.
Digging around I've found this conversation, which doesn't seem directly related https://linen.prefect.io/t/23198687/hello-everyone-i-m-facing-an-issue-using-prefect-with-a-dask. Any ideas Prefect team?
I'll post a full stack trace in follow upRobert Banick
11/19/2024, 8:57 PMNate
11/19/2024, 8:59 PMNate
11/19/2024, 9:00 PMRobert Banick
11/19/2024, 9:01 PMtask_run_name
on one of the Flow's constituent Task's, although that's not the task that fails. It's non-essential and I can take it out for troubleshootingNate
11/19/2024, 9:01 PMNate
11/19/2024, 9:01 PMI do usethats probably not the issue thenon one of the Flow's constituent Task's, although that's not the task that fails. It's non-essential and I can take it out for troubleshootingtask_run_name
Robert Banick
11/19/2024, 9:03 PMtask_run_name
was the issue eitherNate
11/19/2024, 9:04 PMRobert Banick
11/19/2024, 9:04 PMRobert Banick
11/19/2024, 9:05 PMNate
11/19/2024, 9:05 PMNate
11/19/2024, 9:05 PMFile "/usr/local/lib/python3.10/dist-packages/prefect/docker/__init__.py", line 20, in getattr
raise ImportError(f"module {name!r} has no attribute {name!r}")
ImportError: module 'prefect.docker' has no attribute 'isnan'
Robert Banick
11/19/2024, 9:05 PMRobert Banick
11/19/2024, 9:06 PMgridded_etl_template
Robert Banick
11/19/2024, 9:07 PMprefect.docker
thing also has me confused. I'm running this flow inside a docker container deployed onto an AWS Fargate box.
Is there any way there's a version mismatch inside the docker container causing obscure prefect.docker
problems?Robert Banick
11/19/2024, 9:09 PMdask[array,diagnostics,distributed]==2024.8.0
xarray[complete]==2024.3.0
zarr==2.18.3
Robert Banick
11/19/2024, 9:09 PMRobert Banick
11/19/2024, 9:11 PMgridded_etl_template
executes the steps of our normal ETL pipeline on a specific class corresponding to a dataset. That class contains a host of instance methods.Nate
11/19/2024, 9:11 PMwhich I've never seen before in 18 months of using Prefect 2:
Robert Banick
11/19/2024, 9:11 PMNate
11/19/2024, 9:12 PMRobert Banick
11/19/2024, 9:13 PMRobert Banick
11/19/2024, 9:36 PMasync
code within our ETLs so the answer for async futures is also a no.