Skip to content

feature: Add business details and hyper parameters fields and update test_model_card.py #3639

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

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

Andywangnn
Copy link
Contributor

Issue #, if available:

Description of changes:
feature: add business details and hyper parameters fields to python SDK.

Testing done:
Passed unit test for test_model_card.py by running export IGNORE_COVERAGE=- ; tox -- -s -vv tests/unit/test_model_card.py ; unset IGNORE_COVERAGE

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)

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

@Andywangnn Andywangnn requested a review from a team as a code owner February 7, 2023 00:20
@Andywangnn Andywangnn requested review from vikas0203 and removed request for a team February 7, 2023 00:20
@Zhenshan-Jin Zhenshan-Jin self-requested a review February 7, 2023 00:42
@@ -866,6 +891,14 @@ def __init__(self, attr1): # pylint: disable=C0116
):
ExampleClass(attr1=IntendedUses())

with pytest.raises(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this lines. The goal of this test is to see if _IsModelCardObject descriptor working as expected and not specific to IntendedUses class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this lines. The goal of this test is to see if _IsModelCardObject descriptor working as expected and not specific to IntendedUses class

make sense, will remove those lines for business details

@@ -1047,6 +1080,7 @@ def test_training_details_autodiscovery_from_model_overview_autopilot(
)

assert len(training_details.training_job_details.training_metrics) == 0
assert len(training_details.training_job_details.hyper_parameters) == 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to check if hyper parameter is part of return of sagemaker_client.search API. and update SEARCH_TRAINING_JOB_EXAMPLE and SEARCH_TRAINING_JOB_AUTOPILOT_EXAMPLE accordingly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please comment your fix if any

@Andywangnn Andywangnn changed the title Add business details and hyper parameters fields and update test_model_card.py feature: Add business details and hyper parameters fields and update test_model_card.py Feb 8, 2023
@Andywangnn Andywangnn force-pushed the mainline branch 2 times, most recently from a28fb14 to 96dd74e Compare February 8, 2023 19:52
@Zhenshan-Jin
Copy link
Contributor

Where is the code to parse the hyper_parameters?

Copy link
Contributor

@vikas0203 vikas0203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/bot run all

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 2f8bf92
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2023

Codecov Report

Merging #3639 (2f8bf92) into master (8d2c16b) will decrease coverage by 0.79%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##           master    #3639      +/-   ##
==========================================
- Coverage   89.59%   88.80%   -0.79%     
==========================================
  Files         968      227     -741     
  Lines       90084    22299   -67785     
==========================================
- Hits        80707    19803   -60904     
+ Misses       9377     2496    -6881     
Impacted Files Coverage Δ
src/sagemaker/model_card/__init__.py 100.00% <ø> (ø)
src/sagemaker/model_card/model_card.py 93.12% <94.73%> (ø)
src/sagemaker/model_card/schema_constraints.py 100.00% <100.00%> (ø)
...y37/lib/python3.7/site-packages/sagemaker/tuner.py
...hon3.7/site-packages/sagemaker/sklearn/__init__.py
.../sagemaker/cli/compatibility/v2/modifiers/serde.py
...9/site-packages/sagemaker/model_card/model_card.py
...n3.8/site-packages/sagemaker/pytorch/processing.py
...hon3.10/site-packages/sagemaker/jumpstart/enums.py
...-packages/sagemaker/experiments/trial_component.py
... and 1188 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 2f8bf92
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: 2f8bf92
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: 2f8bf92
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@vikas0203 vikas0203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/bot run pr

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@vikas0203 vikas0203 merged commit 2bcd643 into aws:master Feb 10, 2023
JoseJuan98 pushed a commit to JoseJuan98/sagemaker-python-sdk that referenced this pull request Mar 4, 2023
nmadan pushed a commit to nmadan/sagemaker-python-sdk that referenced this pull request Apr 18, 2023
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.

5 participants