chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
@@ -0,0 +1,28 @@
from fastapi import FastAPI
from ray import serve
from ray.serve.handle import DeploymentHandle
app1 = FastAPI()
app2 = FastAPI()
@serve.deployment
@serve.ingress(app2)
class SubModel:
def add(self, a: int):
return a + 1
@serve.deployment
@serve.ingress(app1)
class Model:
def __init__(self, submodel: DeploymentHandle):
self.submodel = submodel
@app1.get("/{a}")
async def func(self, a: int):
return await self.submodel.add.remote(a)
invalid_model = Model.bind(SubModel.bind())