Google Cloud Ai Platform V1 Client - Class ModelDeploymentMonitoringJob (0.21.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class ModelDeploymentMonitoringJob.

Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Generated from protobuf message google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Resource name of a ModelDeploymentMonitoringJob.

↳ display_name string

Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.

↳ endpoint string

Required. Endpoint resource name. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

↳ state int

Output only. The detailed state of the monitoring job. When the job is still creating, the state will be 'PENDING'. Once the job is successfully created, the state will be 'RUNNING'. Pause the job, the state will be 'PAUSED'. Resume the job, the state will return to 'RUNNING'.

↳ schedule_state int

Output only. Schedule state when the monitoring job is in Running state.

↳ latest_monitoring_pipeline_metadata Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob\LatestMonitoringPipelineMetadata

Output only. Latest triggered monitoring pipeline metadata.

↳ model_deployment_monitoring_objective_configs array<Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringObjectiveConfig>

Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.

↳ model_deployment_monitoring_schedule_config Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringScheduleConfig

Required. Schedule config for running the monitoring job.

↳ logging_sampling_strategy Google\Cloud\AIPlatform\V1\SamplingStrategy

Required. Sample Strategy for logging.

↳ model_monitoring_alert_config Google\Cloud\AIPlatform\V1\ModelMonitoringAlertConfig

Alert config for model monitoring.

↳ predict_instance_schema_uri string

YAML schema file uri describing the format of a single instance, which are given to format this Endpoint's prediction (and explanation). If not set, we will generate predict schema from collected predict requests.

↳ sample_predict_instance Google\Protobuf\Value

Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.

↳ analysis_instance_schema_uri string

YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. If there are any data type differences between predict instance and TFDV instance, this field can be used to override the schema. For models trained with Vertex AI, this field must be set as all the fields in predict instance formatted as string.

↳ bigquery_tables array<Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringBigQueryTable>

Output only. The created bigquery tables for the job under customer project. Customer could do their own query & analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response

↳ log_ttl Google\Protobuf\Duration

The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.

↳ labels array|Google\Protobuf\Internal\MapField

The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

↳ create_time Google\Protobuf\Timestamp

Output only. Timestamp when this ModelDeploymentMonitoringJob was created.

↳ update_time Google\Protobuf\Timestamp

Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.

↳ next_schedule_time Google\Protobuf\Timestamp

Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.

↳ stats_anomalies_base_directory Google\Cloud\AIPlatform\V1\GcsDestination

Stats anomalies base folder path.

↳ encryption_spec Google\Cloud\AIPlatform\V1\EncryptionSpec

Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.

↳ enable_monitoring_pipeline_logs bool

If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to Cloud Logging pricing.

↳ error Google\Rpc\Status

Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

getName

Output only. Resource name of a ModelDeploymentMonitoringJob.

Returns
TypeDescription
string

setName

Output only. Resource name of a ModelDeploymentMonitoringJob.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

Required. The user-defined name of the ModelDeploymentMonitoringJob.

The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.

Returns
TypeDescription
string

setDisplayName

Required. The user-defined name of the ModelDeploymentMonitoringJob.

The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEndpoint

Required. Endpoint resource name.

Format: projects/{project}/locations/{location}/endpoints/{endpoint}

Returns
TypeDescription
string

setEndpoint

Required. Endpoint resource name.

Format: projects/{project}/locations/{location}/endpoints/{endpoint}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getState

Output only. The detailed state of the monitoring job.

When the job is still creating, the state will be 'PENDING'. Once the job is successfully created, the state will be 'RUNNING'. Pause the job, the state will be 'PAUSED'. Resume the job, the state will return to 'RUNNING'.

Returns
TypeDescription
int

setState

Output only. The detailed state of the monitoring job.

When the job is still creating, the state will be 'PENDING'. Once the job is successfully created, the state will be 'RUNNING'. Pause the job, the state will be 'PAUSED'. Resume the job, the state will return to 'RUNNING'.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getScheduleState

Output only. Schedule state when the monitoring job is in Running state.

Returns
TypeDescription
int

setScheduleState

Output only. Schedule state when the monitoring job is in Running state.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLatestMonitoringPipelineMetadata

Output only. Latest triggered monitoring pipeline metadata.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob\LatestMonitoringPipelineMetadata|null

hasLatestMonitoringPipelineMetadata

clearLatestMonitoringPipelineMetadata

setLatestMonitoringPipelineMetadata

Output only. Latest triggered monitoring pipeline metadata.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob\LatestMonitoringPipelineMetadata
Returns
TypeDescription
$this

getModelDeploymentMonitoringObjectiveConfigs

Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setModelDeploymentMonitoringObjectiveConfigs

Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.

Parameter
NameDescription
var array<Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringObjectiveConfig>
Returns
TypeDescription
$this

getModelDeploymentMonitoringScheduleConfig

Required. Schedule config for running the monitoring job.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringScheduleConfig|null

hasModelDeploymentMonitoringScheduleConfig

clearModelDeploymentMonitoringScheduleConfig

setModelDeploymentMonitoringScheduleConfig

Required. Schedule config for running the monitoring job.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringScheduleConfig
Returns
TypeDescription
$this

getLoggingSamplingStrategy

Required. Sample Strategy for logging.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\SamplingStrategy|null

hasLoggingSamplingStrategy

clearLoggingSamplingStrategy

setLoggingSamplingStrategy

Required. Sample Strategy for logging.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\SamplingStrategy
Returns
TypeDescription
$this

getModelMonitoringAlertConfig

Alert config for model monitoring.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\ModelMonitoringAlertConfig|null

hasModelMonitoringAlertConfig

clearModelMonitoringAlertConfig

setModelMonitoringAlertConfig

Alert config for model monitoring.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\ModelMonitoringAlertConfig
Returns
TypeDescription
$this

getPredictInstanceSchemaUri

YAML schema file uri describing the format of a single instance, which are given to format this Endpoint's prediction (and explanation).

If not set, we will generate predict schema from collected predict requests.

Returns
TypeDescription
string

setPredictInstanceSchemaUri

YAML schema file uri describing the format of a single instance, which are given to format this Endpoint's prediction (and explanation).

If not set, we will generate predict schema from collected predict requests.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSamplePredictInstance

Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri.

If not set, we will generate predict schema from collected predict requests.

Returns
TypeDescription
Google\Protobuf\Value|null

hasSamplePredictInstance

clearSamplePredictInstance

setSamplePredictInstance

Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri.

If not set, we will generate predict schema from collected predict requests.

Parameter
NameDescription
var Google\Protobuf\Value
Returns
TypeDescription
$this

getAnalysisInstanceSchemaUri

YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze.

If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. If there are any data type differences between predict instance and TFDV instance, this field can be used to override the schema. For models trained with Vertex AI, this field must be set as all the fields in predict instance formatted as string.

Returns
TypeDescription
string

setAnalysisInstanceSchemaUri

YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze.

If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. If there are any data type differences between predict instance and TFDV instance, this field can be used to override the schema. For models trained with Vertex AI, this field must be set as all the fields in predict instance formatted as string.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBigqueryTables

Output only. The created bigquery tables for the job under customer project. Customer could do their own query & analysis. There could be 4 log tables in maximum:

  1. Training data logging predict request/response
  2. Serving data logging predict request/response
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setBigqueryTables

Output only. The created bigquery tables for the job under customer project. Customer could do their own query & analysis. There could be 4 log tables in maximum:

  1. Training data logging predict request/response
  2. Serving data logging predict request/response
Parameter
NameDescription
var array<Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringBigQueryTable>
Returns
TypeDescription
$this

getLogTtl

The TTL of BigQuery tables in user projects which stores logs.

A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasLogTtl

clearLogTtl

setLogTtl

The TTL of BigQuery tables in user projects which stores logs.

A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getLabels

The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getCreateTime

Output only. Timestamp when this ModelDeploymentMonitoringJob was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Timestamp when this ModelDeploymentMonitoringJob was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getNextScheduleTime

Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasNextScheduleTime

clearNextScheduleTime

setNextScheduleTime

Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getStatsAnomaliesBaseDirectory

Stats anomalies base folder path.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\GcsDestination|null

hasStatsAnomaliesBaseDirectory

clearStatsAnomaliesBaseDirectory

setStatsAnomaliesBaseDirectory

Stats anomalies base folder path.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\GcsDestination
Returns
TypeDescription
$this

getEncryptionSpec

Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.

Returns
TypeDescription
Google\Cloud\AIPlatform\V1\EncryptionSpec|null

hasEncryptionSpec

clearEncryptionSpec

setEncryptionSpec

Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.

Parameter
NameDescription
var Google\Cloud\AIPlatform\V1\EncryptionSpec
Returns
TypeDescription
$this

getEnableMonitoringPipelineLogs

If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected.

Please note the logs incur cost, which are subject to Cloud Logging pricing.

Returns
TypeDescription
bool

setEnableMonitoringPipelineLogs

If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected.

Please note the logs incur cost, which are subject to Cloud Logging pricing.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getError

Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

Returns
TypeDescription
Google\Rpc\Status|null

hasError

clearError

setError

Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

Parameter
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this