Skip to content

fix: JumpStart list models flaky tests #4525

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 2 commits into from
Mar 22, 2024
Merged

Conversation

Captainia
Copy link
Collaborator

Issue #, if available:

Description of changes:

This change fixes the list models flaky unittests by making sure the mocks are set up correctly.

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)

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

@Captainia Captainia marked this pull request as ready for review March 22, 2024 14:35
@Captainia Captainia requested a review from a team as a code owner March 22, 2024 14:35
@Captainia Captainia requested review from zhaoqizqwang and removed request for a team March 22, 2024 14:35
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.38%. Comparing base (327638e) to head (8a978b1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4525   +/-   ##
=======================================
  Coverage   87.38%   87.38%           
=======================================
  Files         389      389           
  Lines       36776    36776           
=======================================
+ Hits        32135    32136    +1     
+ Misses       4641     4640    -1     

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

@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

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

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

@@ -393,7 +393,9 @@ def _generate_jumpstart_model_versions( # pylint: disable=redefined-builtin
if isinstance(filter, str):
filter = Identity(filter)

manifest_keys = set(models_manifest_list[0].__slots__)
manifest_keys = set(
Copy link
Member

Choose a reason for hiding this comment

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

that's a bit concerning that this does not cause any unit tests to fail

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's because these keys are exactly the same. I was thinking to add a hypothetical new key in a test, but then I feel it should be done when we actually change the slots in JumpStartModelHeader. Let me know if you feel strongly to add it now

Copy link
Member

Choose a reason for hiding this comment

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

so you're say it happens to work now, cause they're the same. i guess that's fine. what about the spec keys though?

@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

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

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

@benieric benieric merged commit ca9ae23 into aws:master Mar 22, 2024
malav-shastri pushed a commit to malav-shastri/sagemaker-python-sdk that referenced this pull request Jun 20, 2024
* fix list models flaky tests

* fix
jiapinw pushed a commit to jiapinw/sagemaker-python-sdk that referenced this pull request Jun 25, 2024
* fix list models flaky tests

* fix
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.

4 participants