Method: projects.locations.modelMonitors.searchModelMonitoringStats

Searches Model Monitoring Stats generated within a given time window.

HTTP request

POST https://{service-endpoint}/v1beta1/{modelMonitor}:searchModelMonitoringStats

Where {service-endpoint} is one of the supported service endpoints.

Path parameters

Parameters
modelMonitor

string

Required. ModelMonitor resource name. Format: projects/{project}/locations/{location}/modelMonitors/{modelMonitor}

Request body

The request body contains data with the following structure:

JSON representation
{
  "statsFilter": {
    object (SearchModelMonitoringStatsFilter)
  },
  "timeInterval": {
    object (Interval)
  },
  "pageSize": integer,
  "pageToken": string
}
Fields
statsFilter

object (SearchModelMonitoringStatsFilter)

Filter for search different stats.

timeInterval

object (Interval)

The time interval for which results should be returned.

pageSize

integer

The standard list page size.

pageToken

string

A page token received from a previous ModelMonitoringService.SearchModelMonitoringStats call.

Response body

Response message for ModelMonitoringService.SearchModelMonitoringStats.

If successful, the response body contains data with the following structure:

JSON representation
{
  "monitoringStats": [
    {
      object (ModelMonitoringStats)
    }
  ],
  "nextPageToken": string
}
Fields
monitoringStats[]

object (ModelMonitoringStats)

Stats retrieved for requested objectives.

nextPageToken

string

The page token that can be used by the next ModelMonitoringService.SearchModelMonitoringStats call.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SearchModelMonitoringStatsFilter

Filter for searching ModelMonitoringStats.

JSON representation
{

  // Union field filter can be only one of the following:
  "tabularStatsFilter": {
    object (TabularStatsFilter)
  }
  // End of list of possible types for union field filter.
}
Fields

Union field filter.

filter can be only one of the following:

tabularStatsFilter

object (TabularStatsFilter)

Tabular statistics filter.

TabularStatsFilter

Tabular statistics filter.

JSON representation
{
  "statsName": string,
  "objectiveType": string,
  "modelMonitoringJob": string,
  "modelMonitoringSchedule": string,
  "algorithm": string
}
Fields
statsName

string

If not specified, will return all the stats_names.

objectiveType

string

One of the supported monitoring objectives: raw-feature-drift prediction-output-drift feature-attribution

modelMonitoringJob

string

From a particular monitoring job.

modelMonitoringSchedule

string

From a particular monitoring schedule.

algorithm

string

Specify the algorithm type used for distance calculation, eg: jensen_shannon_divergence, l_infinity.

ModelMonitoringStats

Represents the collection of statistics for a metric.

JSON representation
{

  // Union field stats can be only one of the following:
  "tabularStats": {
    object (ModelMonitoringTabularStats)
  }
  // End of list of possible types for union field stats.
}
Fields

Union field stats.

stats can be only one of the following:

tabularStats

object (ModelMonitoringTabularStats)

Generated tabular statistics.

ModelMonitoringTabularStats

A collection of data points that describes the time-varying values of a tabular metric.

JSON representation
{
  "statsName": string,
  "objectiveType": string,
  "dataPoints": [
    {
      object (ModelMonitoringStatsDataPoint)
    }
  ]
}
Fields
statsName

string

The stats name.

objectiveType

string

One of the supported monitoring objectives: raw-feature-drift prediction-output-drift feature-attribution

dataPoints[]

object (ModelMonitoringStatsDataPoint)

The data points of this time series. When listing time series, points are returned in reverse time order.

ModelMonitoringStatsDataPoint

Represents a single statistics data point.

JSON representation
{
  "currentStats": {
    object (TypedValue)
  },
  "baselineStats": {
    object (TypedValue)
  },
  "thresholdValue": number,
  "hasAnomaly": boolean,
  "modelMonitoringJob": string,
  "schedule": string,
  "createTime": string,
  "algorithm": string
}
Fields
currentStats

object (TypedValue)

Statistics from current dataset.

baselineStats

object (TypedValue)

Statistics from baseline dataset.

thresholdValue

number

Threshold value.

hasAnomaly

boolean

Indicate if the statistics has anomaly.

modelMonitoringJob

string

Model monitoring job resource name.

schedule

string

Schedule resource name.

createTime

string (Timestamp format)

Statistics create time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

algorithm

string

Algorithm used to calculated the metrics, eg: jensen_shannon_divergence, l_infinity.

TypedValue

Typed value of the statistics.

JSON representation
{

  // Union field value can be only one of the following:
  "doubleValue": number,
  "distributionValue": {
    object (DistributionDataValue)
  }
  // End of list of possible types for union field value.
}
Fields
Union field value. The typed value. value can be only one of the following:
doubleValue

number

Double.

distributionValue

object (DistributionDataValue)

Distribution.

DistributionDataValue

Summary statistics for a population of values.

JSON representation
{
  "distribution": value,
  "distributionDeviation": number
}
Fields
distribution

value (Value format)

tensorflow.metadata.v0.DatasetFeatureStatistics format.

distributionDeviation

number

Distribution distance deviation from the current dataset's statistics to baseline dataset's statistics. * For categorical feature, the distribution distance is calculated by L-inifinity norm or Jensen–Shannon divergence. * For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence.