Skip to content

Commit f7e7c2e

Browse files
committed
Fixes GPU allocation validation
1 parent d0bdf70 commit f7e7c2e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

ads/aqua/modeldeployment/entities.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,15 @@ def validate_multimodel_deployment_feasibility(
522522

523523
for model in self.models:
524524
sum_model_gpus += model.gpu_count
525-
526525
aqua_deployment_config = model_deployment_config[model.model_id]
527526

528-
if selected_shape not in aqua_deployment_config.shape:
527+
# We cannot rely on .shape because some models, like Falcon-7B, can only be deployed on a single GPU card (A10.1).
528+
# However, Falcon can also be deployed on a single card in other A10 shapes, such as A10.2.
529+
# Our current configuration does not support this flexibility.
530+
# multi_deployment_shape = aqua_deployment_config.shape
531+
multi_deployment_shape = list(aqua_deployment_config.configuration.keys())
532+
533+
if selected_shape not in multi_deployment_shape:
529534
logger.error(
530535
f"Model with OCID {model.model_id} in the model group is not compatible with the selected instance shape: {selected_shape}"
531536
)

ads/aqua/modeldeployment/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ def _extract_model_shape_gpu(
142142
deployment = {}
143143

144144
for model_id, config in deployment_configs.items():
145+
# We cannot rely on .shape because some models, like Falcon-7B, can only be deployed on a single GPU card (A10.1).
146+
# However, Falcon can also be deployed on a single card in other A10 shapes, such as A10.2.
147+
# Our current configuration does not support this flexibility.
148+
# multi_deployment_shape = config.shape
145149
multi_deployment_shape = list(config.configuration.keys())
146150
model_shape_gpu[model_id] = {
147151
shape: [

0 commit comments

Comments
 (0)