-
Notifications
You must be signed in to change notification settings - Fork 50
[AQUA] Integrate aqua to use model group #1214
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
base: feature/model_group
Are you sure you want to change the base?
Conversation
…erated-data-science into integrate_model_group_aqua
…erated-data-science into integrate_model_group_aqua
.with_compartment_id(compartment_id) | ||
.with_project_id(project_id) | ||
.with_display_name(model_group_display_name) | ||
.with_description(model_group_description) | ||
.with_freeform_tags(**tags) | ||
.with_defined_tags(**(defined_tags or {})) | ||
.with_custom_metadata_list(model_custom_metadata) | ||
.with_member_models( | ||
[MemberModel(model_id=model.model_id).model_dump() for model in models] |
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.
where is the MemberModel(inference_key = ) assigned? Is the inference key optional? (would this be the model name?)
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 should default to using the model name if user doesn't provide one explicitly. Even though it will not be used in multi-model case, it's still a good practice to include name.
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.
The inference_key
is supposed to be the model name, but the model group has a length restiction for it, making it impossible to set for all models. Leave it empty here for now and will address it back.
ads/aqua/model/model.py
Outdated
|
||
container_params = container_spec.cli_param if container_spec else UNKNOWN | ||
|
||
from ads.aqua.modeldeployment.model_group_config import ModelGroupConfig |
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.
put this at the top of this file
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 has been refactored.
.with_compartment_id(compartment_id) | ||
.with_project_id(project_id) | ||
.with_display_name(model_group_display_name) | ||
.with_description(model_group_description) | ||
.with_freeform_tags(**tags) | ||
.with_defined_tags(**(defined_tags or {})) | ||
.with_custom_metadata_list(model_custom_metadata) | ||
.with_member_models( | ||
[MemberModel(model_id=model.model_id).model_dump() for model in models] |
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 should default to using the model name if user doesn't provide one explicitly. Even though it will not be used in multi-model case, it's still a good practice to include name.
ads/aqua/model/model.py
Outdated
@@ -235,20 +237,27 @@ def create( | |||
def create_multi( | |||
self, | |||
models: List[AquaMultiModelRef], | |||
create_deployment_details, |
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.
Types?
**create_model_deployment_details | ||
).to_oci_model(CreateModelDeploymentDetails) | ||
return CreateModelDeploymentDetails( | ||
**ads_utils.batch_convert_case(create_model_deployment_details, "snake") |
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.
Is it safe to use the batch converter? Why can't we use the old approach?
return OCIDataScienceModelDeployment(
**create_model_deployment_details
).to_oci_model(CreateModelDeploymentDetails)
Integrate aqua to use model group
ModelDeployment
module with model group.AquaDeploymentApp
andAquaModelApp
modules with model group.-- Changed to create model group instead of model while deploying multi models
-- Moved env var
MULTI_MODEL_CONFIG
from deployment env to model group custom metadata-- Stored
multi_model_metadata
as regular custom metadataNotebook