oracle-ads 2.12.1__py3-none-any.whl → 2.12.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. ads/aqua/common/enums.py +9 -0
  2. ads/aqua/common/utils.py +83 -6
  3. ads/aqua/config/config.py +0 -15
  4. ads/aqua/constants.py +2 -0
  5. ads/aqua/extension/deployment_handler.py +2 -0
  6. ads/aqua/extension/finetune_handler.py +1 -2
  7. ads/aqua/extension/ui_handler.py +22 -3
  8. ads/aqua/finetuning/entities.py +5 -4
  9. ads/aqua/finetuning/finetuning.py +13 -8
  10. ads/aqua/model/constants.py +1 -0
  11. ads/aqua/model/entities.py +2 -0
  12. ads/aqua/model/model.py +223 -138
  13. ads/aqua/modeldeployment/deployment.py +106 -62
  14. ads/aqua/modeldeployment/entities.py +10 -2
  15. ads/aqua/ui.py +29 -16
  16. ads/config.py +3 -8
  17. ads/llm/deploy.py +6 -0
  18. ads/llm/guardrails/base.py +0 -1
  19. ads/llm/langchain/plugins/chat_models/oci_data_science.py +118 -41
  20. ads/llm/langchain/plugins/llms/oci_data_science_model_deployment_endpoint.py +18 -14
  21. ads/llm/templates/score_chain.jinja2 +0 -1
  22. ads/model/datascience_model.py +519 -16
  23. ads/model/deployment/model_deployment.py +13 -0
  24. ads/model/deployment/model_deployment_infrastructure.py +34 -0
  25. ads/model/generic_model.py +10 -0
  26. ads/model/model_properties.py +1 -0
  27. ads/model/service/oci_datascience_model.py +28 -0
  28. ads/opctl/operator/common/data/synthetic.csv +16001 -0
  29. ads/opctl/operator/lowcode/anomaly/MLoperator +1 -0
  30. ads/opctl/operator/lowcode/anomaly/const.py +66 -1
  31. ads/opctl/operator/lowcode/anomaly/model/anomaly_merlion.py +161 -0
  32. ads/opctl/operator/lowcode/anomaly/model/autots.py +30 -15
  33. ads/opctl/operator/lowcode/anomaly/model/factory.py +15 -3
  34. ads/opctl/operator/lowcode/anomaly/model/randomcutforest.py +1 -1
  35. ads/opctl/operator/lowcode/anomaly/schema.yaml +10 -0
  36. ads/opctl/operator/lowcode/anomaly/utils.py +3 -0
  37. {oracle_ads-2.12.1.dist-info → oracle_ads-2.12.3.dist-info}/METADATA +2 -1
  38. {oracle_ads-2.12.1.dist-info → oracle_ads-2.12.3.dist-info}/RECORD +41 -41
  39. ads/aqua/config/deployment_config_defaults.json +0 -37
  40. ads/aqua/config/resource_limit_names.json +0 -8
  41. {oracle_ads-2.12.1.dist-info → oracle_ads-2.12.3.dist-info}/LICENSE.txt +0 -0
  42. {oracle_ads-2.12.1.dist-info → oracle_ads-2.12.3.dist-info}/WHEEL +0 -0
  43. {oracle_ads-2.12.1.dist-info → oracle_ads-2.12.3.dist-info}/entry_points.txt +0 -0
ads/aqua/model/model.py CHANGED
@@ -14,13 +14,14 @@ from oci.data_science.models import JobRun, Model
14
14
 
15
15
  from ads.aqua import ODSC_MODEL_COMPARTMENT_OCID, logger
16
16
  from ads.aqua.app import AquaApp
17
- from ads.aqua.common.enums import Tags
17
+ from ads.aqua.common.enums import InferenceContainerTypeFamily, Tags
18
18
  from ads.aqua.common.errors import AquaRuntimeError, AquaValueError
19
19
  from ads.aqua.common.utils import (
20
20
  LifecycleStatus,
21
21
  _build_resource_identifier,
22
22
  copy_model_config,
23
23
  create_word_icon,
24
+ generate_tei_cmd_var,
24
25
  get_artifact_path,
25
26
  get_hf_model_info,
26
27
  list_os_files_with_extension,
@@ -67,7 +68,9 @@ from ads.common.auth import default_signer
67
68
  from ads.common.oci_resource import SEARCH_TYPE, OCIResource
68
69
  from ads.common.utils import get_console_link
69
70
  from ads.config import (
71
+ AQUA_DEPLOYMENT_CONTAINER_CMD_VAR_METADATA_NAME,
70
72
  AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME,
73
+ AQUA_DEPLOYMENT_CONTAINER_URI_METADATA_NAME,
71
74
  AQUA_EVALUATION_CONTAINER_METADATA_NAME,
72
75
  AQUA_FINETUNING_CONTAINER_METADATA_NAME,
73
76
  COMPARTMENT_OCID,
@@ -229,6 +232,12 @@ class AquaModelApp(AquaApp):
229
232
  ModelCustomMetadataFields.DEPLOYMENT_CONTAINER,
230
233
  ModelCustomMetadataItem(key=ModelCustomMetadataFields.DEPLOYMENT_CONTAINER),
231
234
  ).value
235
+ inference_container_uri = ds_model.custom_metadata_list.get(
236
+ ModelCustomMetadataFields.DEPLOYMENT_CONTAINER_URI,
237
+ ModelCustomMetadataItem(
238
+ key=ModelCustomMetadataFields.DEPLOYMENT_CONTAINER_URI
239
+ ),
240
+ ).value
232
241
  evaluation_container = ds_model.custom_metadata_list.get(
233
242
  ModelCustomMetadataFields.EVALUATION_CONTAINER,
234
243
  ModelCustomMetadataItem(key=ModelCustomMetadataFields.EVALUATION_CONTAINER),
@@ -247,6 +256,7 @@ class AquaModelApp(AquaApp):
247
256
  project_id=ds_model.project_id,
248
257
  model_card=model_card,
249
258
  inference_container=inference_container,
259
+ inference_container_uri=inference_container_uri,
250
260
  finetuning_container=finetuning_container,
251
261
  evaluation_container=evaluation_container,
252
262
  artifact_location=artifact_location,
@@ -629,6 +639,7 @@ class AquaModelApp(AquaApp):
629
639
  validation_result: ModelValidationResult,
630
640
  compartment_id: Optional[str],
631
641
  project_id: Optional[str],
642
+ inference_container_uri: Optional[str],
632
643
  ) -> DataScienceModel:
633
644
  """Create model by reference from the object storage path
634
645
 
@@ -640,6 +651,7 @@ class AquaModelApp(AquaApp):
640
651
  verified_model (DataScienceModel): If set, then copies all the tags and custom metadata information from the service verified model
641
652
  compartment_id (Optional[str]): Compartment Id of the compartment where the model has to be created
642
653
  project_id (Optional[str]): Project id of the project where the model has to be created
654
+ inference_container_uri (Optional[str]): Inference container uri for BYOC
643
655
 
644
656
  Returns:
645
657
  DataScienceModel: Returns Datascience model instance.
@@ -685,6 +697,40 @@ class AquaModelApp(AquaApp):
685
697
  raise AquaRuntimeError(
686
698
  f"Require Inference container information. Model: {model_name} does not have associated inference container defaults. Check docs for more information on how to pass inference container."
687
699
  )
700
+ metadata.add(
701
+ key=AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME,
702
+ value=inference_container,
703
+ description=f"Inference container mapping for {model_name}",
704
+ category="Other",
705
+ )
706
+ if inference_container_uri:
707
+ metadata.add(
708
+ key=AQUA_DEPLOYMENT_CONTAINER_URI_METADATA_NAME,
709
+ value=inference_container_uri,
710
+ description=f"Inference container URI for {model_name}",
711
+ category="Other",
712
+ )
713
+
714
+ inference_containers = (
715
+ AquaContainerConfig.from_container_index_json().inference
716
+ )
717
+ smc_container_set = {
718
+ container.family for container in inference_containers.values()
719
+ }
720
+ # only add cmd vars if inference container is not an SMC
721
+ if (
722
+ inference_container not in smc_container_set
723
+ and inference_container
724
+ == InferenceContainerTypeFamily.AQUA_TEI_CONTAINER_FAMILY
725
+ ):
726
+ cmd_vars = generate_tei_cmd_var(os_path)
727
+ metadata.add(
728
+ key=AQUA_DEPLOYMENT_CONTAINER_CMD_VAR_METADATA_NAME,
729
+ value=" ".join(cmd_vars),
730
+ description=f"Inference container cmd vars for {model_name}",
731
+ category="Other",
732
+ )
733
+
688
734
  if finetuning_container:
689
735
  tags[Tags.READY_TO_FINE_TUNE] = "true"
690
736
  metadata.add(
@@ -706,12 +752,6 @@ class AquaModelApp(AquaApp):
706
752
  category="Other",
707
753
  )
708
754
 
709
- metadata.add(
710
- key=AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME,
711
- value=inference_container,
712
- description=f"Inference container mapping for {model_name}",
713
- category="Other",
714
- )
715
755
  metadata.add(
716
756
  key=AQUA_EVALUATION_CONTAINER_METADATA_NAME,
717
757
  value="odsc-llm-evaluate",
@@ -933,139 +973,176 @@ class AquaModelApp(AquaApp):
933
973
  # now as we know that at least one type of model files exist, validate the content of oss path.
934
974
  # for safetensors, we check if config.json files exist, and for gguf format we check if files with
935
975
  # gguf extension exist.
936
- for model_format in model_formats:
976
+ if {ModelFormat.SAFETENSORS, ModelFormat.GGUF}.issubset(set(model_formats)):
937
977
  if (
938
- model_format == ModelFormat.SAFETENSORS
939
- and len(safetensors_model_files) > 0
978
+ import_model_details.inference_container.lower()
979
+ == InferenceContainerTypeFamily.AQUA_LLAMA_CPP_CONTAINER_FAMILY
940
980
  ):
941
- if import_model_details.download_from_hf:
942
- # validates config.json exists for safetensors model from hugginface
943
- if not hf_download_config_present:
944
- raise AquaRuntimeError(
945
- f"The model {model_name} does not contain {AQUA_MODEL_ARTIFACT_CONFIG} file as required "
946
- f"by {ModelFormat.SAFETENSORS.value} format model."
947
- f" Please check if the model name is correct in Hugging Face repository."
948
- )
949
- else:
950
- try:
951
- model_config = load_config(
952
- file_path=import_model_details.os_path,
953
- config_file_name=AQUA_MODEL_ARTIFACT_CONFIG,
954
- )
955
- except Exception as ex:
956
- logger.error(
957
- f"Exception occurred while loading config file from {import_model_details.os_path}"
958
- f"Exception message: {ex}"
959
- )
960
- raise AquaRuntimeError(
961
- f"The model path {import_model_details.os_path} does not contain the file config.json. "
962
- f"Please check if the path is correct or the model artifacts are available at this location."
963
- ) from ex
964
- else:
965
- try:
966
- metadata_model_type = (
967
- verified_model.custom_metadata_list.get(
968
- AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE
969
- ).value
970
- )
971
- if metadata_model_type:
972
- if (
973
- AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE
974
- in model_config
975
- ):
976
- if (
977
- model_config[
978
- AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE
979
- ]
980
- != metadata_model_type
981
- ):
982
- raise AquaRuntimeError(
983
- f"The {AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE} attribute in {AQUA_MODEL_ARTIFACT_CONFIG}"
984
- f" at {import_model_details.os_path} is invalid, expected {metadata_model_type} for "
985
- f"the model {model_name}. Please check if the path is correct or "
986
- f"the correct model artifacts are available at this location."
987
- f""
988
- )
989
- else:
990
- logger.debug(
991
- f"Could not find {AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE} attribute in "
992
- f"{AQUA_MODEL_ARTIFACT_CONFIG}. Proceeding with model registration."
993
- )
994
- except Exception:
995
- pass
996
- if verified_model:
997
- validation_result.telemetry_model_name = (
998
- verified_model.display_name
999
- )
1000
- elif (
1001
- model_config is not None
1002
- and AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME in model_config
1003
- ):
1004
- validation_result.telemetry_model_name = f"{AQUA_MODEL_TYPE_CUSTOM}_{model_config[AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME]}"
1005
- elif (
1006
- model_config is not None
1007
- and AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE in model_config
1008
- ):
1009
- validation_result.telemetry_model_name = f"{AQUA_MODEL_TYPE_CUSTOM}_{model_config[AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE]}"
981
+ self._validate_gguf_format(
982
+ import_model_details=import_model_details,
983
+ verified_model=verified_model,
984
+ gguf_model_files=gguf_model_files,
985
+ validation_result=validation_result,
986
+ model_name=model_name,
987
+ )
988
+ else:
989
+ self._validate_safetensor_format(
990
+ import_model_details=import_model_details,
991
+ verified_model=verified_model,
992
+ validation_result=validation_result,
993
+ hf_download_config_present=hf_download_config_present,
994
+ model_name=model_name,
995
+ )
996
+ elif ModelFormat.SAFETENSORS in model_formats:
997
+ self._validate_safetensor_format(
998
+ import_model_details=import_model_details,
999
+ verified_model=verified_model,
1000
+ validation_result=validation_result,
1001
+ hf_download_config_present=hf_download_config_present,
1002
+ model_name=model_name,
1003
+ )
1004
+ elif ModelFormat.GGUF in model_formats:
1005
+ self._validate_gguf_format(
1006
+ import_model_details=import_model_details,
1007
+ verified_model=verified_model,
1008
+ gguf_model_files=gguf_model_files,
1009
+ validation_result=validation_result,
1010
+ model_name=model_name,
1011
+ )
1012
+
1013
+ return validation_result
1014
+
1015
+ @staticmethod
1016
+ def _validate_safetensor_format(
1017
+ import_model_details: ImportModelDetails = None,
1018
+ verified_model: DataScienceModel = None,
1019
+ validation_result: ModelValidationResult = None,
1020
+ hf_download_config_present: bool = None,
1021
+ model_name: str = None,
1022
+ ):
1023
+ if import_model_details.download_from_hf:
1024
+ # validates config.json exists for safetensors model from hugginface
1025
+ if not hf_download_config_present:
1026
+ raise AquaRuntimeError(
1027
+ f"The model {model_name} does not contain {AQUA_MODEL_ARTIFACT_CONFIG} file as required "
1028
+ f"by {ModelFormat.SAFETENSORS.value} format model."
1029
+ f" Please check if the model name is correct in Hugging Face repository."
1030
+ )
1031
+ else:
1032
+ try:
1033
+ model_config = load_config(
1034
+ file_path=import_model_details.os_path,
1035
+ config_file_name=AQUA_MODEL_ARTIFACT_CONFIG,
1036
+ )
1037
+ except Exception as ex:
1038
+ logger.error(
1039
+ f"Exception occurred while loading config file from {import_model_details.os_path}"
1040
+ f"Exception message: {ex}"
1041
+ )
1042
+ raise AquaRuntimeError(
1043
+ f"The model path {import_model_details.os_path} does not contain the file config.json. "
1044
+ f"Please check if the path is correct or the model artifacts are available at this location."
1045
+ ) from ex
1046
+ else:
1047
+ try:
1048
+ metadata_model_type = verified_model.custom_metadata_list.get(
1049
+ AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE
1050
+ ).value
1051
+ if metadata_model_type:
1052
+ if AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE in model_config:
1053
+ if (
1054
+ model_config[AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE]
1055
+ != metadata_model_type
1056
+ ):
1057
+ raise AquaRuntimeError(
1058
+ f"The {AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE} attribute in {AQUA_MODEL_ARTIFACT_CONFIG}"
1059
+ f" at {import_model_details.os_path} is invalid, expected {metadata_model_type} for "
1060
+ f"the model {model_name}. Please check if the path is correct or "
1061
+ f"the correct model artifacts are available at this location."
1062
+ f""
1063
+ )
1010
1064
  else:
1011
- validation_result.telemetry_model_name = (
1012
- AQUA_MODEL_TYPE_CUSTOM
1065
+ logger.debug(
1066
+ f"Could not find {AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE} attribute in "
1067
+ f"{AQUA_MODEL_ARTIFACT_CONFIG}. Proceeding with model registration."
1013
1068
  )
1014
- elif model_format == ModelFormat.GGUF and len(gguf_model_files) > 0:
1015
- if import_model_details.finetuning_container and not safetensors_model_files:
1016
- raise AquaValueError(
1017
- "Fine-tuning is currently not supported with GGUF model format."
1018
- )
1019
- if verified_model:
1020
- try:
1021
- model_file = verified_model.custom_metadata_list.get(
1022
- AQUA_MODEL_ARTIFACT_FILE
1023
- ).value
1024
- except ValueError as err:
1025
- raise AquaRuntimeError(
1026
- f"The model {verified_model.display_name} does not contain the custom metadata {AQUA_MODEL_ARTIFACT_FILE}. "
1027
- f"Please check if the model has the valid metadata."
1028
- ) from err
1029
- else:
1030
- model_file = import_model_details.model_file
1031
-
1032
- model_files = gguf_model_files
1033
- # todo: have a separate error validation class for different type of error messages.
1034
- if model_file:
1035
- if model_file not in model_files:
1036
- raise AquaRuntimeError(
1037
- f"The model path {import_model_details.os_path} or the Hugging Face "
1038
- f"model repository for {model_name} does not contain the file "
1039
- f"{model_file}. Please check if the path is correct or the model "
1040
- f"artifacts are available at this location."
1041
- )
1042
- else:
1043
- validation_result.model_file = model_file
1044
- elif len(model_files) == 0:
1045
- raise AquaRuntimeError(
1046
- f"The model path {import_model_details.os_path} or the Hugging Face model "
1047
- f"repository for {model_name} does not contain any GGUF format files. "
1048
- f"Please check if the path is correct or the model artifacts are available "
1049
- f"at this location."
1050
- )
1051
- elif len(model_files) > 1:
1052
- raise AquaRuntimeError(
1053
- f"The model path {import_model_details.os_path} or the Hugging Face model "
1054
- f"repository for {model_name} contains multiple GGUF format files. "
1055
- f"Please specify the file that needs to be deployed using the model_file "
1056
- f"parameter."
1057
- )
1058
- else:
1059
- validation_result.model_file = model_files[0]
1060
-
1069
+ except Exception:
1070
+ pass
1061
1071
  if verified_model:
1062
1072
  validation_result.telemetry_model_name = verified_model.display_name
1063
- elif import_model_details.download_from_hf:
1064
- validation_result.telemetry_model_name = model_name
1073
+ elif (
1074
+ model_config is not None
1075
+ and AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME in model_config
1076
+ ):
1077
+ validation_result.telemetry_model_name = f"{AQUA_MODEL_TYPE_CUSTOM}_{model_config[AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME]}"
1078
+ elif (
1079
+ model_config is not None
1080
+ and AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE in model_config
1081
+ ):
1082
+ validation_result.telemetry_model_name = f"{AQUA_MODEL_TYPE_CUSTOM}_{model_config[AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE]}"
1065
1083
  else:
1066
1084
  validation_result.telemetry_model_name = AQUA_MODEL_TYPE_CUSTOM
1067
1085
 
1068
- return validation_result
1086
+ @staticmethod
1087
+ def _validate_gguf_format(
1088
+ import_model_details: ImportModelDetails = None,
1089
+ verified_model: DataScienceModel = None,
1090
+ gguf_model_files: List[str] = None,
1091
+ validation_result: ModelValidationResult = None,
1092
+ model_name: str = None,
1093
+ ):
1094
+ if import_model_details.finetuning_container:
1095
+ raise AquaValueError(
1096
+ "Fine-tuning is currently not supported with GGUF model format."
1097
+ )
1098
+ if verified_model:
1099
+ try:
1100
+ model_file = verified_model.custom_metadata_list.get(
1101
+ AQUA_MODEL_ARTIFACT_FILE
1102
+ ).value
1103
+ except ValueError as err:
1104
+ raise AquaRuntimeError(
1105
+ f"The model {verified_model.display_name} does not contain the custom metadata {AQUA_MODEL_ARTIFACT_FILE}. "
1106
+ f"Please check if the model has the valid metadata."
1107
+ ) from err
1108
+ else:
1109
+ model_file = import_model_details.model_file
1110
+
1111
+ model_files = gguf_model_files
1112
+ # todo: have a separate error validation class for different type of error messages.
1113
+ if model_file:
1114
+ if model_file not in model_files:
1115
+ raise AquaRuntimeError(
1116
+ f"The model path {import_model_details.os_path} or the Hugging Face "
1117
+ f"model repository for {model_name} does not contain the file "
1118
+ f"{model_file}. Please check if the path is correct or the model "
1119
+ f"artifacts are available at this location."
1120
+ )
1121
+ else:
1122
+ validation_result.model_file = model_file
1123
+ elif len(model_files) == 0:
1124
+ raise AquaRuntimeError(
1125
+ f"The model path {import_model_details.os_path} or the Hugging Face model "
1126
+ f"repository for {model_name} does not contain any GGUF format files. "
1127
+ f"Please check if the path is correct or the model artifacts are available "
1128
+ f"at this location."
1129
+ )
1130
+ elif len(model_files) > 1:
1131
+ raise AquaRuntimeError(
1132
+ f"The model path {import_model_details.os_path} or the Hugging Face model "
1133
+ f"repository for {model_name} contains multiple GGUF format files. "
1134
+ f"Please specify the file that needs to be deployed using the model_file "
1135
+ f"parameter."
1136
+ )
1137
+ else:
1138
+ validation_result.model_file = model_files[0]
1139
+
1140
+ if verified_model:
1141
+ validation_result.telemetry_model_name = verified_model.display_name
1142
+ elif import_model_details.download_from_hf:
1143
+ validation_result.telemetry_model_name = model_name
1144
+ else:
1145
+ validation_result.telemetry_model_name = AQUA_MODEL_TYPE_CUSTOM
1069
1146
 
1070
1147
  @staticmethod
1071
1148
  def _download_model_from_hf(
@@ -1193,21 +1270,28 @@ class AquaModelApp(AquaApp):
1193
1270
  validation_result=validation_result,
1194
1271
  compartment_id=import_model_details.compartment_id,
1195
1272
  project_id=import_model_details.project_id,
1273
+ inference_container_uri=import_model_details.inference_container_uri,
1196
1274
  )
1197
1275
  # registered model will always have inference and evaluation container, but
1198
1276
  # fine-tuning container may be not set
1199
1277
  inference_container = ds_model.custom_metadata_list.get(
1200
- ModelCustomMetadataFields.DEPLOYMENT_CONTAINER
1278
+ ModelCustomMetadataFields.DEPLOYMENT_CONTAINER,
1279
+ ModelCustomMetadataItem(key=ModelCustomMetadataFields.DEPLOYMENT_CONTAINER),
1280
+ ).value
1281
+ inference_container_uri = ds_model.custom_metadata_list.get(
1282
+ ModelCustomMetadataFields.DEPLOYMENT_CONTAINER_URI,
1283
+ ModelCustomMetadataItem(
1284
+ key=ModelCustomMetadataFields.DEPLOYMENT_CONTAINER_URI
1285
+ ),
1201
1286
  ).value
1202
1287
  evaluation_container = ds_model.custom_metadata_list.get(
1203
1288
  ModelCustomMetadataFields.EVALUATION_CONTAINER,
1289
+ ModelCustomMetadataItem(key=ModelCustomMetadataFields.EVALUATION_CONTAINER),
1290
+ ).value
1291
+ finetuning_container: str = ds_model.custom_metadata_list.get(
1292
+ ModelCustomMetadataFields.FINETUNE_CONTAINER,
1293
+ ModelCustomMetadataItem(key=ModelCustomMetadataFields.FINETUNE_CONTAINER),
1204
1294
  ).value
1205
- try:
1206
- finetuning_container = ds_model.custom_metadata_list.get(
1207
- ModelCustomMetadataFields.FINETUNE_CONTAINER,
1208
- ).value
1209
- except Exception:
1210
- finetuning_container = None
1211
1295
 
1212
1296
  aqua_model_attributes = dict(
1213
1297
  **self._process_model(ds_model, self.region),
@@ -1219,6 +1303,7 @@ class AquaModelApp(AquaApp):
1219
1303
  )
1220
1304
  ),
1221
1305
  inference_container=inference_container,
1306
+ inference_container_uri=inference_container_uri,
1222
1307
  finetuning_container=finetuning_container,
1223
1308
  evaluation_container=evaluation_container,
1224
1309
  artifact_location=artifact_path,