Skip to content

JumpStart Gated Model Support in ModelBuilder Local Modes #4567

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 16 commits into from
Apr 11, 2024

Conversation

makungaj1
Copy link
Contributor

@makungaj1 makungaj1 commented Apr 9, 2024

Issue #, if available:

Description of changes:
JumpStart does not give customers direct access to gated model weights, this means that ModelBuilder's local modes cannot operate with a JumpStart gated models as weights need to be downloaded in customers' device.

This PR restricts JumpStart Gated Model to only ModelBuilder's endpoint mode. (Backward compatible)

  • Example code to deploy a JumpStart gated model on a SM endpoint with ModelBuilder.
model_builder = ModelBuilder(
    model=js_gated_model_id,
    schema_builder=SchemaBuilder(sample_input, sample_output),
    mode=Mode.SAGEMAKER_ENDPOINT
)

model = model_builder.build()

predictor = model.deploy(accept_eula=True)

Testing done:

  • Unit Test
  • Integration test
  • E2E with Notebook

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

  • [x ] I have read the CONTRIBUTING doc
  • [ x] 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
  • [ x] I used the commit message format described in CONTRIBUTING
  • [ x] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • [ x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • [x ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [x ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • [x ] I have checked that my tests are not configured for a specific region or account (if appropriate)
  • [ x] 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.

@makungaj1 makungaj1 requested a review from a team as a code owner April 9, 2024 16:27
@makungaj1 makungaj1 requested review from knikure and removed request for a team April 9, 2024 16:27
@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mufaddal-rohawala mufaddal-rohawala merged commit 3d3eff4 into aws:master Apr 11, 2024
malav-shastri pushed a commit to malav-shastri/sagemaker-python-sdk that referenced this pull request Jun 20, 2024
…4567)

* Restrict JS Gated nodels only in SM Endpoint mode

* Add tests

* Address PR review comments

* Resolve PR comments

* Resolve PR comments

* Resolve PR comments

* Resolve PR comments

* Fix integ tests

* Fix tests

* Fix tests

* Fix integ tests

---------

Co-authored-by: Jonathan Makunga <[email protected]>
jiapinw pushed a commit to jiapinw/sagemaker-python-sdk that referenced this pull request Jun 25, 2024
…4567)

* Restrict JS Gated nodels only in SM Endpoint mode

* Add tests

* Address PR review comments

* Resolve PR comments

* Resolve PR comments

* Resolve PR comments

* Resolve PR comments

* Fix integ tests

* Fix tests

* Fix tests

* Fix integ tests

---------

Co-authored-by: Jonathan Makunga <[email protected]>
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.

6 participants