-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: ModelReference deployment for Alt Configs models #4813
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
Conversation
src/sagemaker/jumpstart/types.py
Outdated
if json_obj.get("inference_configs") | ||
else None | ||
) | ||
inference_configs_dict: Optional[Dict[str, JumpStartMetadataConfig]] = json_obj[ |
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.
I'm not sure if this works, now that the inference_configs_dict
becomes a json object, how would we construct the JumpStartMetadataConfig
class without parsing the json?
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.
+1, also curious if we should do .get
here also to mitigate future errors
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.
if we reintroduce the code above, please create a dedicated utility & unit test separately.
dict comprehension coupled w/ ternary operator are cool, but they make the code much harder to read and maintain.
else None | ||
) | ||
|
||
if self._is_hub_content: |
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.
non-blocking: since we are here, it would be good if we could update line 1792 for training configs, but doesn't have to be in this PR.
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.
thanks for the callout, I added those changed as well
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 add unittest coverage that in types.py, we should catch issues like this in the future
sure I'll have a followup PR for that right after this one, I believe we should be unblocking the customers here first |
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.
I dont have context about this change. But since Captainia@ has already approved the change, and since this is for an active sev2 I am approving this change.
Issue #, if available:
(Please check the internal ticket for the latest updates)
Description of changes:
We have identified that currently Model Ref deployment in CuratedHub is broken which looks like in general incompatibility of new QS code with CuratedHub Code path + some Schema parsing issues.
Parser issue: where is_hub_content flag is not set for the alt config parsing, resulting in failure when parsing the Alt config schema
Parser issue: inference_configs_dict is not being fetched correctly from the json object which results in AttributeError: 'JumpStartScriptScope' object has no attribute 'get'
hub_arn has not been passed for get_jumpstart_configs() resulting in empty hub_arn and code path for curatedHub is not getting executed.
when get_top_config_from_ranking() returns None there's no handling of None response in the _add_config_name_to_init_kwargs() function which results in key error.
Testing done:
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
Tests
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.