Skip to content

[WIP][AQUA] Group Model Deployment #1217

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 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
066d555
Added support to create model group.
lu-ohai May 29, 2025
99ef319
Added comments.
lu-ohai May 29, 2025
895112c
Merge branch 'main' of https://github.com/oracle/accelerated-data-sci…
lu-ohai May 29, 2025
f6c2c57
Updated pr and added unit tests.
lu-ohai Jun 10, 2025
41e6d6a
[Model Group] Added support for model group (#1194)
lu-ohai Jun 10, 2025
8b63630
Merge branch 'main' of https://github.com/oracle/accelerated-data-sci…
lu-ohai Jun 26, 2025
395e5ce
Merge branch 'main' of https://github.com/oracle/accelerated-data-sci…
lu-ohai Jul 7, 2025
a84b58b
[AQUA] Integrate aqua to use model group (#1214)
lu-ohai Jul 7, 2025
43d0a37
Merge branch 'main' into feature/model_group
mrDzurb Jul 10, 2025
2d4f16c
Added support for deploy stack model.
lu-ohai Jul 10, 2025
4095c8b
Updated pr.
lu-ohai Jul 16, 2025
41f543e
Added unit tests.
lu-ohai Jul 16, 2025
0797da8
Updated pr.
lu-ohai Jul 21, 2025
190e2d8
Updated pr.
lu-ohai Jul 25, 2025
44e025c
[AQUA] Added support for deploy stack model. (#1223)
lu-ohai Jul 28, 2025
c8bb83a
Added support for ft model v2.
lu-ohai Jul 28, 2025
437a47c
Merge branch 'feature/model_group' of https://github.com/oracle/accel…
lu-ohai Jul 28, 2025
23ff32b
Merge branch 'main' of https://github.com/oracle/accelerated-data-sci…
lu-ohai Jul 29, 2025
97568d5
Fixed import error.
lu-ohai Jul 29, 2025
71c908c
Merge branch 'main' of https://github.com/oracle/accelerated-data-sci…
lu-ohai Jul 31, 2025
d852209
Added cli to convert legacy fine tuned model to v2. (#1241)
lu-ohai Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ads/aqua/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def create_model_catalog(
model_taxonomy_metadata: Union[ModelTaxonomyMetadata, Dict],
compartment_id: str,
project_id: str,
freeform_tags: Dict = None,
defined_tags: Dict = None,
**kwargs,
) -> DataScienceModel:
Expand All @@ -303,6 +304,7 @@ def create_model_catalog(
.with_custom_metadata_list(model_custom_metadata)
.with_defined_metadata_list(model_taxonomy_metadata)
.with_provenance_metadata(ModelProvenanceMetadata(training_id=UNKNOWN))
.with_freeform_tags(**(freeform_tags or {}))
.with_defined_tags(
**(defined_tags or {})
) # Create defined tags when a model is created.
Expand Down
1 change: 1 addition & 0 deletions ads/aqua/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Tags(ExtendedEnum):
MODEL_FORMAT = "model_format"
MODEL_ARTIFACT_FILE = "model_file"
MULTIMODEL_TYPE_TAG = "aqua_multimodel"
AQUA_FINE_TUNE_MODEL_VERSION = "fine_tune_model_version"


class InferenceContainerType(ExtendedEnum):
Expand Down
1 change: 1 addition & 0 deletions ads/aqua/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
AQUA_TROUBLESHOOTING_LINK = "https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/troubleshooting-tips.md"
MODEL_FILE_DESCRIPTION_VERSION = "1.0"
MODEL_FILE_DESCRIPTION_TYPE = "modelOSSReferenceDescription"
AQUA_FINE_TUNE_MODEL_VERSION = "v2"

TRAINING_METRICS_FINAL = "training_metrics_final"
VALIDATION_METRICS_FINAL = "validation_metrics_final"
Expand Down
1 change: 1 addition & 0 deletions ads/aqua/finetuning/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class FineTuneCustomMetadata(ExtendedEnum):
SERVICE_MODEL_ARTIFACT_LOCATION = "artifact_location"
SERVICE_MODEL_DEPLOYMENT_CONTAINER = "deployment-container"
SERVICE_MODEL_FINE_TUNE_CONTAINER = "finetune-container"
FINE_TUNE_INCLUDE_BASE_MODEL_ARTIFACT = "include_base_model_artifact"


class FineTuningRestrictedParams(ExtendedEnum):
Expand Down
5 changes: 5 additions & 0 deletions ads/aqua/finetuning/finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def create(
"val_set_size": create_fine_tuning_details.validation_set_size,
"training_data": ft_dataset_path,
}
# needs to add 'fine_tune_model_version' tag when creating the ft model for the
# ft container to block merging base model artifact with ft model artifact.
ft_model_freeform_tags = {Tags.AQUA_FINE_TUNE_MODEL_VERSION: "v2"}

ft_model = self.create_model_catalog(
display_name=create_fine_tuning_details.ft_name,
Expand All @@ -314,6 +317,7 @@ def create(
compartment_id=target_compartment,
project_id=target_project,
model_by_reference=True,
freeform_tags=ft_model_freeform_tags,
defined_tags=create_fine_tuning_details.defined_tags,
)
defined_metadata_dict = {}
Expand Down Expand Up @@ -446,6 +450,7 @@ def create(

model_freeform_tags = {
**model_freeform_tags,
**(ft_model.freeform_tags or {}),
Tags.READY_TO_FINE_TUNE: "false",
Tags.AQUA_TAG: UNKNOWN,
Tags.AQUA_FINE_TUNED_MODEL_TAG: f"{source.id}#{source.display_name}",
Expand Down
Loading