sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

feat: instance specific jumpstart host requirements

Open evakravi opened this issue 2 years ago • 18 comments

Issue #, if available:

Description of changes: JumpStart provides host requirements for spawning Inference Component endpoints for the different model offerings. However, the settings are only based off the default instance, and if a non-default instance is selected, the customer experiences a sub-optimal experience.

This PR adds support for instance specific host requirements, in line with how JumpStart handles instance specific fields.

Testing done: unit tests

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.

evakravi avatar Jan 30 '24 15:01 evakravi

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 16:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 16:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 16:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 17:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 17:01 mufaddal-rohawala

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 8a949e23a574cfc62a040b4178b4c60acd3f21cb
  • Result: FAILED
  • Build Logs (available for 30 days)

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

mufaddal-rohawala avatar Jan 30 '24 17:01 mufaddal-rohawala

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.17%. Comparing base (8b206ba) to head (f88c942). Report is 48 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4397      +/-   ##
==========================================
+ Coverage   86.94%   87.17%   +0.23%     
==========================================
  Files        1203      387     -816     
  Lines      107211    35817   -71394     
==========================================
- Hits        93211    31223   -61988     
+ Misses      14000     4594    -9406     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 30 '24 18:01 codecov-commenter

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 39d3fa628c2bc1a3655e430b872b895ce519d016
  • Result: FAILED
  • Build Logs (available for 30 days)

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

mufaddal-rohawala avatar Jan 30 '24 19:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 19:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 19:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 30 '24 19:01 mufaddal-rohawala

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 39d3fa628c2bc1a3655e430b872b895ce519d016
  • Result: FAILED
  • Build Logs (available for 30 days)

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

mufaddal-rohawala avatar Jan 30 '24 20:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 31 '24 02:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 31 '24 02:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 31 '24 02:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 31 '24 03:01 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Jan 31 '24 03:01 mufaddal-rohawala

any concern of gpu/accelerator specific parameter of ComputeResourceRequirements that should not be used for a CPU-instance?

We keep a coupling with ResourceRequirements class (https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/compute_resource_requirements/resource_requirements.py#L25), which handles the IC requirements supported by SDK. We would need to modify this class to add additional functionality. There's a unit test in the PR to ensure that if new capabilities are enabled in ResourceRequirements, we would have to update our logic accordingly.

evakravi avatar Jan 31 '24 17:01 evakravi

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Feb 26 '24 15:02 mufaddal-rohawala

AWS CodeBuild CI Report

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

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

mufaddal-rohawala avatar Feb 26 '24 15:02 mufaddal-rohawala