Skip to content

[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

Open
wants to merge 7 commits into
base: feature/model_group
Choose a base branch
from

Conversation

lu-ohai
Copy link
Member

@lu-ohai lu-ohai commented Jun 26, 2025

Integrate aqua to use model group

  • Integrated ModelDeployment module with model group.
  • Integrated AquaDeploymentApp and AquaModelApp 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 metadata

Notebook

  • Multi model deployment and model group created during deployment
Screenshot 2025-07-01 at 1 01 20 PM Screenshot 2025-07-01 at 12 47 43 PM
  • Get aqua multi deployment created from model group
Screenshot 2025-07-01 at 12 45 52 PM
  • Get aqua single deployment created from model
Screenshot 2025-07-01 at 12 46 18 PM Screenshot 2025-07-01 at 1 11 31 PM

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 26, 2025
@mrDzurb mrDzurb changed the title Integrate aqua to use model group [AQUA] Integrate aqua to use model group Jun 29, 2025
@lu-ohai lu-ohai marked this pull request as ready for review July 1, 2025 17:04
.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]
Copy link
Member

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?)

Copy link
Member

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.

Copy link
Member Author

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.


container_params = container_spec.cli_param if container_spec else UNKNOWN

from ads.aqua.modeldeployment.model_group_config import ModelGroupConfig
Copy link
Member

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

Copy link
Member Author

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]
Copy link
Member

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.

@@ -235,20 +237,27 @@ def create(
def create_multi(
self,
models: List[AquaMultiModelRef],
create_deployment_details,
Copy link
Member

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")
Copy link
Member

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants