Skip to content

SageMakerMetrics module

Index > SageMakerMetrics

Auto-generated documentation for SageMakerMetrics type annotations stubs module mypy-boto3-sagemaker-metrics.

How to install

VSCode extension

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and SageMakerMetrics.

From PyPI with pip

Install boto3-stubs for SageMakerMetrics service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[sagemaker-metrics]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[sagemaker-metrics]'

# standalone installation
python -m pip install mypy-boto3-sagemaker-metrics

How to uninstall

python -m pip uninstall -y mypy-boto3-sagemaker-metrics


Code samples can be found in Examples.


Type annotations and code completion for boto3.client("sagemaker-metrics") as SageMakerMetricsClient boto3 documentation

# SageMakerMetricsClient usage example

from boto3.session import Session

from mypy_boto3_sagemaker_metrics.client import SageMakerMetricsClient

def get_client() -> SageMakerMetricsClient:
    return Session().client("sagemaker-metrics")


Type annotations for literals used in methods and schemas.

# PutMetricsErrorCodeType usage example

from mypy_boto3_sagemaker_metrics.literals import PutMetricsErrorCodeType

def get_value() -> PutMetricsErrorCodeType:
    return "CONFLICT_ERROR"

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

# BatchPutMetricsErrorTypeDef usage example

from mypy_boto3_sagemaker_metrics.type_defs import BatchPutMetricsErrorTypeDef

def get_value() -> BatchPutMetricsErrorTypeDef:
    return {
        "Code": ...,