Helpers#

ibm_watson_machine_learning.foundation_models.get_model_specs(url, model_id=None)[source]#

Operations to query the details of the deployed foundation models.

Parameters:
  • url (str) – environment url

  • model_id (Optional[str, ModelTypes], optional) – Id of the model, defaults to None (all models specs are returned).

Returns:

list of deployed foundation model specs

Return type:

dict

Example

from ibm_watson_machine_learning.foundation_models import get_model_specs

# GET ALL MODEL SPECS
get_model_specs(
    url="https://us-south.ml.cloud.ibm.com"
    )

# GET MODEL SPECS BY MODEL_ID
get_model_specs(
    url="https://us-south.ml.cloud.ibm.com",
    model_id="google/flan-ul2"
    )
ibm_watson_machine_learning.foundation_models.get_model_lifecycle(url, model_id)[source]#

Operation to retrieve the list of model lifecycle data.

Parameters:
  • url (str) – environment url

  • model_id (str) – the type of model to use

Returns:

list of deployed foundation model lifecycle data

Return type:

list

Example

from ibm_watson_machine_learning.foundation_models import get_model_lifecycle

get_model_lifecycle(
    url="https://us-south.ml.cloud.ibm.com",
    model_id="ibm/granite-13b-instruct-v2"
    )
ibm_watson_machine_learning.foundation_models.get_model_specs_with_prompt_tuning_support(url)[source]#

Operations to query the details of the deployed foundation models with prompt tuning support.

Parameters:

url (str) – environment url

Returns:

list of deployed foundation model specs with prompt tuning support

Return type:

dict

Example

from ibm_watson_machine_learning.foundation_models import get_model_specs_with_prompt_tuning_support

get_model_specs_with_prompt_tuning_support(
    url="https://us-south.ml.cloud.ibm.com"
    )
ibm_watson_machine_learning.foundation_models.get_supported_tasks(url)[source]#

Operation to retrieve the list of tasks that are supported by the foundation models.

Parameters:

url (str) – environment url

Returns:

list of tasks that are supported by the foundation models

Return type:

dict

Example

from ibm_watson_machine_learning.foundation_models import get_supported_tasks

get_supported_tasks(
    url="https://us-south.ml.cloud.ibm.com"
    )