ibm_aigov_facts_client.factsheet.external_deployments module

class Deployment(asset_model_client: ModelAssetUtilities, id: str = None, name: str = None, type: str = None, scoring_endpoint: str = None, external_identifier: str = None, is_deleted: str = None, description: str = None, model_asset_id: str = None, model_name: str = None, model_container_type: str = None, model_container_id: str = None)

Bases: object

External model deployment. Running client.assets.get_deployments makes all methods in Deployment object available to use.

classmethod from_dict(_dict: Dict) Deployment

Initialize a Deployment object from a json dictionary.

to_dict() Dict

Return a json dictionary representing this deployment.

get_info(verbose=False) Dict

Get deployment object details. Supported for CPD version >=4.7.0

Return type:

dict

The way to use me is:

>>> get_deployment.get_info()
get_name() str

Returns external model’s deployment name

Returns:

external model’s deployment name

Return type:

str

Example: >>> deployment.get_name()

get_id() str

Returns external model’s deployment ID

Returns:

external model’s deployment ID

Return type:

str

Example: >>> deployment.get_id()

get_scoring_endpoint() str

Returns external model’s deployment scoring endpoint

Returns:

external model’s deployment scoring endpoint

Return type:

str

Example: >>> deployment.get_scoring_endpoint()

get_type() str

Returns external model’s deployment type

Returns:

external model’s deployment type

Return type:

str

Example: >>> deployment.get_type()

get_description() str

Returns external model’s deployment description

Returns:

external model’s deployment description

Return type:

str

Example: >>> deployment.get_description()

get_model_id() str

Returns external model asset ID

Returns:

external model asset ID

Return type:

str

Example: >>> deployment.get_model_id()

get_model_name() str

Returns external model asset ID

Returns:

external model asset ID

Return type:

str

Example: >>> deployment.get_model_name()

get_model_container_type() str

Returns external model container type

Returns:

external model container type

Return type:

str

Example: >>> deployment.get_model_container_type()

get_model_container_id() str

Returns external model container type

Returns:

external model container type

Return type:

str

Example: >>> deployment.get_model_container_id()

set_environment_type(to_container: str) None

Set current container for deployment inside model asset. For available options check ModelEntryContainerType

Parameters:

to_container (str) – Container name to move to

A way you might use me is:

>>> deployment.set_environment_type(to_container="validate")
set_description(value: str) None

Set description for a particular deployment

Parameters:

value (str) – New description value for deployment

A way you might use me is:

>>> deployment.set_description(value="new description")
set_scoring_endpoint(value: str) None

Set scoring endpoint for a particular deployment

Parameters:

value (str) – New scoring endpoint value for deployment

A way you might use me is:

>>> deployment.set_scoring_endpoint(value="new scoring endpoint")
set_type(value: str) None

Set type for a particular deployment

Parameters:

value (str) – New type value for deployment

A way you might use me is:

>>> deployment.set_type(value="new type")