Skip to content

fix: removing kwargs as this is breaking predictor_cls param for mode… #4816

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 8 commits into from
Aug 6, 2024

Conversation

ErnevSharma
Copy link
Contributor

…l deploy

Issue #, if available:

Description of changes:

  • kwargs is causing JumpStart model notebooks to fail when using the SageMaker Model class for deploy. This occurs because predictor_cls is not expected as an argument to _create_sagemaker_model.

Testing done:

  • pip installed whl file with changes to example notebook, verified fix.

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.

@ErnevSharma ErnevSharma requested a review from a team as a code owner August 2, 2024 01:14
@ErnevSharma ErnevSharma requested a review from Aditi2424 August 2, 2024 01:14
@@ -1696,8 +1696,7 @@ def deploy(
instance_type=instance_type,
accelerator_type=accelerator_type,
tags=tags,
serverless_inference_config=serverless_inference_config,
**kwargs,
serverless_inference_config=serverless_inference_config
Copy link
Contributor

Choose a reason for hiding this comment

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

oof, this looks like a backward incompatible change, are you sure we can simply do that?

We have to explicitly list the arguments that are eligible to be passed here.

JGuinegagne
JGuinegagne previously approved these changes Aug 2, 2024
@@ -1697,7 +1700,8 @@ def deploy(
accelerator_type=accelerator_type,
tags=tags,
serverless_inference_config=serverless_inference_config,
**kwargs,
Copy link
Member

Choose a reason for hiding this comment

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

optional: maybe log any kwargs that are being ignored?

@@ -771,7 +771,7 @@ def test_jumpstart_model_kwargs_match_parent_class(self):
and reach out to JumpStart team."""

init_args_to_skip: Set[str] = set(["model_reference_arn"])
deploy_args_to_skip: Set[str] = set(["kwargs"])
deploy_args_to_skip: Set[str] = set(["kwargs", "model_reference_arn"])
Copy link
Member

Choose a reason for hiding this comment

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

why don't we accept this argument for JumpStartModel.deploy?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

@sage-maker sage-maker merged commit 313cd18 into aws:master Aug 6, 2024
14 checks passed
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