We have this very unfortunate situation in multiple places, where you have a namespace package (meaning one that doesn't have __init__.py) with some python files and whether or not fal run will work depends on what your file is doing at import time.
We rely on searching for __init__.py to detect a python package in our serialization logic, but should also take namespace packages into account, which means doing some trickier stuff.
We could use importlib/inspect magic (similar to modal) instead of runpy, this should probably make this easier.
We have this very unfortunate situation in multiple places, where you have a namespace package (meaning one that doesn't have
__init__.py
) with some python files and whether or notfal run
will work depends on what your file is doing at import time.We rely on searching for
__init__.py
to detect a python package in our serialization logic, but should also take namespace packages into account, which means doing some trickier stuff.We could use importlib/inspect magic (similar to modal) instead of runpy, this should probably make this easier.