-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
src/fmeval/model_runners/util.py
Outdated
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: |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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]
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Issue #, if available:
Need to add changes to support proprietary models.
Description of changes:
jumpstart_extractor.py
to support proprietary model manifest file for validationjumpstart_composer.py
to supportmodel_type
as proprietary forcompose
method.sm_jumpstart_model_runner.py
to supportmodel_type
as proprietary for creating apredictor
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.