Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions launch/cli/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def get_endpoint(ctx: click.Context, endpoint_name: str):
pretty_print(f"destination: {model_endpoint.destination}")
pretty_print(f"post-inference hooks: {model_endpoint.post_inference_hooks}")
pretty_print(f"default callback url: {model_endpoint.default_callback_url}")
if model_endpoint.num_queued_items is not None:
pretty_print(f"num queued items: {model_endpoint.num_queued_items}")


def _validate_int(val: str) -> int:
Expand Down
8 changes: 7 additions & 1 deletion launch/model_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,18 @@ class ModelEndpoint:
Default callback url for the endpoint.
"""

num_queued_items: Optional[int] = None
"""
Number of items currently queued for the endpoint.
"""

def __repr__(self):
return (
f"ModelEndpoint(name='{self.name}', bundle_name='{self.bundle_name}', "
f"status='{self.status}', resource_state='{json.dumps(self.resource_state)}', "
f"deployment_state='{json.dumps(self.deployment_state)}', "
f"endpoint_type='{self.endpoint_type}', metadata='{self.metadata}')"
f"endpoint_type='{self.endpoint_type}', metadata='{self.metadata}', "
f"num_queued_items='{self.num_queued_items}')"
)


Expand Down