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(
364
364
training_final ,
365
365
]
366
366
367
+ @staticmethod
367
368
def to_aqua_model (
368
- self ,
369
369
model : Union [
370
370
DataScienceModel ,
371
371
oci .data_science .models .model .Model ,
@@ -375,7 +375,7 @@ def to_aqua_model(
375
375
region : str ,
376
376
) -> AquaModel :
377
377
"""Converts a model to an Aqua model."""
378
- return AquaModel (** self ._process_model (model , region ))
378
+ return AquaModel (** AquaModelApp ._process_model (model , region ))
379
379
380
380
@staticmethod
381
381
def _process_model (
Original file line number Diff line number Diff line change 25
25
load_config ,
26
26
)
27
27
from ads .aqua .constants import (
28
+ AQUA_MODEL_ARTIFACT_FILE ,
28
29
AQUA_MODEL_TYPE_CUSTOM ,
29
30
AQUA_MODEL_TYPE_SERVICE ,
30
31
MODEL_BY_REFERENCE_OSS_PATH_KEY ,
39
40
AquaDeploymentDetail ,
40
41
ContainerSpec ,
41
42
)
43
+ from ads .aqua .ui import ModelFormat
42
44
from ads .common .object_storage_details import ObjectStorageDetails
43
45
from ads .common .utils import get_log_links
44
46
from ads .config import (
@@ -310,6 +312,17 @@ def create(
310
312
if isinstance (env , dict ):
311
313
env_var .update (env )
312
314
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
+
313
326
logging .info (f"Env vars used for deploying { aqua_model .id } :{ env_var } " )
314
327
315
328
# Start model deployment
You can’t perform that action at this time.
0 commit comments