Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: correct response in metrics manager #4563

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ananth102
Copy link
Collaborator

The SageMaker metrics api's response returns a list of errors(if there were any). This patch fixes the error code parsing.

*Issue #, if available: #4482

*Description of changes:

Testing done:

import sagemaker


import boto3
from sagemaker.experiments import run
from sagemaker.session import Session


my_run = run.Run(
    experiment_name="experimentfoo",
    run_name="runfoo",
    tags={"tagkey": "tagvalue"},
    sagemaker_session=Session(),
)

steps = 100
lr = 0.0001
with my_run as my_run_ :
    for step in range(steps):
        my_run_.log_metric(name="Learning Rate", value=lr, step=step)

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

  • [n/a] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [n/a] 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)

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

@ananth102 ananth102 requested a review from a team as a code owner April 5, 2024 21:30
@ananth102 ananth102 requested review from benieric and removed request for a team April 5, 2024 21:30
@ananth102 ananth102 changed the title Correct Response in Metrics Manager fix: correct response in metrics manager Apr 5, 2024
The SageMaker metrics api's response returns a list of errors(if there were any). This patch fixes the error code parsing.
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 87.44%. Comparing base (abe1674) to head (b4070e8).
Report is 1 commits behind head on master.

Files Patch % Lines
src/sagemaker/experiments/_metrics.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4563      +/-   ##
==========================================
- Coverage   87.44%   87.44%   -0.01%     
==========================================
  Files         389      389              
  Lines       36889    36889              
==========================================
- Hits        32258    32257       -1     
- Misses       4631     4632       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: b4070e8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants