wx-ai deployment create
Creates a deployment. The only supported type is online.
If this deployment is created for a prompt tune, then the asset object must
exist and the id must be the id of the model that
was created after the prompt training. If this deployment is created for a prompt template, then the
prompt_template object must exist and the id must be the
id of the prompt template to be deployed.
Syntax
cpdctl wx-ai deployment create \
[--asset ASSET | --asset-id ASSET-ID] \
[--asset-rev ASSET-REV] \
[--base-model-id BASE-MODEL-ID] \
[--custom CUSTOM] \
[--description DESCRIPTION] \
[--hardware-spec HARDWARE-SPEC | --hardware-spec-id HARDWARE-SPEC-ID] \
--hardware-spec-name HARDWARE-SPEC-NAME \
--hardware-spec-num-nodes HARDWARE-SPEC-NUM-NODES] \
--hardware-spec-rev HARDWARE-SPEC-REV \
--name NAME \
[--online ONLINE | --online-parameters ONLINE-PARAMETERS] \
[--project-id PROJECT-ID] \
[--prompt-template PROMPT-TEMPLATE] | --prompt-template-id PROMPT-TEMPLATE-ID] \
[--space-id SPACE-ID] \
[--tags TAGS]
Options
| Option | Description |
|---|---|
--asset (Rel) |
A reference to a deployment. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.
|
--asset-id (string) |
The ID of the referenced deployment. This option provides a value for a sub-field of the JSON
option
|
--asset-rev (string) |
The revision of the referenced deployment. This option provides a value for a sub-field of the
JSON option
|
--base-model-id (string) |
The base model that is required for this deployment if this deployment is for a prompt template or a prompt tune for an IBM foundation model.
|
--custom (generic map) |
User-defined properties that are specified as key-value pairs.
|
--description (string) |
A description of the deployment.
|
--hardware-spec (HardwareSpec) |
A hardware specification. This JSON option can be provided by setting individual fields with other options. It is mutually exclusive with those options.
|
--hardware-spec-id (string) |
The ID of the hardware specification. One, and only one, of
|
--hardware-spec-name (string) |
The name of the hardware specification. One, and only one, of
|
--hardware-spec-num-nodes (int64) |
The number of nodes that are applied to a computation. This option provides a value for a
sub-field of the JSON option
|
--hardware-spec-rev (string) |
The revision of the hardware specification if
|
--name (string) |
The name of the deployment.
|
--online (OnlineDeployment) |
Indicates that this deployment is an online deployment. An object must be specified but can be empty. The
|
--online-parameters (OnlineDeploymentParameters) |
A set of key-value pairs that are used to configure the deployment. This option provides a value
for a sub-field of the JSON option
|
--project-id (string) |
The project that contains the deployment. Either
|
--prompt-template (SimpleRel) |
A reference to a deployment. This JSON option can be provided by setting individual fields with other options. It is mutually exclusive with those options.
|
--prompt-template-id (string) |
The ID of the referenced deployment. This option provides a value for a sub-field of the JSON
option
|
--space-id (string) |
The space that contains the deployment. Either
|
--tags (string) |
A list of tags for this deployment.
|
Examples
cpdctl wx-ai deployment create \
--name text_classification \
--online '{"parameters": {"serving_name": "churn"}}' \
--project-id 12ac4cf1-252f-424b-b52d-5cdd9814987f \
--space-id exampleString \
--description exampleString \
--tags exampleString,anotherTestString \
--custom '{"anyKey": "anyValue"}' \
--asset '{"id": "4cedab6d-e8e4-4214-b81a-2ddb122db2ab", "rev": "2"}' \
--prompt-template '{"id": "4cedab6d-e8e4-4214-b81a-2ddb122db2ab"}' \
--hardware-spec '{"id": "4cedab6d-e8e4-4214-b81a-2ddb122db2ab", "rev": "2", "name": "exampleString", "num_nodes": 2}' \
--base-model-id exampleString
Alternatively, granular options are available for the sub-fields of JSON string options:
cpdctl wx-ai deployment create \
--name text_classification \
--project-id 12ac4cf1-252f-424b-b52d-5cdd9814987f \
--space-id exampleString \
--description exampleString \
--tags exampleString,anotherTestString \
--custom '{"anyKey": "anyValue"}' \
--base-model-id exampleString \
--online-parameters onlineDeploymentParameters \
--asset-id 4cedab6d-e8e4-4214-b81a-2ddb122db2ab \
--asset-rev 2 \
--prompt-template-id 4cedab6d-e8e4-4214-b81a-2ddb122db2ab \
--hardware-spec-id 4cedab6d-e8e4-4214-b81a-2ddb122db2ab \
--hardware-spec-rev 2 \
--hardware-spec-name exampleString \
--hardware-spec-num-nodes 2