Skip to content

Commit 5c339ff

Browse files
committed
Revert "Fix gguf deployment"t
This reverts commit 0709c17.
1 parent 0709c17 commit 5c339ff

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

ads/aqua/model/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ def _build_ft_metrics(
364364
training_final,
365365
]
366366

367-
@staticmethod
368367
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(**AquaModelApp._process_model(model, region))
378+
return AquaModel(**self._process_model(model, region))
379379

380380
@staticmethod
381381
def _process_model(

ads/aqua/modeldeployment/deployment.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
load_config,
2626
)
2727
from ads.aqua.constants import (
28-
AQUA_MODEL_ARTIFACT_FILE,
2928
AQUA_MODEL_TYPE_CUSTOM,
3029
AQUA_MODEL_TYPE_SERVICE,
3130
MODEL_BY_REFERENCE_OSS_PATH_KEY,
@@ -40,7 +39,6 @@
4039
AquaDeploymentDetail,
4140
ContainerSpec,
4241
)
43-
from ads.aqua.ui import ModelFormat
4442
from ads.common.object_storage_details import ObjectStorageDetails
4543
from ads.common.utils import get_log_links
4644
from ads.config import (
@@ -312,17 +310,6 @@ def create(
312310
if isinstance(env, dict):
313311
env_var.update(env)
314312

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-
326313
logging.info(f"Env vars used for deploying {aqua_model.id} :{env_var}")
327314

328315
# Start model deployment

ads/common/object_storage_details.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*--
23

34
# Copyright (c) 2021, 2024 Oracle and/or its affiliates.
45
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
56

67
import json
78
import os
89
import re
9-
from concurrent.futures import ThreadPoolExecutor, as_completed
1010
from dataclasses import dataclass
1111
from typing import Dict, List
1212
from urllib.parse import urlparse
1313

14+
1415
import oci
1516
from ads.common import auth as authutil
1617
from ads.common import oci_client
1718
from ads.dataset.progress import TqdmProgressBar
19+
from concurrent.futures import ThreadPoolExecutor, as_completed
1820

1921
THREAD_POOL_MAX_WORKERS = 10
2022

@@ -167,7 +169,8 @@ def is_bucket_versioned(self) -> bool:
167169

168170
def list_objects(self, **kwargs):
169171
"""Lists objects in a given oss path
170-
Parameters
172+
173+
Parameters
171174
-------
172175
**kwargs:
173176
namespace, bucket, filepath are set by the class. By default, fields gets all values. For other supported

0 commit comments

Comments
 (0)