[serve] Remove unused filter_tag and errant str redefinition (#22400)

This commit is contained in:
Edward Oakes 2022-02-15 15:33:10 -06:00 committed by GitHub
parent df4b56d32e
commit 9c07eabab9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -7,7 +7,6 @@ from ray.actor import ActorHandle
from ray.serve.config import DeploymentConfig, ReplicaConfig
from ray.serve.autoscaling_policy import AutoscalingPolicy
str = str
EndpointTag = str
ReplicaTag = str
NodeId = str

View file

@ -1543,14 +1543,11 @@ class DeploymentStateManager:
def get_running_replica_infos(
self,
filter_tag: Optional[str] = None,
) -> Dict[str, List[RunningReplicaInfo]]:
replicas = {}
for deployment_name, deployment_state in self._deployment_states.items():
if filter_tag is None or deployment_name == filter_tag:
replicas[deployment_name] = deployment_state.get_running_replica_infos()
return replicas
return {
name: deployment_state.get_running_replica_infos()
for name, deployment_state in self._deployment_states.items()
}
def get_deployment_configs(
self, filter_tag: Optional[str] = None, include_deleted: Optional[bool] = False