Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix key error in _send_metrics() #5068

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

pintaoz-aws
Copy link
Contributor

Issue #, if available:
#4482
Description of changes:
Fix the KeyError by changing the response key according to https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_metrics_BatchPutMetrics.html#API_metrics_BatchPutMetrics_ResponseSyntax
Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • I used the commit message format described in CONTRIBUTING
  • I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have checked that my tests are not configured for a specific region or account (if appropriate)
  • I have used unique_name_from_base to create resource names in integ tests (if appropriate)
  • If adding any dependency in requirements.txt files, I have spell checked and ensured they exist in PyPi

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pintaoz-aws pintaoz-aws merged commit 6b57762 into aws:master Feb 28, 2025
12 of 14 checks passed
benieric pushed a commit to benieric/sagemaker-python-sdk that referenced this pull request Mar 5, 2025
Co-authored-by: pintaoz <pintaoz@amazon.com>
benieric added a commit that referenced this pull request Mar 5, 2025
* feat: Make DistributedConfig Extensible

* pylint

* Include none types when creating config jsons for safer reference

* fix: update test to account for changes

* format

* Add integ test

* pylint

* prepare release v2.240.0

* update development version to v2.240.1.dev0

* Fix key error in _send_metrics() (#5068)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* fix: Added check for the presence of model package group before creating one (#5063)

Co-authored-by: Keshav Chandak <chakesh@amazon.com>

* Use sagemaker session's s3_resource in download_folder (#5064)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* remove union

* fix merge artifact

* Change dir path to distributed_drivers

* update paths

---------

Co-authored-by: ci <ci>
Co-authored-by: pintaoz-aws <167920275+pintaoz-aws@users.noreply.github.com>
Co-authored-by: pintaoz <pintaoz@amazon.com>
Co-authored-by: Keshav Chandak <keshav.chandak1995@gmail.com>
Co-authored-by: Keshav Chandak <chakesh@amazon.com>
mollyheamazon pushed a commit to mollyheamazon/sagemaker-python-sdk that referenced this pull request Mar 14, 2025
Co-authored-by: pintaoz <pintaoz@amazon.com>
mollyheamazon pushed a commit to mollyheamazon/sagemaker-python-sdk that referenced this pull request Mar 14, 2025
* feat: Make DistributedConfig Extensible

* pylint

* Include none types when creating config jsons for safer reference

* fix: update test to account for changes

* format

* Add integ test

* pylint

* prepare release v2.240.0

* update development version to v2.240.1.dev0

* Fix key error in _send_metrics() (aws#5068)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* fix: Added check for the presence of model package group before creating one (aws#5063)

Co-authored-by: Keshav Chandak <chakesh@amazon.com>

* Use sagemaker session's s3_resource in download_folder (aws#5064)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* remove union

* fix merge artifact

* Change dir path to distributed_drivers

* update paths

---------

Co-authored-by: ci <ci>
Co-authored-by: pintaoz-aws <167920275+pintaoz-aws@users.noreply.github.com>
Co-authored-by: pintaoz <pintaoz@amazon.com>
Co-authored-by: Keshav Chandak <keshav.chandak1995@gmail.com>
Co-authored-by: Keshav Chandak <chakesh@amazon.com>
evakravi pushed a commit to evakravi/sagemaker-python-sdk that referenced this pull request Mar 20, 2025
Co-authored-by: pintaoz <pintaoz@amazon.com>
evakravi pushed a commit to evakravi/sagemaker-python-sdk that referenced this pull request Mar 20, 2025
* feat: Make DistributedConfig Extensible

* pylint

* Include none types when creating config jsons for safer reference

* fix: update test to account for changes

* format

* Add integ test

* pylint

* prepare release v2.240.0

* update development version to v2.240.1.dev0

* Fix key error in _send_metrics() (aws#5068)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* fix: Added check for the presence of model package group before creating one (aws#5063)

Co-authored-by: Keshav Chandak <chakesh@amazon.com>

* Use sagemaker session's s3_resource in download_folder (aws#5064)

Co-authored-by: pintaoz <pintaoz@amazon.com>

* remove union

* fix merge artifact

* Change dir path to distributed_drivers

* update paths

---------

Co-authored-by: ci <ci>
Co-authored-by: pintaoz-aws <167920275+pintaoz-aws@users.noreply.github.com>
Co-authored-by: pintaoz <pintaoz@amazon.com>
Co-authored-by: Keshav Chandak <keshav.chandak1995@gmail.com>
Co-authored-by: Keshav Chandak <chakesh@amazon.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants