Examples#
Index > SageMakerMetrics > Examples
Auto-generated documentation for SageMakerMetrics type annotations stubs module types-boto3-sagemaker-metrics.
Client#
Implicit type annotations#
Can be used with types-boto3[sagemaker-metrics]
package installed.
Write your SageMakerMetrics
code as usual,
type checking and code completion should work out of the box.
# SageMakerMetricsClient usage example
from boto3.session import Session
session = Session()
client = session.client("sagemaker-metrics") # (1)
result = client.batch_get_metrics() # (2)
- client: SageMakerMetricsClient
- result: BatchGetMetricsResponseTypeDef
Explicit type annotations#
With types-boto3-lite[sagemaker-metrics]
or a standalone types_boto3_sagemaker_metrics
package, you have to explicitly specify client: SageMakerMetricsClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
# SageMakerMetricsClient usage example with type annotations
from boto3.session import Session
from types_boto3_sagemaker_metrics.client import SageMakerMetricsClient
from types_boto3_sagemaker_metrics.type_defs import BatchGetMetricsResponseTypeDef
from types_boto3_sagemaker_metrics.type_defs import BatchGetMetricsRequestRequestTypeDef
session = Session()
client: SageMakerMetricsClient = session.client("sagemaker-metrics")
kwargs: BatchGetMetricsRequestRequestTypeDef = {...}
result: BatchGetMetricsResponseTypeDef = client.batch_get_metrics(**kwargs)