wx-ai deployment list

Retrieves the list of deployments for the specified space or project.

Syntax

cpd-cli wx-ai deployment list \
[--asset-id=<asset-id>] \
[--conflict=<conflict>] \
[--name=<deployment-name>] \
[--project-id=<project-id>] \
[--prompt-template-id=<prompt-template-id>] \
[--serving-name=<serving-name>] \
[--space-id=<space-identifier>] \
[n=<state-filter-value>] \
[--tag-value=<comma-separated-tag-value-list>] \
[--type=<deployment-type>]

Options

Table 1: Command options
Option Description
--asset-id The ID of the referenced deployment. This option provides a value for a sub-field of the JSON option asset. It is mutually exclusive with the asset option.
Status
Optional.
Syntax
--asset-id=<asset-id>
Default value
--asset-id
Valid values
String.
--conflict Returns whether 'serving_name' is available for use. This option cannot be used with any other option except for 'serving_name'.
Status
Optional.
Syntax
--conflict=<conflict>
Input type
Boolean.
Default value
False.
--name Specify the name of the deployment.
Status
Required.
Syntax
--name=<deployment-name>
Default value
No default.
Input type
string
--project-id The project that contains the deployment. Either space_id or project_id must be given.
Status
Optional.
Syntax
--project-id=<project-id>
Input type
string
Default value
No default.
--prompt-template-id The ID of the referenced deployment. The prompt-template-id option provides a value for a sub-field of the JSON option prompt-template. It is mutually exclusive with the prompt-template option.
Status
Optional.
Syntax
--prompt-template-id=<prompt-template-id>
Default value
No default.
Input type
string
Valid values
A valid project identifier.
--serving-name Specify a 'serving_name'. The deployment (if any) that contains the specified 'serving_name' is returned.
Status
Optional.
Syntax
--serving-name=<serving-name>
Default value
No default.
Input type
string
--space-id The space that contains the deployment. Either space_id or project_id must be given.
Status
Optional.
Syntax
--space-id=<space-identifier>
Default value
No default.
Input type
string
n Specify a state filter value to retrieve resources. Allowed values are 'initializing', 'updating', 'ready' and 'failed'.
Status
Optional.
Syntax
n=<state-filter-value>
Default value
No default.
Input type
string
--tag-value Specify a comma-separated tag value list. Only resources with the specified tag values are returned.
Status
Optional.
Syntax
--tag-value=<comma-separated-tag-value-list>
Default value
No default.
Input type
string
--type Retrieves the resources that are filtered with the specified type.
Status
Required.
Syntax
--type=<deployment-type>
Default value
No default.
Input type
string
Valid values

f the deployment type includes a prompt template, you can use the deployment type and the prompt_template.The following deployment types are supported:

prompt_tune
When a prompt-tuned model is deployed.
foundation_model
When a prompt template is used on a pre-deployed IBM provided model.
The following deployment types can be combined with the flag prompt_template:
type=prompt_tune
Return all prompt-tuned model deployments.
type=prompt_tune and prompt_template
Return all prompt-tuned model deployments with a prompt template.
type=foundation_model
Return all prompt template deployments.
type=foundation_model and prompt_template
Return all prompt template deployments. This is the same as the previous query because a foundation_model can exist only with a prompt template.
type=prompt_template
Return all deployments with a prompt template.

Examples

cpd-cli wx-ai deployment list \
    --asset-id exampleString \
    --conflict false \
    --name exampleString \
    --project-id a77190a2-f52d-4f2a-be3d-7867b5f46edc \
    --prompt-template-id exampleString \
    --serving-name classification \
    --space-id 63dc4cf1-252f-424b-b52d-5cdd9814987f \
    n exampleString \
    --tag-value exampleString \
    --type exampleString 

Example output

Get all prompt tune deployments.

{
  "limit" : 10,
  "first" : {
    "href" : "https://us-south.ml.cloud.ibm.com/ml/v4/deployments"
  },
  "resources" : [ {
    "metadata" : {
      "id" : "6213cf1-252f-424b-b52d-5cdd9814956c",
      "created_at" : "2023-05-02T16:27:51Z",
      "project_id" : "12ac4cf1-252f-424b-b52d-5cdd9814987f",
      "name" : "text_classification",
      "description" : "Classification prompt tuned model deployment",
      "tags" : [ "classification" ]
    },
    "entity" : {
      "asset" : {
        "id" : "4cedab6d-e8e4-4214-b81a-2ddb122db2ab"
      },
      "deployed_asset_type" : "prompt_tune",
      "online" : { },
      "base_model_id" : "google/flan-t5-xl",
      "status" : {
        "state" : "ready",
        "message" : {
          "level" : "info",
          "text" : "The deployment is successful"
        },
        "inference" : [ {
          "url" : "https://us-south.ml.cloud.ibm.com/ml/v1/deployments/2cd0bcda-581d-4f04-8028-ec2bc90cc375/text/generation"
        }, {
          "url" : "https://us-south.ml.cloud.ibm.com/ml/v1/deployments/2cd0bcda-581d-4f04-8028-ec2bc90cc375/text/generation_stream",
          "sse" : true
        } ]
      }
    }
  } ]
}