-
Notifications
You must be signed in to change notification settings - Fork 7k
Open
Labels
P1Issue that should be fixed within a few weeksIssue that should be fixed within a few weekscommunity-backlogenhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilityserveRay Serve Related IssueRay Serve Related Issue
Description
Description
It would be great to support generics for DeploymentHandle type hints so linters can catch incorrect remote call args / response handling.
Use case
It would be great to support generics for DeploymentHandle type hints so linters can catch incorrect remote call args / response handling.
For example take this code:
@serve.deployment
@serve.ingress(fastapi_app)
class DeploymentA:
def __init__(
self, deployment_b: DeploymentHandle, deployment_c: DeploymentHandle
) -> None:
self.deployment_b = deployment_b
self.deployment_c = deployment_cIt would be nice if it can be specified more granularly as:
@serve.deployment
@serve.ingress(fastapi_app)
class DeploymentA:
def __init__(
self, deployment_b: DeploymentHandle[B], deployment_c: DeploymentHandle[C]
) -> None:
self.deployment_b = deployment_b
self.deployment_c = deployment_cabrarsheikh
Metadata
Metadata
Assignees
Labels
P1Issue that should be fixed within a few weeksIssue that should be fixed within a few weekscommunity-backlogenhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilityserveRay Serve Related IssueRay Serve Related Issue