`@serving` functions in separate files
nicognaW opened this issue · comments
Hi, I'm having an issue with inconsistent deployment behavior between deploying locally and on jCloud.
For my specific need, I have my app package, and all the @serving
functions are declared in separate files in this app package like this:
├── app
│ ├── __init__.py
│ ├── app.py
│ ├── lcapp1.py
│ └── lcapp2.py
The @serving
functions are declared in lcapp1.py
and lcapp2.py
, and if I import them in __init__.py
like this:
from .lcapp1 import *
from .lcapp2 import *
__all__ = ["lcapp1function", "lcapp2function"]
And with lc-serve deploy local
I will have lcapp1function
and lcapp2function
APIs ready. But for lc-serve deploy jcloud
these APIs will not be created.
I looked up the official implementations of apps, and they all have an app.py
located in their app packages, I wonder if there's a recommended way to declare @serving
function separately.
Alternatively, if I can deploy multiple apps in a single flow?
Hey @nicognaW, this is now supported with v0.0.57 release. Please update to the latest version & check out this example to deploy endpoints from different files.