Skip to content

Conversation

@evakravi
Copy link
Member

Issue #, if available:

Description of changes:
Attaching a JumpStartEstimator for a gated model results in the exception:
ValueError: Need to define 'accept_eula'='true' within Environment. Model 'huggingface-llm-gemma-2b-instruct' requires accepting end-user license agreement (EULA). See https://jumpstart-cache-prod-us-west-2.s3.us-west-2.amazonaws.com/fmhMetadata/terms/gemmaTerms.txt for terms of use.

This issue is now fixed so that an exception is not thrown.

Testing done:
Unit, integ tests added
Manual test

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 evakravi requested a review from a team as a code owner March 28, 2024 20:08
@evakravi evakravi requested review from zhaoqizqwang and removed request for a team March 28, 2024 20:08
@codecov
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.38%. Comparing base (cc5d0dc) to head (fced408).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4546   +/-   ##
=======================================
  Coverage   87.38%   87.38%           
=======================================
  Files         389      389           
  Lines       36776    36780    +4     
=======================================
+ Hits        32135    32139    +4     
  Misses       4641     4641           

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

region=sagemaker_session.boto_region_name,
scope=JumpStartScriptScope.TRAINING,
tolerate_deprecated_model=True, # model is already trained, so tolerate if deprecated
tolerate_vulnerable_model=True, # model is already trained, so tolerate if vulnerable
Copy link
Contributor

Choose a reason for hiding this comment

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

question: if a model is vulnerable, would this code raise an exception alerting the user:

my_estimator = estimator.attach()
my_model = my_estimator.deploy()

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevertheless, it seems that you are only retrieving the specs to check if the model is gated or not, so that is non-blocking. Consider updating the comments to provide more details however.

Copy link
Member Author

Choose a reason for hiding this comment

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

If the model was actually vulnerable or deprecated, you would get an exception when doing my_estimator.deploy(). As you mention, these tolerate flags are just to get the status of whether the model is gated or not

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@akrishna1995 akrishna1995 merged commit 12fe775 into aws:master Mar 28, 2024
malav-shastri pushed a commit to malav-shastri/sagemaker-python-sdk that referenced this pull request Jun 20, 2024
jiapinw pushed a commit to jiapinw/sagemaker-python-sdk that referenced this pull request Jun 25, 2024
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