I ran into this where I was using Pydantic classes. I could get it to work in 3.7 but not 3.8. I read through a bunch of threads and found that the problem was defining my Pydantic classes in the scope of main instead of in module scope. Not sure I fully understand this and don't think I was doing exactly what is shown in the minimal example on April 16th in this thread.
https://github.com/samuelcolvin/pydantic/issues/2678
Anyhow I just moved all my tasks out of the file with my
__main__
in it and no the Pydantic classes can be cloud pickled.