Hi everyone, has anyone had experience using Dask ...
# ask-community
d
Hi everyone, has anyone had experience using Dask and faced a pickling error? Right now my setup is that I have a Prefect work pool with a worker and server both hosted on AWS ECS. But I have one flow that uses Dask and I get the following message
TypeError: ('Could not serialize object of type LLGExpr',
for the Prefect task that I'm submitting to Dask/task runner. I've faced this issue before and didn't manage to find a fix but was just curious if anyone else has faced something similar
n
some things are genuinely not pickleable but sometimes you can tweak the thing so it serializes differently
not strictly about caching, but serialization in general
d
Thanks! and just to check LLGExpr isn't something Prefect specific right? I assumed it was from the upstream (Dask)
n
yea that's not a prefect thing
👍 1
if your usage seems normal to you, feel free to create an issue or discussion and we can check out whether there's something to improve in
prefect-dask
d
Sounds good, will try this out. Thanks again!
So after skimming through the docs, I don't think this applies to my case. I didn't include the full error message but
TypeError: ('Could not serialize object of type LLGExpr'
is referring to a function/task that couldn't be serialized, not a task input.
prefect-dask has worked on much simpler cases/tasks, but for some reason when I start using it on more practical use cases I face the same LLGExpr pickling issue
n
if you have an MRE for that, please feel free to share
d
will get back to you on that
🙏 1
I think
lol I was trying to make an MRE (ie. make my script simpler) and I think it ended up working
catjam 1
n
that is part of why we ask for MREs 🙂
🔥 1
d
so my tasks had a failure handler attached to them which was linked to a boto3 library function I made. I think that was the issue since I don't believe aws clients are pickle-able
though I feel like we could get around that with the non-serializable cache page you sent earlier