Erroo when i try to pass function to map_partitions

Dask running in juypter notebook , here if i am passing a function to dask dataframe i.e df.map_partitions(func), every thing working fine, However, if I am trying to do the same from a python file (a FASTAPI implementation) it throws error Arguments: (ModuleNotFoundError(“No module named ‘main’”),) .
Can you help what probably might be the issue.

Hi @mohitbansal-gep,

Well, it’s a bit difficult to say without some reproducer, but I guess that your Python module/file structure is not correct. I don’t think this is related to Dask at all.