Skip to content

Commit 7ff684f

Browse files
Merge branch 'main' into aqua/ADS_MS_changes
2 parents 642e8f9 + e65f09c commit 7ff684f

File tree

12 files changed

+109
-22
lines changed

12 files changed

+109
-22
lines changed

README-development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The Oracle Accelerated Data Science (ADS) SDK used by data scientists and analysts for
55
data exploration and experimental machine learning to democratize machine learning and
66
analytics by providing easy-to-use,
7-
performant, and user friendly tools that
7+
performant, and user-friendly tools that
88
brings together the best of data science practices.
99

1010
The ADS SDK helps you connect to different data sources, perform exploratory data analysis,
@@ -176,7 +176,7 @@ pip install -r test-requirements.txt
176176
```
177177

178178
### Step 2: Create local .env files
179-
Running the local JuypterLab server requires setting OCI authentication, proxy, and OCI namespace parameters. Adapt this .env file with your specific OCI profile and OCIDs to set these variables.
179+
Running the local JupyterLab server requires setting OCI authentication, proxy, and OCI namespace parameters. Adapt this .env file with your specific OCI profile and OCIDs to set these variables.
180180

181181
```
182182
CONDA_BUCKET_NS="your_conda_bucket"

ads/aqua/common/enums.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
44

5+
from typing import Dict, List
6+
57
from ads.common.extended_enum import ExtendedEnum
68

79

@@ -106,3 +108,15 @@ class ModelFormat(ExtendedEnum):
106108
class Platform(ExtendedEnum):
107109
ARM_CPU = "ARM_CPU"
108110
NVIDIA_GPU = "NVIDIA_GPU"
111+
112+
113+
# This dictionary defines compatibility groups for container families.
114+
# The structure is:
115+
# - Key: The preferred container family to use when multiple compatible families are selected.
116+
# - Value: A list of all compatible families (including the preferred one).
117+
CONTAINER_FAMILY_COMPATIBILITY: Dict[str, List[str]] = {
118+
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY: [
119+
InferenceContainerTypeFamily.AQUA_VLLM_V1_CONTAINER_FAMILY,
120+
InferenceContainerTypeFamily.AQUA_VLLM_CONTAINER_FAMILY,
121+
],
122+
}

ads/aqua/common/utils.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
from ads.aqua.common.entities import GPUShapesIndex
3939
from ads.aqua.common.enums import (
40+
CONTAINER_FAMILY_COMPATIBILITY,
4041
InferenceContainerParamType,
4142
InferenceContainerType,
4243
RqsAdditionalDetails,
@@ -1277,3 +1278,40 @@ def load_gpu_shapes_index(
12771278
)
12781279

12791280
return GPUShapesIndex(**data)
1281+
1282+
1283+
def get_preferred_compatible_family(selected_families: set[str]) -> str:
1284+
"""
1285+
Determines the preferred container family from a given set of container families.
1286+
1287+
This method is used in the context of multi-model deployment to handle cases
1288+
where models selected for deployment use different, but compatible, container families.
1289+
1290+
It checks the input `families` set against the `CONTAINER_FAMILY_COMPATIBILITY` map.
1291+
If a compatibility group exists that fully includes all the families in the input,
1292+
the corresponding key (i.e., the preferred family) is returned.
1293+
1294+
Parameters
1295+
----------
1296+
families : set[str]
1297+
A set of container family identifiers.
1298+
1299+
Returns
1300+
-------
1301+
Optional[str]
1302+
The preferred container family if all families are compatible within one group;
1303+
otherwise, returns `None` indicating that no compatible family group was found.
1304+
1305+
Example
1306+
-------
1307+
>>> get_preferred_compatible_family({"odsc-vllm-serving", "odsc-vllm-serving-v1"})
1308+
'odsc-vllm-serving-v1'
1309+
1310+
>>> get_preferred_compatible_family({"odsc-vllm-serving", "odsc-tgi-serving"})
1311+
None # Incompatible families
1312+
"""
1313+
for preferred, compatible_list in CONTAINER_FAMILY_COMPATIBILITY.items():
1314+
if selected_families.issubset(set(compatible_list)):
1315+
return preferred
1316+
1317+
return None

ads/aqua/model/model.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
generate_tei_cmd_var,
3939
get_artifact_path,
4040
get_hf_model_info,
41+
get_preferred_compatible_family,
4142
list_os_files_with_extension,
4243
load_config,
4344
upload_folder,
@@ -340,15 +341,25 @@ def create_multi(
340341

341342
selected_models_deployment_containers.add(deployment_container)
342343

343-
# Check if the all models in the group shares same container family
344-
if len(selected_models_deployment_containers) > 1:
344+
if not selected_models_deployment_containers:
345345
raise AquaValueError(
346-
"The selected models are associated with different container families: "
347-
f"{list(selected_models_deployment_containers)}."
348-
"For multi-model deployment, all models in the group must share the same container family."
346+
"None of the selected models are associated with a recognized container family. "
347+
"Please review the selected models, or select a different group of models."
349348
)
350349

351-
deployment_container = selected_models_deployment_containers.pop()
350+
# Check if the all models in the group shares same container family
351+
if len(selected_models_deployment_containers) > 1:
352+
deployment_container = get_preferred_compatible_family(
353+
selected_families=selected_models_deployment_containers
354+
)
355+
if not deployment_container:
356+
raise AquaValueError(
357+
"The selected models are associated with different container families: "
358+
f"{list(selected_models_deployment_containers)}."
359+
"For multi-model deployment, all models in the group must share the same container family."
360+
)
361+
else:
362+
deployment_container = selected_models_deployment_containers.pop()
352363

353364
# Generate model group details
354365
timestamp = datetime.now().strftime("%Y%m%d")

docs/source/user_guide/configuration/configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ encryption keys.
296296

297297
Master encryption keys can be generated internally by the Vault service
298298
or imported to the service from an external source. Once a master
299-
encryption key has been created, the Oracle Cloud Infrastruture API can
299+
encryption key has been created, the Oracle Cloud Infrastructure API can
300300
be used to generate data encryption keys that the Vault service returns
301301
to you. by default, a wrapping key is included with each vault. A
302302
wrapping key is a 4096-bit asymmetric encryption key pair based on the
@@ -673,7 +673,7 @@ prints it. This shows that the password was actually updated.
673673
wait_for_states=[oci.vault.models.Secret.LIFECYCLE_STATE_ACTIVE]).data
674674
675675
# The secret OCID does not change.
676-
print("Orginal Secret OCID: {}".format(secret_id))
676+
print("Original Secret OCID: {}".format(secret_id))
677677
print("Updated Secret OCID: {}".format(secret_update.id))
678678
679679
### Read a secret's value.
@@ -685,7 +685,7 @@ prints it. This shows that the password was actually updated.
685685
686686
.. parsed-literal::
687687
688-
Orginal Secret OCID: ocid1.vaultsecret.oc1.iad.amaaaaaav66vvnia2bmkbroin34eu2ghmubvmrtjdgo4yr6daewakacwuk4q
688+
Original Secret OCID: ocid1.vaultsecret.oc1.iad.amaaaaaav66vvnia2bmkbroin34eu2ghmubvmrtjdgo4yr6daewakacwuk4q
689689
Updated Secret OCID: ocid1.vaultsecret.oc1.iad.amaaaaaav66vvnia2bmkbroin34eu2ghmubvmrtjdgo4yr6daewakacwuk4q
690690
{'database': 'datamart', 'username': 'admin', 'password': 'UpdatedPassword'}
691691

docs/source/user_guide/configuration/vault.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ also retrieves the updated secret, converts it into a dictionary, and prints it.
239239
wait_for_states=[oci.vault.models.Secret.LIFECYCLE_STATE_ACTIVE]).data
240240
241241
# The secret OCID does not change.
242-
print("Orginal Secret OCID: {}".format(secret_id))
242+
print("Original Secret OCID: {}".format(secret_id))
243243
print("Updated Secret OCID: {}".format(secret_update.id))
244244
245245
### Read a secret's value.
@@ -251,7 +251,7 @@ also retrieves the updated secret, converts it into a dictionary, and prints it.
251251
252252
.. parsed-literal::
253253
254-
Orginal Secret OCID: ocid1.vaultsecret..<unique_ID>
254+
Original Secret OCID: ocid1.vaultsecret..<unique_ID>
255255
Updated Secret OCID: ocid1.vaultsecret..<unique_ID>
256256
{'database': 'datamart', 'username': 'admin', 'password': 'UpdatedPassword'}
257257

docs/source/user_guide/data_flow/dataflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In the preparation stage, you prepare the configuration object necessary to crea
6363
* ``pyspark_file_path``: The local path to your ``PySpark`` script.
6464
* ``script_bucket``: The bucket used to read/write the ``PySpark`` script in Object Storage.
6565

66-
ADS checks that the bucket exists, and that you can write to it from your notebook sesssion. Optionally, you can change values for these parameters:
66+
ADS checks that the bucket exists, and that you can write to it from your notebook session. Optionally, you can change values for these parameters:
6767

6868
* ``compartment_id``: The OCID of the compartment to create a Data Flow application. If it's not provided, the same compartment as your dataflow object is used.
6969
* ``driver_shape``: The driver shape used to create the application. The default value is ``"VM.Standard2.4"``.

docs/source/user_guide/data_flow/legacy_dataflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ In the preparation stage, you prepare the configuration object necessary to crea
6868
* ``pyspark_file_path``: The local path to your ``PySpark`` script.
6969
* ``script_bucket``: The bucket used to read/write the ``PySpark`` script in Object Storage.
7070

71-
ADS checks that the bucket exists, and that you can write to it from your notebook sesssion. Optionally, you can change values for these parameters:
71+
ADS checks that the bucket exists, and that you can write to it from your notebook session. Optionally, you can change values for these parameters:
7272

7373
* ``compartment_id``: The OCID of the compartment to create a application. If it's not provided, the same compartment as your dataflow object is used.
7474
* ``driver_shape``: The driver shape used to create the application. The default value is ``"VM.Standard2.4"``.

docs/source/user_guide/operators/anomaly_detection_operator/use_cases.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ As a low-code extensible framework, operators enable a wide range of use cases.
1414
**Which Model is Right for You?**
1515

1616
* Autots is a very comprehensive framework for time series data, winning the M6 benchmark. Parameters can be sent directly to AutoTS' AnomalyDetector class through the ``model_kwargs`` section of the yaml file.
17-
* AutoMLX is a propreitary modeling framework developed by Oracle's Labs team and distributed through OCI Data Science. Parameters can be sent directly to AutoMLX's AnomalyDetector class through the ``model_kwargs`` section of the yaml file.
17+
* AutoMLX is a proprietary modeling framework developed by Oracle's Labs team and distributed through OCI Data Science. Parameters can be sent directly to AutoMLX's AnomalyDetector class through the ``model_kwargs`` section of the yaml file.
1818
* Together these 2 frameworks train and tune more than 25 models, and deliver the est results.
1919

2020

@@ -39,9 +39,9 @@ As a low-code extensible framework, operators enable a wide range of use cases.
3939

4040
**Feature Engineering**
4141

42-
* The Operator will perform most feature engineering on your behalf, such as infering holidays, day of week,
42+
* The Operator will perform most feature engineering on your behalf, such as inferring holidays, day of week,
4343

4444

4545
**Latency**
4646

47-
* The Operator is effectively a container distributed through the OCI Data Science platform. When deployed through Jobs or Model Deployment, customers can scale up the compute shape, memory size, and load balancer to make the prediciton progressively faster. Please consult an OCI Data Science Platform expert for more specifc advice.
47+
* The Operator is effectively a container distributed through the OCI Data Science platform. When deployed through Jobs or Model Deployment, customers can scale up the compute shape, memory size, and load balancer to make the prediction progressively faster. Please consult an OCI Data Science Platform expert for more specific advice.

docs/source/user_guide/quick_start/quick_start.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Quick Start
1010
* :doc:`Evaluate Trained Models<../model_training/model_evaluation/quick_start>`
1111
* :doc:`Register, Manage, and Deploy Models<../model_registration/quick_start>`
1212
* :doc:`Store and Retrieve your data source credentials<../secrets/quick_start>`
13-
* :doc:`Conect to existing OCI Big Data Service<../big_data_service/quick_start>`
13+
* :doc:`Connect to existing OCI Big Data Service<../big_data_service/quick_start>`
1414

0 commit comments

Comments
 (0)