chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from ray import serve
|
||||
from ray.serve.handle import DeploymentHandle
|
||||
|
||||
|
||||
@serve.deployment(ray_actor_options={"num_cpus": 0.1})
|
||||
def f(*args):
|
||||
return "wonderful world"
|
||||
|
||||
|
||||
@serve.deployment(ray_actor_options={"num_cpus": 0.1})
|
||||
class BasicDriver:
|
||||
def __init__(self, h: DeploymentHandle):
|
||||
self._h = h
|
||||
|
||||
async def __call__(self):
|
||||
return await self._h.remote()
|
||||
|
||||
|
||||
FNode = f.bind()
|
||||
DagNode = BasicDriver.bind(FNode)
|
||||
Reference in New Issue
Block a user