File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -364,8 +364,8 @@ def _build_ft_metrics(
364364 training_final ,
365365 ]
366366
367+ @staticmethod
367368 def to_aqua_model (
368- self ,
369369 model : Union [
370370 DataScienceModel ,
371371 oci .data_science .models .model .Model ,
@@ -375,7 +375,7 @@ def to_aqua_model(
375375 region : str ,
376376 ) -> AquaModel :
377377 """Converts a model to an Aqua model."""
378- return AquaModel (** self ._process_model (model , region ))
378+ return AquaModel (** AquaModelApp ._process_model (model , region ))
379379
380380 @staticmethod
381381 def _process_model (
Original file line number Diff line number Diff line change 2525 load_config ,
2626)
2727from ads .aqua .constants import (
28+ AQUA_MODEL_ARTIFACT_FILE ,
2829 AQUA_MODEL_TYPE_CUSTOM ,
2930 AQUA_MODEL_TYPE_SERVICE ,
3031 MODEL_BY_REFERENCE_OSS_PATH_KEY ,
3940 AquaDeploymentDetail ,
4041 ContainerSpec ,
4142)
43+ from ads .aqua .ui import ModelFormat
4244from ads .common .object_storage_details import ObjectStorageDetails
4345from ads .common .utils import get_log_links
4446from ads .config import (
@@ -310,6 +312,17 @@ def create(
310312 if isinstance (env , dict ):
311313 env_var .update (env )
312314
315+ if (
316+ AquaModelApp .to_aqua_model (
317+ model = aqua_model , region = self .region
318+ ).model_format
319+ == ModelFormat .GGUF
320+ ):
321+ model_file = aqua_model .custom_metadata_list .get (
322+ AQUA_MODEL_ARTIFACT_FILE
323+ ).value
324+ env_var .update ({"MODEL" : f"/opt/ds/model/deployed_model/{ model_file } " })
325+
313326 logging .info (f"Env vars used for deploying { aqua_model .id } :{ env_var } " )
314327
315328 # Start model deployment
You can’t perform that action at this time.
0 commit comments