Managing the Lifecycle Phases of a Model
Note
When utilizing the get/set environment APIs, there are several important considerations:
Model Saving Restrictions: Changes are not allowed when the model is saved in a project. It is necessary to promote it to space first.
Watson OpenScale Monitoring: Changes are not allowed when the model is being monitored in Watson OpenScale.
Environment Switch Limitation: Switching from TEST to DEVELOP environment is not permitted.
Environment Naming Change: The TEST environment is functionally equivalent to DEPLOY in Cloud Pak for Data UI until version 4.6.3. Starting from version 4.6.3, the environment will be referred to as TEST in the Cloud Pak for Data platform.
Attention
Supported only for predictive models, not for prompt template asset
- get_environment_type(self) Dict
Get current environement details for related model asset. .
- Return type:
dict
A way you might use me is:
>>> model.get_environment_type()
- set_environment_type(self, from_container: str, to_container: str) None
Set current container for model asset. For available options check
ModelEntryContainerType
- Parameters:
from_container (str) – Container name to move from
to_container (str) – Container name to move to
A way you might use me is:
>>> model.set_environment_type(from_container="test",to_container="validate")