Helper Class

ExternalModelSchemas

class ExternalModelSchemas(input: List[Dict], output: List[Dict] = None)

External model schema

Variables:
  • input (List[Dict]) – Model input data schema

  • output (List[Dict]) – (optional) Model output data schema

ModelDetails

class ModelDetails(model_type: str = None, input_type: str = None, algorithm: str = None, label_type: str = None, label_column: str = None, prediction_type: str = None, software_spec: str = None, software_spec_id: str = None, provider: str = None)

External model model details

Variables:
  • model_type (str) – Value for model type

  • input_type (str) – Value for inout type

  • algorithm (str) – Value for algorithm

  • label_type (str) – Value for label type

  • label_column (str) – Value for label column

  • prediction_type (str) – Value for prediction type

  • software_spec (str) – Value for software_spec

  • software_spec_id (str) – Value for software_spec_id

  • provider (str) – Value for provider,Available options are in Provider

TrainingDataReference

class TrainingDataReference(type: str = None, id: str = None, connection: Dict = None, location: Dict = None, schema: Dict = None)

Training data schema definition

Variables:
  • type (str) – Type of training data reference. It has values as fs, url, data_asset or connection_asset.

  • id (str) – ID of training data reference.

  • connection (Dict) – (Optional) Connection details

  • location (Dict) – (Optional) Location details

  • schema (Dict) – Model training data schema

If type is fs, the parameters that user needs to input are - location.path If type is url, the parameters that user needs to provide are - training_data_references[].id and connection.url If type is data_asset, then - location.href If type is connection_asset, then location.file_name or location.table_name, connection.href

DeploymentDetails

class DeploymentDetails(identifier: str, name: str, deployment_type: str, scoring_endpoint: str = None, description: str = None)

External model deployment details

Variables:
  • identifier (str) – Deployment identifier specific to providers.

  • name (str) – Name of the deployment

  • deployment_type (str) – Deployment type (i.e., online)

  • scoring_endpoint (str) – Deployment scoring endpoint url.

  • description (str) – (Optional) Description of the deployment

CloudPakforDataConfig

class CloudPakforDataConfig(service_url: str, username: str, password: str = None, api_key: str = None, disable_ssl_verification: bool = True, bedrock_url: str = None)

Configurations for Cloud Pak for Data environment

Variables:
  • service_url (str) – Host URL of Cloud Pak for Data environment.

  • username (str) – Environment username

  • password (str) – Environment password

  • api_key (str) – Environment api_key if IAM enabled

  • disable_ssl_verification (bool) – Disable SSL verification. Default is True.

  • bedrock_url (str) – (Optional) Foundational services (common-services-route ) url. User needs to get this url from CP4D admin. This url is required only when iam-integration is enabled on CP4D 4.0.x cluster.

ModelEntryProps

class ModelEntryProps(model_entry_catalog_id: str, asset_id: str = None, model_catalog_id: str = None, model_entry_id: str = None, model_entry_name: str = None, model_entry_desc: str = None, project_id: str = None, space_id: str = None, grc_model_id: str = None)

Model usecase Properties

Variables:
  • model_entry_catalog_id (str) – Catalog ID where model usecase exist.

  • asset_id (str) – Published model/asset ID. It is optional for external models ONLY.

  • model_catalog_id (str) – (Optional) Catalog Id where model exist.

  • model_entry_id (str) – (Optional) Existing Model usecase to link with.

  • model_entry_name (str) – (Optional) New model usecase name. Used only when creating new model usecase.

  • model_entry_description (str) – (Optional) New model usecase description. Used only when creating new model usecase.

  • project_id (str) – (Optional) Project ID where the model exist.Not applicable for external models.

  • space_id (str) – (Optional) Space ID where model exist Not applicable for external models.

  • grc_model_id (str) – (Optional) Openpages model id. Only applicable for CPD environments.