Skip to main content

List LLM Deployments

You have two options to list deployed LLMs - one that returns a list of deployment objects and one that prints a concise table for easier reference.

pc.list_llm_deployments

pc.list_llm_deployments()

This method lists all of your LLM deployments in Predibase. You can filter by deployments that are active or fetch all deployments (including ones that are still pending). You can also choose to print a concise table instead of fetching a list of objects.

Parameters:

active_only: Optional[bool]

True or False: filters the list by deployments with an active status.

print_as_table: Optional[bool]

True or False: if true, nothing is returned and a table is printed to stdout.

Returns:

A list of your LLM deployments in Predibase, represented by their configurations, or None if print_as_table == True*.

Example Usage:

List a currently deployed LLM (e.g. from the previous page).

pc.list_llm_deployments()
# ╒═════════════════════════╤════════════════════════════════╤════════════════════╤════════════╕
# │ name │ modelName │ deploymentStatus │ isShared │
# ╞═════════════════════════╪════════════════════════════════╪════════════════════╪════════════╡
# │ llama-2-13b-chat │ meta-llama/Llama-2-13b-chat-hf │ active │ True │
# ├─────────────────────────┼────────────────────────────────┼────────────────────┼────────────┤
# │ opt-350m │ facebook/opt-350m │ active │ True │
# ...

pc.list_llm_deployments(print_as_table=False)
# [
# {
# 'id': 2025,
# 'name': 'llama-2-13b',
# 'modelName': 'meta-llama/Llama-2-13b',
# 'deploymentStatus': 'active',
# ...
# },
# {...},
# ...
# ]