Model

class oci.ai_document.models.Model(**kwargs)

Bases: object

Machine-learned Model.

Attributes:

LIFECYCLE_STATE_ACTIVE

A constant which can be used with the lifecycle_state property of a Model.

LIFECYCLE_STATE_CREATING

A constant which can be used with the lifecycle_state property of a Model.

LIFECYCLE_STATE_DELETED

A constant which can be used with the lifecycle_state property of a Model.

LIFECYCLE_STATE_DELETING

A constant which can be used with the lifecycle_state property of a Model.

LIFECYCLE_STATE_FAILED

A constant which can be used with the lifecycle_state property of a Model.

LIFECYCLE_STATE_UPDATING

A constant which can be used with the lifecycle_state property of a Model.

MODEL_TYPE_DOCUMENT_CLASSIFICATION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_KEY_VALUE_EXTRACTION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_PRE_TRAINED_DOCUMENT_CLASSIFICATION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_PRE_TRAINED_KEY_VALUE_EXTRACTION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_PRE_TRAINED_TABLE_EXTRACTION

A constant which can be used with the model_type property of a Model.

MODEL_TYPE_PRE_TRAINED_TEXT_EXTRACTION

A constant which can be used with the model_type property of a Model.

alias_name

Gets the alias_name of this Model.

compartment_id

[Required] Gets the compartment_id of this Model.

component_models

Gets the component_models of this Model.

defined_tags

Gets the defined_tags of this Model.

description

Gets the description of this Model.

display_name

Gets the display_name of this Model.

freeform_tags

Gets the freeform_tags of this Model.

id

[Required] Gets the id of this Model.

inference_units

Gets the inference_units of this Model.

is_composed_model

Gets the is_composed_model of this Model.

is_quick_mode

Gets the is_quick_mode of this Model.

labels

Gets the labels of this Model.

language

Gets the language of this Model.

lifecycle_details

Gets the lifecycle_details of this Model.

lifecycle_state

[Required] Gets the lifecycle_state of this Model.

locks

Gets the locks of this Model.

max_training_time_in_hours

Gets the max_training_time_in_hours of this Model.

metrics

Gets the metrics of this Model.

model_sub_type

Gets the model_sub_type of this Model.

model_type

[Required] Gets the model_type of this Model.

model_version

[Required] Gets the model_version of this Model.

project_id

[Required] Gets the project_id of this Model.

system_tags

Gets the system_tags of this Model.

tenancy_id

Gets the tenancy_id of this Model.

testing_dataset

Gets the testing_dataset of this Model.

time_created

[Required] Gets the time_created of this Model.

time_updated

Gets the time_updated of this Model.

trained_time_in_hours

Gets the trained_time_in_hours of this Model.

training_dataset

Gets the training_dataset of this Model.

validation_dataset

Gets the validation_dataset of this Model.

Methods:

__init__(**kwargs)

Initializes a new Model object with values from keyword arguments.

LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_CREATING = 'CREATING'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “CREATING”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “DELETED”

LIFECYCLE_STATE_DELETING = 'DELETING'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “DELETING”

LIFECYCLE_STATE_FAILED = 'FAILED'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “FAILED”

LIFECYCLE_STATE_UPDATING = 'UPDATING'

A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “UPDATING”

MODEL_TYPE_DOCUMENT_CLASSIFICATION = 'DOCUMENT_CLASSIFICATION'

A constant which can be used with the model_type property of a Model. This constant has a value of “DOCUMENT_CLASSIFICATION”

MODEL_TYPE_KEY_VALUE_EXTRACTION = 'KEY_VALUE_EXTRACTION'

A constant which can be used with the model_type property of a Model. This constant has a value of “KEY_VALUE_EXTRACTION”

MODEL_TYPE_PRE_TRAINED_DOCUMENT_CLASSIFICATION = 'PRE_TRAINED_DOCUMENT_CLASSIFICATION'

A constant which can be used with the model_type property of a Model. This constant has a value of “PRE_TRAINED_DOCUMENT_CLASSIFICATION”

MODEL_TYPE_PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION = 'PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION'

A constant which can be used with the model_type property of a Model. This constant has a value of “PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION”

MODEL_TYPE_PRE_TRAINED_KEY_VALUE_EXTRACTION = 'PRE_TRAINED_KEY_VALUE_EXTRACTION'

A constant which can be used with the model_type property of a Model. This constant has a value of “PRE_TRAINED_KEY_VALUE_EXTRACTION”

MODEL_TYPE_PRE_TRAINED_TABLE_EXTRACTION = 'PRE_TRAINED_TABLE_EXTRACTION'

A constant which can be used with the model_type property of a Model. This constant has a value of “PRE_TRAINED_TABLE_EXTRACTION”

MODEL_TYPE_PRE_TRAINED_TEXT_EXTRACTION = 'PRE_TRAINED_TEXT_EXTRACTION'

A constant which can be used with the model_type property of a Model. This constant has a value of “PRE_TRAINED_TEXT_EXTRACTION”

__init__(**kwargs)

Initializes a new Model object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • id (str) – The value to assign to the id property of this Model.

  • display_name (str) – The value to assign to the display_name property of this Model.

  • description (str) – The value to assign to the description property of this Model.

  • compartment_id (str) – The value to assign to the compartment_id property of this Model.

  • model_type (str) – The value to assign to the model_type property of this Model. Allowed values for this property are: “KEY_VALUE_EXTRACTION”, “DOCUMENT_CLASSIFICATION”, “PRE_TRAINED_TEXT_EXTRACTION”, “PRE_TRAINED_TABLE_EXTRACTION”, “PRE_TRAINED_KEY_VALUE_EXTRACTION”, “PRE_TRAINED_DOCUMENT_CLASSIFICATION”, “PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • model_sub_type (oci.ai_document.models.ModelSubType) – The value to assign to the model_sub_type property of this Model.

  • inference_units (int) – The value to assign to the inference_units property of this Model.

  • tenancy_id (str) – The value to assign to the tenancy_id property of this Model.

  • alias_name (str) – The value to assign to the alias_name property of this Model.

  • labels (list[str]) – The value to assign to the labels property of this Model.

  • is_quick_mode (bool) – The value to assign to the is_quick_mode property of this Model.

  • max_training_time_in_hours (float) – The value to assign to the max_training_time_in_hours property of this Model.

  • language (str) – The value to assign to the language property of this Model.

  • trained_time_in_hours (float) – The value to assign to the trained_time_in_hours property of this Model.

  • training_dataset (oci.ai_document.models.Dataset) – The value to assign to the training_dataset property of this Model.

  • testing_dataset (oci.ai_document.models.Dataset) – The value to assign to the testing_dataset property of this Model.

  • validation_dataset (oci.ai_document.models.Dataset) – The value to assign to the validation_dataset property of this Model.

  • component_models (list[oci.ai_document.models.ComponentModel]) – The value to assign to the component_models property of this Model.

  • is_composed_model (bool) – The value to assign to the is_composed_model property of this Model.

  • model_version (str) – The value to assign to the model_version property of this Model.

  • project_id (str) – The value to assign to the project_id property of this Model.

  • time_created (datetime) – The value to assign to the time_created property of this Model.

  • time_updated (datetime) – The value to assign to the time_updated property of this Model.

  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this Model. Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • lifecycle_details (str) – The value to assign to the lifecycle_details property of this Model.

  • metrics (oci.ai_document.models.ModelMetrics) – The value to assign to the metrics property of this Model.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Model.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Model.

  • system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this Model.

  • locks (list[oci.ai_document.models.ResourceLock]) – The value to assign to the locks property of this Model.

property alias_name

Gets the alias_name of this Model. the alias name of the model.

Returns

The alias_name of this Model.

Return type

str

property compartment_id

[Required] Gets the compartment_id of this Model. The compartment identifier.

Returns

The compartment_id of this Model.

Return type

str

property component_models

Gets the component_models of this Model. The OCID collection of active custom Key Value models that need to be composed.

Returns

The component_models of this Model.

Return type

list[oci.ai_document.models.ComponentModel]

property defined_tags

Gets the defined_tags of this Model. Defined tags for this resource. Each key is predefined and scoped to a namespace. For example: {“foo-namespace”: {“bar-key”: “value”}}

Returns

The defined_tags of this Model.

Return type

dict(str, dict(str, object))

property description

Gets the description of this Model. An optional description of the model.

Returns

The description of this Model.

Return type

str

property display_name

Gets the display_name of this Model. A human-friendly name for the model, which can be changed.

Returns

The display_name of this Model.

Return type

str

property freeform_tags

Gets the freeform_tags of this Model. A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. For example: {“bar-key”: “value”}

Returns

The freeform_tags of this Model.

Return type

dict(str, str)

property id

[Required] Gets the id of this Model. A unique identifier that is immutable after creation.

Returns

The id of this Model.

Return type

str

property inference_units

Gets the inference_units of this Model. Number of replicas required for this model.

Returns

The inference_units of this Model.

Return type

int

property is_composed_model

Gets the is_composed_model of this Model. Set to true when the model is created by using multiple key value extraction models.

Returns

The is_composed_model of this Model.

Return type

bool

property is_quick_mode

Gets the is_quick_mode of this Model. Set to true when experimenting with a new model type or dataset, so model training is quick, with a predefined low number of passes through the training data.

Returns

The is_quick_mode of this Model.

Return type

bool

property labels

Gets the labels of this Model. The collection of labels used to train the custom model.

Returns

The labels of this Model.

Return type

list[str]

property language

Gets the language of this Model. The document language for model training, abbreviated according to the BCP 47 syntax.

Returns

The language of this Model.

Return type

str

property lifecycle_details

Gets the lifecycle_details of this Model. A message describing the current state in more detail, that can provide actionable information if training failed.

Returns

The lifecycle_details of this Model.

Return type

str

property lifecycle_state

[Required] Gets the lifecycle_state of this Model. The current state of the model.

Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The lifecycle_state of this Model.

Return type

str

property locks

Gets the locks of this Model. Locks associated with this resource.

Returns

The locks of this Model.

Return type

list[oci.ai_document.models.ResourceLock]

property max_training_time_in_hours

Gets the max_training_time_in_hours of this Model. The maximum model training time in hours, expressed as a decimal fraction.

Returns

The max_training_time_in_hours of this Model.

Return type

float

property metrics

Gets the metrics of this Model.

Returns

The metrics of this Model.

Return type

oci.ai_document.models.ModelMetrics

property model_sub_type

Gets the model_sub_type of this Model. Applicable to only PRE_TRAINED_KEY_VALUE_EXTRACTION, PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION.

Returns

The model_sub_type of this Model.

Return type

oci.ai_document.models.ModelSubType

property model_type

[Required] Gets the model_type of this Model. The type of the Document model.

Allowed values for this property are: “KEY_VALUE_EXTRACTION”, “DOCUMENT_CLASSIFICATION”, “PRE_TRAINED_TEXT_EXTRACTION”, “PRE_TRAINED_TABLE_EXTRACTION”, “PRE_TRAINED_KEY_VALUE_EXTRACTION”, “PRE_TRAINED_DOCUMENT_CLASSIFICATION”, “PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The model_type of this Model.

Return type

str

property model_version

[Required] Gets the model_version of this Model. The version of the model.

Returns

The model_version of this Model.

Return type

str

property project_id

[Required] Gets the project_id of this Model. The OCID of the project that contains the model.

Returns

The project_id of this Model.

Return type

str

property system_tags

Gets the system_tags of this Model. Usage of system tag keys. These predefined keys are scoped to namespaces. For example: {“orcl-cloud”: {“free-tier-retained”: “true”}}

Returns

The system_tags of this Model.

Return type

dict(str, dict(str, object))

property tenancy_id

Gets the tenancy_id of this Model. The tenancy id of the model.

Returns

The tenancy_id of this Model.

Return type

str

property testing_dataset

Gets the testing_dataset of this Model.

Returns

The testing_dataset of this Model.

Return type

oci.ai_document.models.Dataset

property time_created

[Required] Gets the time_created of this Model. When the model was created, as an RFC3339 datetime string.

Returns

The time_created of this Model.

Return type

datetime

property time_updated

Gets the time_updated of this Model. When the model was updated, as an RFC3339 datetime string.

Returns

The time_updated of this Model.

Return type

datetime

property trained_time_in_hours

Gets the trained_time_in_hours of this Model. The total hours actually used for model training.

Returns

The trained_time_in_hours of this Model.

Return type

float

property training_dataset

Gets the training_dataset of this Model.

Returns

The training_dataset of this Model.

Return type

oci.ai_document.models.Dataset

property validation_dataset

Gets the validation_dataset of this Model.

Returns

The validation_dataset of this Model.

Return type

oci.ai_document.models.Dataset