ai_core_sdk.resource_clients.metrics_client module

class ai_core_sdk.resource_clients.metrics_client.MetricsCoreClient(rest_client, execution_id: str = None)

Bases: MetricsClient

MetricsCoreClient is a class implemented for interacting with the metrics related endpoints of the server. It is inherited from the base class ai_api_client_sdk.resource_clients.metrics_client.MetricsClient

__init__(rest_client, execution_id: str = None) None
modify(execution_id: str = '', metrics: List[Metric] = None, tags: List[MetricTag] = None, custom_info: List[MetricCustomInfo] = None, resource_group: str = None) None

Creates or updates the metrics for an execution.

param execution_id:

ID of the execution, of which the metrics should be modified.

type execution_id:

str

param metrics:

List of the metrics related to the execution, defaults to None

type metrics:

List[class:ai_api_client_sdk.metric.Metric], optional

param tags:

List of the tags related to the execution, defaults to None

type tags:

List[class:’ai_api_client_sdk.models.metric_tag.MetricTag’], optional

param custom_info:

List of custom info related to the execution, defaults to None

type custom_info:

List[class:ai_api_client_sdk.models.metric_custom_info.MetricCustomInfo], optional

param resource_group:

Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

type resource_group:

str

raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the

server
raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

log_metrics(metrics: List[Metric], execution_id: str = '', artifact_name: str = None, resource_group: str = None) None

Creates or updates the metrics for an execution.

param metrics:

List of the metrics related to the execution,

type metrics:

List[class:ai_api_client_sdk.metric.Metric]

param execution_id:

ID of the execution, of which the metrics should be modified.

type execution_id:

str

param artifact_name:

Name of the artifact to associate with a metric, defaults to None

type artifact_name:

str

param resource_group:

Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

type resource_group:

str

raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the

server
raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

set_custom_info(custom_info: List[MetricCustomInfo], execution_id: str = '', resource_group: str = None) None
log custom info against the given execution

captures consumption semantics for the metrics or complex metric in JSON format.

param custom_info:

List of custom info related to the execution

type custom_info:

List[class:ai_api_client_sdk.models.metric_custom_info.MetricCustomInfo], optional

param execution_id:

ID of the execution, of which the metrics should be modified.

type execution_id:

str

param resource_group:

Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

type resource_group:

str

raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the

server
raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

set_tags(tags: List[MetricTag], execution_id: str = '', resource_group: str = None) None

log tags against the given execution

param tags:

List of the tags related to the execution, defaults to None

type tags:

List[class:’ai_api_client_sdk.models.metric_tag.MetricTag’]

param execution_id:

ID of the execution, of which the metrics should be modified.

type execution_id:

str

param resource_group:

Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

type resource_group:

str

raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the

server
raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server