### Watsonx.governance Factsheet (On Prem) Setup Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This section details how to initialize the AIGovFactsClient for on-premises installations using various authentication methods. ```APIDOC ## Watsonx.governance Factsheet (On Prem) Setup ### Description Initializes the AIGovFactsClient for on-premises deployments. ### Method Instantiation of `AIGovFactsClient` ### Parameters #### Request Body - **experiment_name** (string) - Required - The name of the experiment. - **container_type** (string) - Required - Type of container ('space' or 'project'). - **container_id** (string) - Required - ID of the space or project. - **cloud_pak_for_data_configs** (object) - Required - Configuration for Cloud Pak for Data. - **service_url** (string) - Required - The service URL. - **username** (string) - Required - The username. - **password** (string) - Optional - The password. - **api_key** (string) - Optional - The API key. - **bedrock_url** (string) - Optional - The cluster bedrock URL (for IAM enabled). - **disable_tracing** (boolean) - Optional - If true, tracing is disabled. - **external_model** (boolean) - Optional - If true, indicates an external model. ### Request Example (Username/Password) ```python from ibm_aigov_facts_client import AIGovFactsClient, CloudPakforDataConfig cpd_creds = CloudPakforDataConfig(service_url="", username="", password="") client = AIGovFactsClient(experiment_name="", container_type="", container_id="", cloud_pak_for_data_configs=cpd_creds) ``` ### Request Example (API Key) ```python from ibm_aigov_facts_client import AIGovFactsClient, CloudPakforDataConfig cpd_creds = CloudPakforDataConfig(service_url="", username="", api_key="") client = AIGovFactsClient(experiment_name="", container_type="", container_id="", cloud_pak_for_data_configs=cpd_creds) ``` ### Request Example (IAM Enabled) ```python from ibm_aigov_facts_client import AIGovFactsClient, CloudPakforDataConfig cpd_creds = CloudPakforDataConfig(service_url="", username="", password="", bedrock_url="") client = AIGovFactsClient(experiment_name="", container_type="", container_id="", cloud_pak_for_data_configs=cpd_creds) ``` ### Request Example (Disable Tracing) ```python client = AIGovFactsClient(container_type="", container_id="", cloud_pak_for_data_configs=creds, disable_tracing=True) client = AIGovFactsClient(external_model=True, cloud_pak_for_data_configs=creds, disable_tracing=True) ``` ### Request Example (Standalone Localhost) ```python from ibm_aigov_facts_client import AIGovFactsClient client = AIGovFactsClient(experiment_name="test") ``` ``` -------------------------------- ### Retrieve Installed Version Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Retrieves the installed Cloud Pak for Data version. ```APIDOC ## Retrieve Installed Version ### Description Gets the Cloud Pak for Data version. Returns 'SaaS' if it's a cloud environment. ### Method GET ### Endpoint `/cpd_version` ### Parameters This method does not take any parameters. ### Response #### Success Response (200) - **cpd_version** (string) - The Cloud Pak for Data version or 'SaaS'. ### Usage ```python client.assets.get_cpd_version() ``` ``` -------------------------------- ### Initialize AI Factsheet Client (Push Framework) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client with the push framework enabled. Sets `enable_push_framework` to True. ```python client = AIGovFactsClient(api_key=, experiment_name="test",container_type="space or project",container_id=,enable_push_framework=True) ``` -------------------------------- ### Start tracing session with ManualLog Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Starts a tracing session for manual logging. Optionally accepts an experiment ID to log under a specific experiment. ```python client.manual_log.start_trace() client.manual_log.start_trace(experiment_id="1") ``` -------------------------------- ### Initialize watsonx.governance Factsheet Client with API Key Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This snippet demonstrates initializing the AIGovFactsClient using CloudPakforDataConfig with a service URL, username, and API key. This is an alternative authentication method for the client setup. ```python from ibm_aigov_facts_client import AIGovFactsClient,CloudPakforDataConfig cpd_creds=CloudPakforDataConfig(service_url="",username="",api_key="") client = AIGovFactsClient(experiment_name="",container_type="",container_id="",cloud_pak_for_data_configs=cpd_creds) ``` -------------------------------- ### Initialize AI Factsheet Client (Existing Experiment) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client to use an existing experiment. Sets `set_as_current_experiment` to True. ```python client = AIGovFactsClient(api_key=, experiment_name="test",container_type="space",container_id=,set_as_current_experiment=True) ``` -------------------------------- ### Get Access Token Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Retrieves the IAM access token. ```APIDOC ## Get Access Token ### Description Method to get IAM access token. ### Method GET ### Endpoint `/get_access_token` ### Usage ```python client.get_access_token() ``` ``` -------------------------------- ### Initialize AI Factsheet Client (Cloud) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client for use with IBM Cloud. Requires an API key, experiment name, container type, and container ID. ```python from ibm_aigov_facts_client import AIGovFactsClient client = AIGovFactsClient(api_key=, experiment_name="test",container_type="space or project",container_id=) ``` -------------------------------- ### Get model description with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Returns the descriptive information about the model. This description provides context about the model's purpose and functionality for documentation and user understanding. ```python model.get_description() ``` -------------------------------- ### Initialize AI Factsheet Client (External Model - Autolog) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client for external models with autologging enabled. Sets `external_model` to True. ```python client= AIGovFactsClient(api_key=API_KEY,experiment_name="external",external_model=True) ``` -------------------------------- ### Create Detailed Detached Prompt in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/detached_prompt Creates a detached prompt with full configuration including prompt details. Depends on facts.client.assets.create_detached_prompt, DetachedPromptTemplate, and PromptTemplate. Inputs include all parameters from the minimal example plus prompt_details with variables and model parameters. Outputs an AIGovAssetUtilities object with enhanced prompt setup. ```python detached_info = DetachedPromptTemplate(prompt_id="n/a", model_id="arn:aws:bedrock:us-east1:123456789012:provisioned-model/anthropic.claude-v2", model_provider="AWS Bedrock", model_name="Anthropic Claude 2.0", model_url="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-claude.html", prompt_url="n/a", prompt_additional_info={"AWS Region": "us-east1"} ) prompt_template = PromptTemplate( prompt_variables= {"text": "value" }, input="Input text to be given", model_parameters={"decoding_method":"greedy", "max_new_tokens":2034, "min_new_tokens":0, "random_seed":0, "top_k":0, "top_p":0 } ) external_prompt = facts.client.assets.create_detached_prompt(name="External prompt sample (model AWS Bedrock Anthropic)", model_id="anthropic.claude-v2", task_id="summarization", detached_information=detached_info, description="My First External Prompt", prompt_details=prompt_template ) ``` -------------------------------- ### Initialize watsonx.governance Factsheet Client for Standalone Use Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This snippet shows how to initialize the AIGovFactsClient for standalone use in a localhost environment without factsheet functionality, only requiring an experiment name. ```python from ibm_aigov_facts_client import AIGovFactsClient client = AIGovFactsClient(experiment_name="test") ``` -------------------------------- ### Get Cloud Pak for Data Version Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This method retrieves the Cloud Pak for Data version. If the environment is cloud-based, it will return 'SaaS'. This is useful for version checking and compatibility. ```python client.assets.get_cpd_version() ``` -------------------------------- ### Initialize AI Factsheet Client (External Model - Manual Log) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client for external models with manual logging enabled. Sets `enable_autolog` to False and `external_model` to True. ```python client= AIGovFactsClient(api_key=API_KEY,experiment_name="external",enable_autolog=False,external_model=True) ``` -------------------------------- ### Create Prompt Template with Multiple Modes - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/regular_prompt Demonstrates creating both structured and freeflow prompt templates using the create_prompt function. The structured mode includes additional configuration like input/output prefixes and examples, while freeflow mode provides a simpler approach. Both examples use the same API but with different input_mode parameters. ```python # Example-1: Creating a Structured prompt template prompt_template = PromptTemplate(model_version={"number": "2.0.0-rc.7", "tag": "tag", "description": "Description of the model version"}, input="Input text to be given", prompt_variables= {"text": "value"}, prompt_instruction="Your prompt instruction", input_prefix="Your input prefix, output_prefix="Your output prefix", examples={"What is the capidddtal of France{text}?": "The capital of France is Paris{text}.", "Who wrote '1984{text}'?": "George Orwell wrote '1984'{text}."}, model_parameters={"decoding_method":"greedy" "max_new_tokens":2034, "min_new_tokens":0, "random_seed":0, "top_k":0, "top_p":0 } ) structured_prompt = facts.client.asests.create_prompt(input_mode="structured", name=" structured prompt sample", task_id="summarization", model_id="ibm/granite-13b-chat-v2", description="My First structured prompt", prompt_details=prompt_template, ) # Example-2: Creating a Freeflow prompt template prompt_template = PromptTemplate( input="Input text to be given", prompt_variables= {"text": "value"}, model_parameters={"decoding_method":"greedy" "max_new_tokens":2034, "min_new_tokens":0, "random_seed":0, "top_k":0, "top_p":0 } ) freeflow_prompt = facts.client.asests.create_prompt(input_mode="freeflow", name="Freeflow prompt sample", task_id="summarization", model_id="ibm/granite-13b-chat-v2", description="My First Freeflow prompt", prompt_details=prompt_template, ) ``` -------------------------------- ### AIGovFactsClient Initialization Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initialize the AI Governance Facts Client with various configuration options for different deployment scenarios including IBM Cloud, Cloud Pak for Data, regional deployments, external models, and push framework support. ```APIDOC ## INITIALIZE AIGovFactsClient ### Description Initializes the AI Governance Facts Client for tracking and governing AI models. Supports IBM Cloud, Cloud Pak for Data deployments, with options for external models, regional endpoints, and various logging configurations. ### Method CONSTRUCTOR ### Endpoint Python Class: `ibm_aigov_facts_client.AIGovFactsClient` ### Parameters #### Request Body - **experiment_name** (string) - Required - Name of the Experiment. - **container_type** (string) - Optional/Required - Name of the container where model would be saved. Supported: "SPACE" or "PROJECT". Required when using Watson Machine Learning. - **container_id** (string) - Optional/Required - Container ID specific to container type. Required when using Watson Machine Learning. - **api_key** (string) - Optional - IBM Cloud API Key. Either this or cloud_pak_for_data_configs should be provided. - **bearer_token** (string) - Optional - Bearer token for authentication. - **set_as_current_experiment** (boolean) - Optional - If True, existing experiment will be used instead of creating new. Default: False. - **enable_autolog** (boolean) - Optional - If False, manual log option will be available. Default: True. - **external_model** (boolean) - Optional - If True, external models tracing would be enabled. Default: False. - **cloud_pak_for_data_configs** (CloudPakforDataConfig) - Optional - Cloud Pak for Data cluster details. - **disable_tracing** (boolean) - Optional - If True, tracing and logging utilities will be disabled. Default: False. - **enable_push_framework** (boolean) - Optional - If True, push framework support will be enabled. Default: False. - **region** (string) - Optional - Region where watsonx.governance is hosted. Default: "us-south". Options: "frankfurt", "sydney", etc. ### Request Example #### Basic Cloud Setup ```python from ibm_aigov_facts_client import AIGovFactsClient client = AIGovFactsClient( api_key="your_api_key", experiment_name="test", container_type="space", container_id="your_space_id" ) ``` #### Regional Setup (Sydney/Frankfurt) ```python client = AIGovFactsClient( api_key="your_api_key", experiment_name="test", container_type="space", container_id="your_space_id", region="sydney" # or "frankfurt" ) ``` ``` -------------------------------- ### Initialize AI Factsheet Client (Specific Regions) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter Initializes the AI Factsheet client for specific cloud regions like Sydney or Frankfurt. Includes the standard parameters plus a region specification. ```python client = AIGovFactsClient(api_key=, experiment_name="test",container_type="space or project",container_id=,region="sydney" or "frankfurt") ``` -------------------------------- ### Get All Runs and Experiment Management Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Experiment Demonstrates getting all runs available in notebook experiment and how to get notebook experiment by name. Useful for experiment management and listing all experiment runs. Requires a saved model and CPD version >=4.6.4. ```python >>> exp.get_all_runs() >>> exp=model.get_experiment() # returns experiment >>> exp=model.get_experiment(experiment_name="test") # In case notebook experiment not available, you can initiate a new one and run to add details. ``` -------------------------------- ### PromptTemplate Class Definition Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/Main/helper Defines the structure for a PromptTemplate, used for managing prompts with various configurations like model versions, variables, instructions, prefixes, examples, and model parameters. It allows for detailed customization of prompt elements. ```python class _PromptTemplate(_model_version : dict = None_, _prompt_variables : dict = None_, _prompt_instruction : str = None_, _input_prefix : str = None_, _output_prefix : str = None_, _structured_examples : dict = None_, _input : str = None_, _model_parameters : dict = None_) : """Details of a PromptTemplate""" pass ``` -------------------------------- ### Get Experiment Information and Details Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Experiment Demonstrates how to retrieve experiment information and get experiment details in IBM AI Factsheet notebook experiments. Requires a saved model and CPD version >=4.6.4. ```python >>> exp=model.get_experiment() >>> exp.get_info() ``` -------------------------------- ### Initialize watsonx.governance Factsheet Client with IAM Enabled Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This snippet shows how to initialize the AIGovFactsClient when the Watsonx Governance platform has IAM enabled, using username, password, and the cluster bedrock URL. ```python from ibm_aigov_facts_client import AIGovFactsClient,CloudPakforDataConfig cpd_creds=CloudPakforDataConfig(service_url="",username="",password="",bedrock_url="") client = AIGovFactsClient(experiment_name="",container_type="",container_id="",cloud_pak_for_data_configs=cpd_creds ) ``` -------------------------------- ### Get default inventory details with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Retrieves details for the default inventory along with the associated username. This method helps in understanding the default configuration and user context. ```python client.assets.get_default_inventory_details() ``` -------------------------------- ### Initialize watsonx.governance Factsheet Client with Username/Password Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This snippet shows how to initialize the AIGovFactsClient using CloudPakforDataConfig with service URL, username, and password. It's used for setting up the client for on-premises watsonx.governance. ```python from ibm_aigov_facts_client import AIGovFactsClient,CloudPakforDataConfig cpd_creds=CloudPakforDataConfig(service_url="",username="",password="") client = AIGovFactsClient(experiment_name="",container_type="",container_id="",cloud_pak_for_data_configs=cpd_creds) ``` -------------------------------- ### Create Structured Prompt with BYOM (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/tuned_model Shows how to create a structured prompt template using a 'BYOM' (Bring Your Own Model). This involves similar parameters to the 'tuned_model' example, but specifies `model_type` as 'byom'. ```python prompt_template = PromptTemplate( model_version={"number": "2.0.0-rc.7", "tag": "tag", "description": "Description of the model version"}, input="Input text to be given", prompt_variables={"text": "value"}, prompt_instruction="Your prompt instruction", input_prefix="Your input prefix", output_prefix="Your output prefix", examples={ "What is the capital of France{text}?": "The capital of France is Paris{text}.", "Who wrote '1984{text}'?": "George Orwell wrote '1984'{text}." }, model_parameters={ "decoding_method": "greedy", "max_new_tokens": 2034, "min_new_tokens": 0, "random_seed": 0, "top_k": 0, "top_p": 0 } ) structured_prompt = facts.client.assets.create_prompt( input_mode="structured", name="Structured prompt sample", task_id="summarization", model_type="byom", deployment_id="**********", description="My first structured prompt", prompt_details=prompt_template ) ``` -------------------------------- ### Get All Facts - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Custom%20Facts Retrieves all facts associated with a specific asset. ```python model.get_all_facts() ``` -------------------------------- ### Initialize watsonx.governance Factsheet Client with Tracing Disabled Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This snippet illustrates how to initialize the AIGovFactsClient with tracing disabled, allowing the use of other features like custom facts and facts definitions. It also shows initialization for external models. ```python client = AIGovFactsClient(container_type=,container_id=,cloud_pak_for_data_configs=creds,disable_tracing=True) client = AIGovFactsClient(external_model=True,cloud_pak_for_data_configs=creds,disable_tracing=True) ``` -------------------------------- ### Get model version details with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Retrieves version details of a model. This method is supported for CPD version >=4.7.0 and is useful for version control and compatibility checks. ```python model.get_version() ``` -------------------------------- ### Get model object details with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Retrieves detailed information about a model object. When verbose is set to True, additional model details are returned. This method is useful for debugging and monitoring model metadata. ```python model.get_info() model.get_info(verbose=True) ``` -------------------------------- ### Save Azure ML Service External Model Asset Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/External Provides an example of how to use the `save_external_model_asset` method to log an Azure ML Service model. It includes setting up schemas, training data references, and deployment details. ```python from ibm_aigov_facts_client.supporting_classes.factsheet_utils import DeploymentDetails,TrainingDataReference,ExternalModelSchemas external_schemas=ExternalModelSchemas(input=input_schema,output=output_schema) trainingdataref=TrainingDataReference(schema=training_ref) deployment=DeploymentDetails(identifier=,name="deploymentname",deployment_type="online",scoring_endpoint="test/score") client.external_model_facts.save_external_model_asset(model_identifier= ,name= ,model_details= ,deployment_details=deployment ,schemas=external_schemas ,training_data_reference=tdataref) ``` ```python from ibm_aigov_facts_client.supporting_classes.factsheet_utils import DeploymentDetails,TrainingDataReference,ExternalModelSchemas external_schemas=ExternalModelSchemas(input=input_schema,output=output_schema) trainingdataref=TrainingDataReference(schema=training_ref) deployment=DeploymentDetails(identifier=,name="deploymentname",deployment_type="online",scoring_endpoint="test/score") client.external_model_facts.save_external_model_asset(model_identifier= ,name= ,model_details= ,deployment_details=deployment ,schemas=external_schemas ,training_data_reference=tdataref, ,catalog_id=) # Different catalog_id other than Platform Asset Catalog (PAC) ``` -------------------------------- ### Get All Model Usecases in Catalog (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Retrieves all model use case assets within a specified catalog. If no catalog ID is provided, it returns all model use cases accessible to the user. This method is deprecated and `client.assets.get_ai_usecases()` should be used instead. ```python client.assets.get_model_usecases(catalog_id=) client.assets.get_model_usecases() ``` -------------------------------- ### Create Minimal Detached Prompt in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/detached_prompt Creates a detached prompt with essential parameters. Requires facts.client.assets.create_detached_prompt and DetachedPromptTemplate. Takes name, model_id, task_id, and detached_information as inputs, returning an AIGovAssetUtilities object. Limited to basic setup without optional prompt details. ```python detached_info = DetachedPromptTemplate(prompt_id="n/a", model_id="arn:aws:bedrock:us-east1:123456789012:provisioned-model/anthropic.claude-v2", model_provider="AWS Bedrock", model_name="Anthropic Claude 2.0", model_url="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-claude.html", prompt_url="n/a", prompt_additional_info={"AWS Region": "us-east1"} ) external_prompt = facts.client.assets.create_detached_prompt(name="External prompt sample (model AWS Bedrock Anthropic)", task_id="summarization", model_id="anthropic.claude-v2", description="My First External Prompt", detached_information=detached_info) ``` -------------------------------- ### Get Model Usecases Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Retrieves all model use case assets for a specified catalog, or all model use cases across all accessible catalogs if no catalog ID is provided. This method is deprecated and `client.assets.get_ai_usecases()` should be used instead. ```APIDOC ## GET /api/assets/get_model_usecases ### Description Retrieves all model use case assets for a specified catalog, or all model use cases across all accessible catalogs if no catalog ID is provided. Deprecated. ### Method GET ### Endpoint /api/assets/get_model_usecases ### Parameters #### Query Parameters - **catalog_id** (string) - Optional - Catalog ID where model use cases are registered. If not provided, defaults to showing all model use cases in all catalogs to which the user has access. ### Request Example ```json { "catalog_id": "" } ``` ### Response #### Success Response (200) - **list** (array) - A list of ModelUsecaseUtilities objects, each representing a model use case asset. #### Response Example ```json [ { "id": "usecase1", "name": "Usecase One", "description": "Description for usecase one" }, { "id": "usecase2", "name": "Usecase Two", "description": "Description for usecase two" } ] ``` ``` -------------------------------- ### Get watsonx.governance Access Token Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/FactsClientAdapter This method retrieves the IAM access token. It is a core function for authenticating with the watsonx.governance service. ```python client.get_access_token() ``` -------------------------------- ### Get Run Objects in Notebook Experiment Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Experiment Shows how to get run objects available in notebook experiment, including getting the latest run or a specific run by ID. Requires a saved model and CPD version >=4.6.4. ```python >>> run=exp.get_run() # returns latest run object available >>> run=exp.get_run(run_id=run_id) # you can get specific run object ``` -------------------------------- ### Create WKC Model Usecase Approach Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Approach Creates a WKC Model usecase approach with optional name, description, icon, and color. Supported for CPD version 4.7.0 and above. Returns an ApproachUtilities object. ```python ai_usecase.create_approach(name=,description=,icon=,color=) ai_usecase.create_approach(name=) ``` -------------------------------- ### Get model name with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Returns the name of the model. This is useful for identification and logging purposes in applications that manage multiple models. ```python model.get_name() ``` -------------------------------- ### Get model ID with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Returns the unique identifier of the model. This ID is crucial for model tracking, referencing, and management in automated systems. ```python model.get_id() ``` -------------------------------- ### Retrieve Approach Description Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Approach Retrieves the description of an approach. Returns the approach description as a string. ```python ai_usecase.get_approach.get_description() ``` -------------------------------- ### Get model container type with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Returns the type of container used for the model deployment. This information is valuable for understanding deployment architecture and compatibility. ```python model.get_container_type() ``` -------------------------------- ### Create Structured Prompt with Tuned Model (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/tuned_model Demonstrates creating a structured prompt template using a 'tuned_model'. It requires specifying `input_mode`, `name`, `task_id`, `model_type`, `deployment_id`, `description`, and `prompt_details`. ```python prompt_template = PromptTemplate( model_version={"number": "2.0.0-rc.7", "tag": "tag", "description": "Description of the model version"}, input="Input text to be given", prompt_variables={"text": "value"}, prompt_instruction="Your prompt instruction", input_prefix="Your input prefix", output_prefix="Your output prefix", examples={ "What is the capital of France{text}?": "The capital of France is Paris{text}.", "Who wrote '1984{text}'?": "George Orwell wrote '1984'{text}." }, model_parameters={ "decoding_method": "greedy", "max_new_tokens": 2034, "min_new_tokens": 0, "random_seed": 0, "top_k": 0, "top_p": 0 } ) structured_prompt = facts.client.assets.create_prompt( input_mode="structured", name="Structured prompt sample", task_id="summarization", model_type="tuned_model", deployment_id="**********", description="My first structured prompt", prompt_details=prompt_template ) ``` -------------------------------- ### Retrieve Approach Versions Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Approach Retrieves a list of versions for a WKC Model usecase approach. Supported for CPD version 4.7.0 and above. Returns a list. ```python ai_usecase.get_approach.get_versions() ``` -------------------------------- ### Get model container ID with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Returns the container ID associated with the model. This helps in identifying the deployment context and resource allocation for the model. ```python model.get_container_id() ``` -------------------------------- ### Get Custom Fact by ID - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Custom%20Facts Retrieves the value(s) of a specific custom fact identified by its unique ID. ```python model.get_custom_fact_by_id(fact_id="fact_id") ``` -------------------------------- ### Get Custom Facts - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Custom%20Facts Retrieves all custom facts defined for the 'modelfacts_user' fact type for a given asset. ```python model.get_custom_facts() ``` -------------------------------- ### Create AI Usecase Asset Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Creates a new AI usecase asset in the specified catalog. Requires catalog_id and name parameters. Optional parameters include description, status, risk, and tags. Returns an AIUsecaseUtilities object representing the created asset. ```python client.assets.create_ai_usecase(catalog_id=,name=,description=) ``` -------------------------------- ### Get Supported Framework Names Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/Main/supportedframework Retrieves only the names of the supported frameworks from the AI Factsheet client. This method returns a list or set of framework names. ```python >>> client.FrameworkSupportNames.get() ``` -------------------------------- ### get_info(_self_ , _verbose =False_) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/prompt_methods Retrieves all available details of the fetched prompt as a dictionary. Optionally includes all details if verbose is True. ```APIDOC ## get_info ### Description Retrieves all available details of the fetched prompt as a dictionary. ### Method GET ### Endpoint /prompts/get_info ### Parameters #### Path Parameters - **_self_** (object) - Required - The prompt object. #### Query Parameters - **_verbose** (boolean) - Optional - If True, include all details. Default is False. #### Request Body None ### Request Example { "_self_": "prompt_object", "_verbose": false } ### Response #### Success Response (200) - **dict** (dictionary) - A dictionary containing the prompt details. #### Response Example { "prompt_details": { "field1": "value1" } } ``` -------------------------------- ### Retrieve All WKC Model Usecase Approaches Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Approach Retrieves a list of all WKC Model usecase approaches. Supported for CPD version 4.7.0 and above. Returns a list of ApproachUtilities objects. ```python ai_useusecase.get_approaches() ``` -------------------------------- ### Initialize ManualLog class Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Initializes the ManualLog class with optional experiment name, setting as current experiment, and root directory. ```python class ManualLog(experiment_name=None, set_as_current_exp=None, root_dir=None) ``` -------------------------------- ### Update Approach Description Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Approach Updates the description of a WKC Model usecase approach. Supported for CPD version 4.7.0 and above. Requires the new description as a string. Returns an updated ApproachUtilities object. ```python ai_usecase.get_approach.set_description(description=) ``` -------------------------------- ### Get Platform Asset Catalog ID with Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Miscellaneous%20Methods Retrieves the Platform Asset Catalog (PAC) ID from the client assets. This ID is essential for asset tracking and management within the platform. ```python client.assets.get_PAC_id() ``` -------------------------------- ### Create Freeflow Prompt with Tuned Model (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/tuned_model Illustrates the creation of a freeflow prompt template using a 'tuned_model'. Key parameters include `input_mode`, `name`, `task_id`, and `prompt_details` containing essential prompt information. ```python prompt_template = PromptTemplate( input="Input text to be given", prompt_variables={"text": "value"}, model_parameters={ "decoding_method": "greedy", "max_new_tokens": 2034, "min_new_tokens": 0, "random_seed": 0, "top_k": 0, "top_p": 0 } ) freeflow_prompt = facts.client.assets.create_prompt( input_mode="freeflow", name="Freeflow prompt sample", task_id="summarization", ``` -------------------------------- ### Get External Model Deployments - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Deployments Retrieves all deployment details for an external model. This function is supported for CPD version 4.7.0 and above. It returns a list of Deployment objects. ```python model.get_deployments() ``` -------------------------------- ### Get Environment Type Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/Model%20Env Retrieves the current environment details for a related model asset. This is useful for understanding the current state and configuration of your model. ```APIDOC ## GET /models/{model_id}/environment ### Description Retrieves the current environment details for a related model asset. ### Method GET ### Endpoint `/models/{model_id}/environment` ### Parameters #### Path Parameters - **model_id** (string) - Required - The unique identifier of the model. ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **environment_type** (string) - The type of the current environment (e.g., "TEST", "DEVELOP", "DEPLOY"). - **container** (string) - The current container the model is in. #### Response Example ```json { "environment_type": "TEST", "container": "development" } ``` ``` -------------------------------- ### Create a freeflow prompt template with BYOM in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/tuned_model This snippet shows how to define a PromptTemplate with input text, variables, and model parameters, then create a freeflow prompt using the facts client. It requires the PromptTemplate class and a configured facts client. The deployment ID should be replaced with a valid identifier. ```python prompt_template = PromptTemplate( input=\"Input text to be given\", prompt_variables={\"text\": \"value\"}, model_parameters={ \"decoding_method\": \"greedy\", \"max_new_tokens\": 2034, \"min_new_tokens\": 0, \"random_seed\": 0, \"top_k\": 0, \"top_p\": 0 } ) freeflow_prompt = facts.client.assets.create_prompt( input_mode=\"freeflow\", name=\"Freeflow prompt sample\", task_id=\"summarization\", model_type=\"byom\", deployment_id=\"**********\", description=\"My first freeflow prompt\", prompt_details=prompt_template ) ``` -------------------------------- ### Get Model Usecase Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Retrieves a specific model use case asset by its ID and catalog ID. This method is deprecated and `client.assets.get_ai_usecase()` should be used instead. ```APIDOC ## GET /api/assets/get_model_usecase ### Description Retrieves a specific model use case asset by its ID and catalog ID. Deprecated. ### Method GET ### Endpoint /api/assets/get_model_usecase ### Parameters #### Query Parameters - **model_usecase_id** (string) - Required - Id of the model usecase. - **catalog_id** (string) - Optional - Id of the catalog where model usecase is saved. ### Request Example ```json { "model_usecase_id": "", "catalog_id": "" } ``` ### Response #### Success Response (200) - **ModelUsecaseUtilities** (object) - Model usecase asset details #### Response Example ```json { "id": "", "name": "Sample Usecase", "description": "A sample use case for testing." } ``` ``` -------------------------------- ### Get Custom Facts by Type - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Custom%20Facts Retrieves custom facts based on the asset type. Defaults to 'modelfacts_user' but can be set to 'modelfacts_user_op' for Openpages facts. ```python model.get_facts_by_type(facts_type=) ``` -------------------------------- ### Initialize AIGovFactsClient with Cloud Pak for Data Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/External Shows how to initialize the AIGovFactsClient when integrating with Cloud Pak for Data. This requires providing configuration details like service URL, username, and password. ```python from ibm_aigov_facts_client import AIGovFactsClient from ibm_aigov_facts_client.config import CloudPakforDataConfig creds=CloudPakforDataConfig(service_url="", username="", password="") client = AIGovFactsClient(experiment_name=,external_model=True,cloud_pak_for_data_configs=creds) ``` -------------------------------- ### Initialize AIGovFactsClient for External Models Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/External Demonstrates how to initialize the AIGovFactsClient for external models with different tracing and autologging configurations. This is crucial for setting up the client to interact with external model services. ```python from ibm_aigov_facts_client import AIGovFactsClient client= AIGovFactsClient(api_key=API_KEY,experiment_name="external",enable_autolog=False,external_model=True) ``` ```python from ibm_aigov_facts_client import AIGovFactsClient client= AIGovFactsClient(api_key=API_KEY,experiment_name="external",external_model=True) ``` ```python from ibm_aigov_facts_client import AIGovFactsClient client= AIGovFactsClient(api_key=API_KEY,external_model=True,disable_tracing=True) ``` -------------------------------- ### Show Supported Framework Names Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/Main/supportedframework Displays all framework names supported by the AI Factsheet client. This is a simple call to the client's FrameworkSupportNames object. ```python >>> client.FrameworkSupportNames.show() ``` -------------------------------- ### List all associated workspaces for AI use case Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Associate%20Workspaces Displays all associated workspaces for a given AI use case in tabular format. Shows associated workspaces for all phases. No parameters required. Requires client with proper authentication and access to the AI use case. ```python client.assets.ai_usecase.list_all_associated_workspaces() ``` -------------------------------- ### Search AI Usecase Assets by Name Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Searches for AI usecase assets by name with optional exact matching and inventory filtering. Returns a list of AIUsecaseUtilities objects that match the search criteria. Supports both exact and partial name matching. ```python # Search for AI use cases with names that contain 'sample' usecases = client.assets.get_ai_usecases_by_name(name='sample') ``` -------------------------------- ### Save AWS Sagemaker External Model Asset Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/External Illustrates how to log an AWS Sagemaker model using the `save_external_model_asset` method. This example focuses on specifying the necessary deployment details for Sagemaker. ```python from ibm_aigov_facts_client.supporting_classes.factsheet_utils import DeploymentDetails,TrainingDataReference,ExternalModelSchemas external_schemas=ExternalModelSchemas(input=input_schema,output=output_schema) trainingdataref=TrainingDataReference(schema=training_ref) deployment=DeploymentDetails(identifier=,name="deploymentname",deployment_type="online",scoring_endpoint="test/score") client.external_model_facts.save_external_model_asset(model_identifier= ``` -------------------------------- ### Get All Facts in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Custom%20Facts Retrieves all facts related to the asset. Returns a dictionary of all facts. Requires model_usecase object, provides comprehensive fact data output. ```python >>> model_usecase.get_all_facts() ``` -------------------------------- ### Search AI Use Cases by Name (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Searches for AI use cases by their name with an exact match. This function is part of the assets client and requires the client object to be initialized. ```python usecases = client.assets.get_ai_usecases_by_name(name='sample', exact_match=True) ``` -------------------------------- ### Set Tags for a Run with AI Factsheet Client Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Basic%20Utilities Logs multiple tags for a given run ID using the AI Factsheet client. Accepts a dictionary of tag names to values. Returns None. ```python >>> client.runs.set_tags(run_id, {"engineering": "ML Platform", "release.candidate": "RC1"}) ``` -------------------------------- ### Set multiple tags with ManualLog Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Sets multiple tags for the active run. Accepts a dictionary of tag names and values. ```python client.manual_log.set_tags({"engineering": "ML Platform", "release.candidate": "RC1"}) ``` -------------------------------- ### Log multiple parameters with ManualLog Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Logs multiple parameters against the active run. Accepts a dictionary of parameter names and values. ```python client.manual_log.log_params({"n_estimators": 3, "random_state": 42}) ``` -------------------------------- ### Get Model Usecase by ID (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Retrieves a specific model use case asset by its ID and optionally by catalog ID. This method is deprecated and `client.assets.get_ai_usecase()` should be used instead. ```python client.assets.get_model_usecase(model_usecase_id=, catalog_id=) ``` -------------------------------- ### Get Facts Definitions - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Model%20Custom%20Facts Retrieves all fact definitions for a specified asset fact type within a given container. It allows for optional filtering by container type and ID. ```python client.assets.get_facts_definitions(type_name=) # uses container type and id used initializing facts client client.assets.get_facts_definitions(type_name=,container_type=,container_id=) ``` -------------------------------- ### List all inventories with optional filtering Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Inventory Retrieves a list of all inventories associated with the account. Optionally filters results by name with support for exact or partial matching. Returns a list of AIGovInventoryUtilities instances. ```python >>> inventories = client.assets.list_inventories() # Retrieve all inventories >>> inventories = client.assets.list_inventories(name="sample") # Retrieve inventories matching "sample" >>> inventories = client.assets.list_inventories(name="sample", exact_match=True) # Retrieve inventories with an exact match for "sample" ``` -------------------------------- ### Get Custom Fact by ID in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Custom%20Facts Retrieves custom fact value or values by ID. Returns the fact value. Requires model_usecase and fact_id string, outputs the corresponding value. ```python >>> model_usecase.get_custom_fact_by_id(fact_id="fact_id") ``` -------------------------------- ### Create Model Usecase (Python) Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Creates a new model use case within a specified catalog. This method is deprecated and `client.assets.create_ai_usecase()` should be used instead. It requires catalog_id and name, with an optional description. ```python client.assets.create_model_usecase(catalog_id=,name=,description=) ``` -------------------------------- ### Get Current Run ID with AI Factsheet Client Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Basic%20Utilities Retrieves the ID of the current active run using the AI Factsheet client. Returns a string representing the run ID. ```python >>> client.runs.get_current_run_id() ``` -------------------------------- ### Get Current Experiment ID with AI Factsheet Client Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Basic%20Utilities Retrieves the ID of the current active experiment using the AI Factsheet client. Returns a string representing the experiment ID. ```python >>> client.experiments.get_current_experiment_id() ``` -------------------------------- ### Log Multiple Parameters with AI Factsheet Client Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/Basic%20Utilities Logs multiple parameters for a given run ID using the AI Factsheet client. Accepts a dictionary of parameter names to values. Returns None. ```python >>> client.runs.log_params(run_id, {"n_estimators": 3, "random_state": 42}) ``` -------------------------------- ### Log multiple metrics with ManualLog Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Logs multiple metrics against the active run. Accepts a dictionary of metric names and values, and optional step. ```python client.manual_log.log_metrics({"mse": 2000.00, "rmse": 50.00}) ``` -------------------------------- ### Get All Custom Facts in Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Model%20Usecase%20Custom%20Facts Retrieves all defined custom facts for model_entry_user fact type. Returns a dictionary of facts. Requires model_usecase instance, outputs dict of fact IDs and values. ```python >>> model_usecase.get_custom_facts() ``` -------------------------------- ### Update Prompt Description - Python Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model/prompt_methods Updates the description metadata for a prompt instance. Accepts a string parameter containing the new descriptive text. Modifies the prompt's documentation attribute. ```python prompt.update_prompt_description(prompt_description="description") ``` -------------------------------- ### Log single parameter with ManualLog Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/AIGov/manual%20log Logs a single parameter against the active run. Accepts parameter name and value. ```python client.manual_log.log_param("c", 1) ``` -------------------------------- ### DetachedPromptTemplate Class Definition Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/Main/helper Defines the structure for a DetachedPromptTemplate, used for referencing external prompts and models. It requires essential IDs and provider information, with optional fields for model name/URL and prompt URL/additional info, enforcing specific rules for providing external references. ```python class _DetachedPromptTemplate(_prompt_id : str_, _model_id : str_, _model_provider : str_, _model_name : str = None_, _model_url : str = None_, _prompt_url : str = None_, _prompt_additional_info : list = None_) : """Details of a detached prompt template.""" pass ``` -------------------------------- ### Get AI Usecase Asset by ID Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Retrieves a specific AI usecase asset using its unique identifier. Requires ai_usecase_id and optionally accepts catalog_id. Returns an AIUsecaseUtilities object representing the requested asset. ```python client.assets.get_ai_usecase(ai_usecase_id=, catalog_id=) ``` -------------------------------- ### Create Model Usecase Source: https://s3.us.cloud-object-storage.appdomain.cloud/aifactsheets-client/doc_files/asset_model/Model%20Usecase/Creation%20of%20Model%20Uscase Creates a new model use case in a specified catalog. This method is deprecated and `client.assets.create_ai_usecase()` should be used instead. ```APIDOC ## POST /api/assets/create_model_usecase ### Description Creates a new model use case in a specified catalog. Deprecated. ### Method POST ### Endpoint /api/assets/create_model_usecase ### Parameters #### Query Parameters - **catalog_id** (string) - Required - Catalog ID where this model usecase needs to create. - **name** (string) - Required - Name of model usecase. - **description** (string) - Optional - Model usecase description. ### Request Example ```json { "catalog_id": "", "name": "", "description": "" } ``` ### Response #### Success Response (200) - **ModelUsecaseUtilities** (object) - WKC Model usecase asset #### Response Example ```json { "message": "Model usecase created successfully" } ``` ```