Skip to content
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

chore: add support for proprietary models #276

Merged
merged 4 commits into from
May 14, 2024

Conversation

shrestha-bikash
Copy link
Contributor

Issue #, if available:
Need to add changes to support proprietary models.

Description of changes:

  • Added changes in jumpstart_extractor.py to support proprietary model manifest file for validation
  • Added changes in jumpstart_composer.py to support model_type as proprietary for compose method.
  • Added changes in sm_jumpstart_model_runner.py to support model_type as proprietary for creating a predictor.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@danielezhu danielezhu changed the title chore: added changes to support proprietary models chore: add support for proprietary models May 13, 2024
proprietary_models_manifest = f.read().decode("utf-8")

model = seq(json.loads(proprietary_models_manifest)).find(lambda x: x.get(MODEL_ID, None) == jumpstart_model_id)
if model:
Copy link
Contributor

Choose a reason for hiding this comment

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

You could remove the is_proprietary variable entirely and simply do

return model is not None

@@ -146,10 +147,15 @@ def get_jumpstart_sdk_manifest(region: str) -> Dict:
jumpstart_bucket_base_url = os.environ.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the return type to List[Dict].

Copy link
Member

Choose a reason for hiding this comment

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

We are trying to fetch a value as a dict later in the flow. Does this become a list or will it remain a dict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This static method actually returns a list of dict, hence need to change that to List[Dict]. Later in the flow where we are using this method, we get an item as a dict from the returned list and use that dict to get modelId for checking valid model id.

@keerthanvasist keerthanvasist merged commit 055e987 into aws:main May 14, 2024
3 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.

3 participants