Registry / type-stubs / mypy-boto3-sagemaker-metrics

mypy-boto3-sagemaker-metrics

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-sagemaker-metrics provides PEP 561 compatible type annotations for the boto3 AWS SDK's SageMakerMetrics service. It enhances development with static type checking, improved IDE auto-completion, and early error detection for SageMakerMetrics client operations. The library is actively maintained, with versions typically aligned with boto3 releases and generated by mypy-boto3-builder.

pip install mypy-boto3-sagemaker-metrics
INSTALL
IMPORT
SIG · MYPY-BOTO3-SAGEMAK
M
mypy-boto3-sagemaker-metrics
type-stubspythonv1.43.0
Install
2.6s avg
Import
Disk
71MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.6s · import 0.000s · 19MB
71MB installed
● package 71MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SageMakerMetricsClient
from mypy_boto3_sagemaker_metrics import SageMakerMetricsClient
from mypy_boto3_sagemaker_metrics import SageMakerMetricsClient

This quickstart demonstrates how to use the type-hinted SageMakerMetrics client to put batch metrics. It shows the correct way to instantiate a client with explicit type annotation and then call a service method, benefiting from IDE auto-completion and static type checks. Replace `my-trial-component-name` with an actual SageMaker Trial Component name for execution.

import boto3 from datetime import datetime from mypy_boto3_sagemaker_metrics.client import SageMakerMetricsClient def put_example_metrics(trial_component_name: str): client: SageMakerMetricsClient = boto3.client("sagemaker-metrics") response = client.batch_put_metrics( TrialComponentName=trial_component_name, MetricData=[ { 'MetricName': 'accuracy', 'Timestamp': datetime.now(), 'Step': 0, 'Value': 0.95 }, { 'MetricName': 'loss', 'Timestamp': datetime.now(), 'Step': 0, 'Value': 0.05 }, ] ) print(f"Successfully put metrics: {response}") # Example usage (requires an existing SageMaker Trial Component) # try: # put_example_metrics("my-trial-component-name") # except Exception as e: # print(f"Error putting metrics: {e}") # Note: Creating a Trial Component is outside the scope of this quickstart. # You would typically get this name from a SageMaker training job or experiment.
Debug
Known issues
breakingAs of `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-sagemaker-metrics` 1.42.3), Python 3.8 support has been explicitly removed. Projects requiring type stubs for this service must use Python 3.9 or newer.
fix
Upgrade your project's Python version to 3.9 or later, or pin an older version of `mypy-boto3-sagemaker-metrics` that supported Python 3.8 if absolute compatibility is needed.
affects: >=1.42.3 (generated by builder >=8.12.0)
breakingIn `mypy-boto3-builder` 8.9.0, there were breaking changes to TypeDef naming conventions. Specifically, suffixes like `RequestRequestTypeDef` were shortened to `RequestTypeDef`, and `Extra` postfixes were moved. While this specific package's service might not be directly affected, other `mypy-boto3` packages used in conjunction could break.
fix
Review your code for direct imports of TypeDefs from `mypy-boto3` packages and adjust names according to the new conventions, often found in the `type_defs` submodule.
affects: >=1.42.3 (generated by builder >=8.9.0)
gotchaThis package provides *only* type annotations for `boto3`. It does not include the `boto3` library itself. You must install `boto3` separately for your code to run at runtime.
fix
Ensure `boto3` is included in your project's dependencies: `pip install boto3`.
affects: All versions
gotchaThe `mypy-boto3` libraries migrated to PEP 561 packages. While this generally improves compatibility with type checkers, older `mypy` configurations or non-standard `pip` usage might require explicit configuration or ensuring packages are installed in the environment where `mypy` runs.
fix
Verify your `mypy` configuration (e.g., `pyproject.toml`) is up-to-date and that `mypy-boto3-sagemaker-metrics` is installed in the Python environment used by your type checker. For best results, use `uv` or `pip` for installation.
affects: >=1.42.3 (generated by builder >=8.12.0)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual runtime functionality for interacting with AWS services.
typing-extensionsoptionalMay be required for full type compatibility on Python versions older than 3.10, although recent builder versions aim to manage this automatically. Typically not needed for Python >=3.9.
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
2
Amazon
1
Resources
mypy-boto3-sagemaker-metrics — pip install mypy-boto3-sagemaker-metrics · libregistry