oracle-ads 2.11.14__py3-none-any.whl → 2.11.16__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.
- ads/aqua/common/entities.py +17 -0
- ads/aqua/common/enums.py +5 -1
- ads/aqua/common/utils.py +109 -22
- ads/aqua/config/config.py +1 -1
- ads/aqua/config/deployment_config_defaults.json +29 -1
- ads/aqua/config/resource_limit_names.json +1 -0
- ads/aqua/constants.py +35 -18
- ads/aqua/evaluation/entities.py +0 -1
- ads/aqua/evaluation/evaluation.py +165 -121
- ads/aqua/extension/common_ws_msg_handler.py +57 -0
- ads/aqua/extension/deployment_handler.py +14 -13
- ads/aqua/extension/deployment_ws_msg_handler.py +54 -0
- ads/aqua/extension/errors.py +1 -1
- ads/aqua/extension/evaluation_handler.py +4 -7
- ads/aqua/extension/evaluation_ws_msg_handler.py +28 -10
- ads/aqua/extension/model_handler.py +31 -6
- ads/aqua/extension/models/ws_models.py +78 -3
- ads/aqua/extension/models_ws_msg_handler.py +49 -0
- ads/aqua/extension/ui_websocket_handler.py +7 -1
- ads/aqua/model/entities.py +17 -9
- ads/aqua/model/model.py +260 -90
- ads/aqua/modeldeployment/constants.py +0 -16
- ads/aqua/modeldeployment/deployment.py +97 -74
- ads/aqua/modeldeployment/entities.py +9 -20
- ads/aqua/ui.py +152 -28
- ads/common/object_storage_details.py +2 -5
- ads/common/serializer.py +2 -3
- ads/jobs/builders/infrastructure/dsc_job.py +29 -3
- ads/jobs/builders/infrastructure/dsc_job_runtime.py +74 -27
- ads/jobs/builders/runtimes/container_runtime.py +83 -4
- ads/opctl/operator/common/operator_config.py +1 -0
- ads/opctl/operator/lowcode/anomaly/README.md +3 -3
- ads/opctl/operator/lowcode/anomaly/__main__.py +5 -6
- ads/opctl/operator/lowcode/anomaly/const.py +9 -0
- ads/opctl/operator/lowcode/anomaly/model/anomaly_dataset.py +6 -2
- ads/opctl/operator/lowcode/anomaly/model/base_model.py +51 -26
- ads/opctl/operator/lowcode/anomaly/model/factory.py +41 -13
- ads/opctl/operator/lowcode/anomaly/model/isolationforest.py +79 -0
- ads/opctl/operator/lowcode/anomaly/model/oneclasssvm.py +79 -0
- ads/opctl/operator/lowcode/anomaly/operator_config.py +1 -0
- ads/opctl/operator/lowcode/anomaly/schema.yaml +16 -2
- ads/opctl/operator/lowcode/anomaly/utils.py +16 -13
- ads/opctl/operator/lowcode/common/data.py +2 -1
- ads/opctl/operator/lowcode/common/errors.py +6 -0
- ads/opctl/operator/lowcode/common/transformations.py +37 -9
- ads/opctl/operator/lowcode/common/utils.py +32 -10
- ads/opctl/operator/lowcode/forecast/model/base_model.py +21 -13
- ads/opctl/operator/lowcode/forecast/model/ml_forecast.py +14 -18
- ads/opctl/operator/lowcode/forecast/model_evaluator.py +15 -4
- ads/opctl/operator/lowcode/forecast/schema.yaml +9 -0
- ads/opctl/operator/lowcode/recommender/MLoperator +16 -0
- ads/opctl/operator/lowcode/recommender/README.md +206 -0
- ads/opctl/operator/lowcode/recommender/__init__.py +5 -0
- ads/opctl/operator/lowcode/recommender/__main__.py +82 -0
- ads/opctl/operator/lowcode/recommender/cmd.py +33 -0
- ads/opctl/operator/lowcode/recommender/constant.py +25 -0
- ads/opctl/operator/lowcode/recommender/environment.yaml +11 -0
- ads/opctl/operator/lowcode/recommender/model/base_model.py +198 -0
- ads/opctl/operator/lowcode/recommender/model/factory.py +58 -0
- ads/opctl/operator/lowcode/recommender/model/recommender_dataset.py +25 -0
- ads/opctl/operator/lowcode/recommender/model/svd.py +88 -0
- ads/opctl/operator/lowcode/recommender/operator_config.py +81 -0
- ads/opctl/operator/lowcode/recommender/schema.yaml +265 -0
- ads/opctl/operator/lowcode/recommender/utils.py +13 -0
- ads/pipeline/ads_pipeline_run.py +13 -2
- {oracle_ads-2.11.14.dist-info → oracle_ads-2.11.16.dist-info}/METADATA +6 -1
- {oracle_ads-2.11.14.dist-info → oracle_ads-2.11.16.dist-info}/RECORD +70 -50
- {oracle_ads-2.11.14.dist-info → oracle_ads-2.11.16.dist-info}/LICENSE.txt +0 -0
- {oracle_ads-2.11.14.dist-info → oracle_ads-2.11.16.dist-info}/WHEEL +0 -0
- {oracle_ads-2.11.14.dist-info → oracle_ads-2.11.16.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# Copyright (c) 2024 Oracle and/or its affiliates.
|
3
|
+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
4
|
+
|
5
|
+
|
6
|
+
class ContainerSpec:
|
7
|
+
"""
|
8
|
+
Class to hold to hold keys within the container spec.
|
9
|
+
"""
|
10
|
+
|
11
|
+
CONTAINER_SPEC = "containerSpec"
|
12
|
+
CLI_PARM = "cliParam"
|
13
|
+
SERVER_PORT = "serverPort"
|
14
|
+
HEALTH_CHECK_PORT = "healthCheckPort"
|
15
|
+
ENV_VARS = "envVars"
|
16
|
+
RESTRICTED_PARAMS = "restrictedParams"
|
17
|
+
EVALUATION_CONFIGURATION = "evaluationConfiguration"
|
ads/aqua/common/enums.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
2
|
# Copyright (c) 2024 Oracle and/or its affiliates.
|
4
3
|
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
5
4
|
|
@@ -8,6 +7,7 @@ aqua.common.enums
|
|
8
7
|
~~~~~~~~~~~~~~
|
9
8
|
This module contains the set of enums used in AQUA.
|
10
9
|
"""
|
10
|
+
|
11
11
|
from ads.common.extended_enum import ExtendedEnumMeta
|
12
12
|
|
13
13
|
|
@@ -38,21 +38,25 @@ class Tags(str, metaclass=ExtendedEnumMeta):
|
|
38
38
|
READY_TO_IMPORT = "ready_to_import"
|
39
39
|
BASE_MODEL_CUSTOM = "aqua_custom_base_model"
|
40
40
|
AQUA_EVALUATION_MODEL_ID = "evaluation_model_id"
|
41
|
+
MODEL_FORMAT = "model_format"
|
41
42
|
|
42
43
|
|
43
44
|
class InferenceContainerType(str, metaclass=ExtendedEnumMeta):
|
44
45
|
CONTAINER_TYPE_VLLM = "vllm"
|
45
46
|
CONTAINER_TYPE_TGI = "tgi"
|
47
|
+
CONTAINER_TYPE_LLAMA_CPP = "llama-cpp"
|
46
48
|
|
47
49
|
|
48
50
|
class InferenceContainerTypeFamily(str, metaclass=ExtendedEnumMeta):
|
49
51
|
AQUA_VLLM_CONTAINER_FAMILY = "odsc-vllm-serving"
|
50
52
|
AQUA_TGI_CONTAINER_FAMILY = "odsc-tgi-serving"
|
53
|
+
AQUA_LLAMA_CPP_CONTAINER_FAMILY = "odsc-llama-cpp-serving"
|
51
54
|
|
52
55
|
|
53
56
|
class InferenceContainerParamType(str, metaclass=ExtendedEnumMeta):
|
54
57
|
PARAM_TYPE_VLLM = "VLLM_PARAMS"
|
55
58
|
PARAM_TYPE_TGI = "TGI_PARAMS"
|
59
|
+
PARAM_TYPE_LLAMA_CPP = "LLAMA_CPP_PARAMS"
|
56
60
|
|
57
61
|
|
58
62
|
class HuggingFaceTags(str, metaclass=ExtendedEnumMeta):
|
ads/aqua/common/utils.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
2
|
# Copyright (c) 2024 Oracle and/or its affiliates.
|
4
3
|
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
5
4
|
"""AQUA utils and constants."""
|
5
|
+
|
6
6
|
import asyncio
|
7
7
|
import base64
|
8
8
|
import json
|
@@ -10,6 +10,7 @@ import logging
|
|
10
10
|
import os
|
11
11
|
import random
|
12
12
|
import re
|
13
|
+
from datetime import datetime, timedelta
|
13
14
|
from functools import wraps
|
14
15
|
from pathlib import Path
|
15
16
|
from string import Template
|
@@ -17,18 +18,36 @@ from typing import List, Union
|
|
17
18
|
|
18
19
|
import fsspec
|
19
20
|
import oci
|
21
|
+
from cachetools import TTLCache, cached
|
20
22
|
from oci.data_science.models import JobRun, Model
|
23
|
+
from oci.object_storage.models import ObjectSummary
|
21
24
|
|
22
|
-
from ads.aqua.common.enums import
|
25
|
+
from ads.aqua.common.enums import (
|
26
|
+
InferenceContainerParamType,
|
27
|
+
InferenceContainerType,
|
28
|
+
RqsAdditionalDetails,
|
29
|
+
)
|
23
30
|
from ads.aqua.common.errors import (
|
24
31
|
AquaFileNotFoundError,
|
25
32
|
AquaRuntimeError,
|
26
33
|
AquaValueError,
|
27
34
|
)
|
28
|
-
from ads.aqua.constants import
|
35
|
+
from ads.aqua.constants import (
|
36
|
+
AQUA_GA_LIST,
|
37
|
+
COMPARTMENT_MAPPING_KEY,
|
38
|
+
CONSOLE_LINK_RESOURCE_TYPE_MAPPING,
|
39
|
+
CONTAINER_INDEX,
|
40
|
+
MAXIMUM_ALLOWED_DATASET_IN_BYTE,
|
41
|
+
MODEL_BY_REFERENCE_OSS_PATH_KEY,
|
42
|
+
SERVICE_MANAGED_CONTAINER_URI_SCHEME,
|
43
|
+
SUPPORTED_FILE_FORMATS,
|
44
|
+
TGI_INFERENCE_RESTRICTED_PARAMS,
|
45
|
+
UNKNOWN,
|
46
|
+
UNKNOWN_JSON_STR,
|
47
|
+
VLLM_INFERENCE_RESTRICTED_PARAMS,
|
48
|
+
)
|
29
49
|
from ads.aqua.data import AquaResourceIdentifier
|
30
50
|
from ads.common.auth import default_signer
|
31
|
-
from ads.common.decorator.threaded import threaded
|
32
51
|
from ads.common.extended_enum import ExtendedEnumMeta
|
33
52
|
from ads.common.object_storage_details import ObjectStorageDetails
|
34
53
|
from ads.common.oci_resource import SEARCH_TYPE, OCIResource
|
@@ -74,15 +93,15 @@ class LifecycleStatus(str, metaclass=ExtendedEnumMeta):
|
|
74
93
|
|
75
94
|
status = LifecycleStatus.UNKNOWN
|
76
95
|
if evaluation_status == Model.LIFECYCLE_STATE_ACTIVE:
|
77
|
-
if
|
78
|
-
|
79
|
-
|
80
|
-
|
96
|
+
if job_run_status in {
|
97
|
+
JobRun.LIFECYCLE_STATE_IN_PROGRESS,
|
98
|
+
JobRun.LIFECYCLE_STATE_ACCEPTED,
|
99
|
+
}:
|
81
100
|
status = JobRun.LIFECYCLE_STATE_IN_PROGRESS
|
82
|
-
elif
|
83
|
-
|
84
|
-
|
85
|
-
|
101
|
+
elif job_run_status in {
|
102
|
+
JobRun.LIFECYCLE_STATE_FAILED,
|
103
|
+
JobRun.LIFECYCLE_STATE_NEEDS_ATTENTION,
|
104
|
+
}:
|
86
105
|
status = JobRun.LIFECYCLE_STATE_FAILED
|
87
106
|
else:
|
88
107
|
status = job_run_status
|
@@ -196,13 +215,9 @@ def read_file(file_path: str, **kwargs) -> str:
|
|
196
215
|
return UNKNOWN
|
197
216
|
|
198
217
|
|
199
|
-
@threaded()
|
200
218
|
def load_config(file_path: str, config_file_name: str, **kwargs) -> dict:
|
201
219
|
artifact_path = f"{file_path.rstrip('/')}/{config_file_name}"
|
202
|
-
if artifact_path.startswith("oci://")
|
203
|
-
signer = default_signer()
|
204
|
-
else:
|
205
|
-
signer = {}
|
220
|
+
signer = default_signer() if artifact_path.startswith("oci://") else {}
|
206
221
|
config = json.loads(
|
207
222
|
read_file(file_path=artifact_path, auth=signer, **kwargs) or UNKNOWN_JSON_STR
|
208
223
|
)
|
@@ -214,6 +229,32 @@ def load_config(file_path: str, config_file_name: str, **kwargs) -> dict:
|
|
214
229
|
return config
|
215
230
|
|
216
231
|
|
232
|
+
def list_os_files_with_extension(oss_path: str, extension: str) -> [str]:
|
233
|
+
"""
|
234
|
+
List files in the specified directory with the given extension.
|
235
|
+
|
236
|
+
Parameters:
|
237
|
+
- oss_path: The path to the directory where files are located.
|
238
|
+
- extension: The file extension to filter by (e.g., 'txt' for text files).
|
239
|
+
|
240
|
+
Returns:
|
241
|
+
- A list of file paths matching the specified extension.
|
242
|
+
"""
|
243
|
+
|
244
|
+
oss_client = ObjectStorageDetails.from_path(oss_path)
|
245
|
+
|
246
|
+
# Ensure the extension is prefixed with a dot if not already
|
247
|
+
if not extension.startswith("."):
|
248
|
+
extension = "." + extension
|
249
|
+
files: List[ObjectSummary] = oss_client.list_objects().objects
|
250
|
+
|
251
|
+
return [
|
252
|
+
file.name[len(oss_client.filepath) :].lstrip("/")
|
253
|
+
for file in files
|
254
|
+
if file.name.endswith(extension)
|
255
|
+
]
|
256
|
+
|
257
|
+
|
217
258
|
def is_valid_ocid(ocid: str) -> bool:
|
218
259
|
"""Checks if the given ocid is valid.
|
219
260
|
|
@@ -448,7 +489,7 @@ def _build_resource_identifier(
|
|
448
489
|
|
449
490
|
|
450
491
|
def _get_experiment_info(
|
451
|
-
model: Union[oci.resource_search.models.ResourceSummary, DataScienceModel]
|
492
|
+
model: Union[oci.resource_search.models.ResourceSummary, DataScienceModel],
|
452
493
|
) -> tuple:
|
453
494
|
"""Returns ocid and name of the experiment."""
|
454
495
|
return (
|
@@ -489,6 +530,7 @@ def container_config_path():
|
|
489
530
|
return f"oci://{AQUA_SERVICE_MODELS_BUCKET}@{CONDA_BUCKET_NS}/service_models/config"
|
490
531
|
|
491
532
|
|
533
|
+
@cached(cache=TTLCache(maxsize=1, ttl=timedelta(hours=5), timer=datetime.now))
|
492
534
|
def get_container_config():
|
493
535
|
config = load_config(
|
494
536
|
file_path=container_config_path(),
|
@@ -609,7 +651,7 @@ def extract_id_and_name_from_tag(tag: str):
|
|
609
651
|
base_model_name = UNKNOWN
|
610
652
|
try:
|
611
653
|
base_model_ocid, base_model_name = tag.split("#")
|
612
|
-
except:
|
654
|
+
except Exception:
|
613
655
|
pass
|
614
656
|
|
615
657
|
if not (is_valid_ocid(base_model_ocid) and base_model_name):
|
@@ -646,7 +688,7 @@ def get_resource_name(ocid: str) -> str:
|
|
646
688
|
try:
|
647
689
|
resource = query_resource(ocid, return_all=False)
|
648
690
|
name = resource.display_name if resource else UNKNOWN
|
649
|
-
except:
|
691
|
+
except Exception:
|
650
692
|
name = UNKNOWN
|
651
693
|
return name
|
652
694
|
|
@@ -670,8 +712,8 @@ def get_model_by_reference_paths(model_file_description: dict):
|
|
670
712
|
|
671
713
|
if not models:
|
672
714
|
raise AquaValueError(
|
673
|
-
|
674
|
-
|
715
|
+
"Model path is not available in the model json artifact. "
|
716
|
+
"Please check if the model created by reference has the correct artifact."
|
675
717
|
)
|
676
718
|
|
677
719
|
if len(models) > 0:
|
@@ -848,3 +890,48 @@ def copy_model_config(artifact_path: str, os_path: str, auth: dict = None):
|
|
848
890
|
except Exception as ex:
|
849
891
|
logger.debug(ex)
|
850
892
|
logger.debug(f"Failed to copy config folder from {artifact_path} to {os_path}.")
|
893
|
+
|
894
|
+
|
895
|
+
def get_container_params_type(container_type_name: str) -> str:
|
896
|
+
"""The utility function accepts the deployment container type name and returns the corresponding params name.
|
897
|
+
Parameters
|
898
|
+
----------
|
899
|
+
container_type_name: str
|
900
|
+
type of deployment container, like odsc-vllm-serving or odsc-tgi-serving.
|
901
|
+
|
902
|
+
Returns
|
903
|
+
-------
|
904
|
+
InferenceContainerParamType value
|
905
|
+
|
906
|
+
"""
|
907
|
+
# check substring instead of direct match in case container_type_name changes in the future
|
908
|
+
if InferenceContainerType.CONTAINER_TYPE_VLLM in container_type_name.lower():
|
909
|
+
return InferenceContainerParamType.PARAM_TYPE_VLLM
|
910
|
+
elif InferenceContainerType.CONTAINER_TYPE_TGI in container_type_name.lower():
|
911
|
+
return InferenceContainerParamType.PARAM_TYPE_TGI
|
912
|
+
elif InferenceContainerType.CONTAINER_TYPE_LLAMA_CPP in container_type_name.lower():
|
913
|
+
return InferenceContainerParamType.PARAM_TYPE_LLAMA_CPP
|
914
|
+
else:
|
915
|
+
return UNKNOWN
|
916
|
+
|
917
|
+
|
918
|
+
def get_restricted_params_by_container(container_type_name: str) -> set:
|
919
|
+
"""The utility function accepts the deployment container type name and returns a set of restricted params
|
920
|
+
for that container.
|
921
|
+
Parameters
|
922
|
+
----------
|
923
|
+
container_type_name: str
|
924
|
+
type of deployment container, like odsc-vllm-serving or odsc-tgi-serving.
|
925
|
+
|
926
|
+
Returns
|
927
|
+
-------
|
928
|
+
Set of restricted params based on container type
|
929
|
+
|
930
|
+
"""
|
931
|
+
# check substring instead of direct match in case container_type_name changes in the future
|
932
|
+
if InferenceContainerType.CONTAINER_TYPE_VLLM in container_type_name.lower():
|
933
|
+
return VLLM_INFERENCE_RESTRICTED_PARAMS
|
934
|
+
elif InferenceContainerType.CONTAINER_TYPE_TGI in container_type_name.lower():
|
935
|
+
return TGI_INFERENCE_RESTRICTED_PARAMS
|
936
|
+
else:
|
937
|
+
return set()
|
ads/aqua/config/config.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
2
|
# Copyright (c) 2024 Oracle and/or its affiliates.
|
4
3
|
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
5
4
|
|
@@ -14,5 +13,6 @@ def get_finetuning_config_defaults():
|
|
14
13
|
"BM.GPU.A10.4": {"batch_size": 1, "replica": 1},
|
15
14
|
"BM.GPU4.8": {"batch_size": 4, "replica": 1},
|
16
15
|
"BM.GPU.A100-v2.8": {"batch_size": 6, "replica": 1},
|
16
|
+
"BM.GPU.H100.8": {"batch_size": 6, "replica": 1},
|
17
17
|
}
|
18
18
|
}
|
@@ -1,9 +1,37 @@
|
|
1
1
|
{
|
2
|
+
"configuration": {
|
3
|
+
"VM.Standard.A1.Flex": {
|
4
|
+
"parameters": {},
|
5
|
+
"shape_info": {
|
6
|
+
"configs": [
|
7
|
+
{
|
8
|
+
"memory_in_gbs": 128,
|
9
|
+
"ocpu": 20
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"memory_in_gbs": 256,
|
13
|
+
"ocpu": 40
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"memory_in_gbs": 384,
|
17
|
+
"ocpu": 60
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"memory_in_gbs": 512,
|
21
|
+
"ocpu": 80
|
22
|
+
}
|
23
|
+
],
|
24
|
+
"type": "CPU"
|
25
|
+
}
|
26
|
+
}
|
27
|
+
},
|
2
28
|
"shape": [
|
3
29
|
"VM.GPU.A10.1",
|
4
30
|
"VM.GPU.A10.2",
|
5
31
|
"BM.GPU.A10.4",
|
6
32
|
"BM.GPU4.8",
|
7
|
-
"BM.GPU.A100-v2.8"
|
33
|
+
"BM.GPU.A100-v2.8",
|
34
|
+
"BM.GPU.H100.8",
|
35
|
+
"VM.Standard.A1.Flex"
|
8
36
|
]
|
9
37
|
}
|
ads/aqua/constants.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
2
|
# Copyright (c) 2024 Oracle and/or its affiliates.
|
4
3
|
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
|
5
4
|
"""This module defines constants used in ads.aqua module."""
|
@@ -22,7 +21,6 @@ DEFAULT_FT_BLOCK_STORAGE_SIZE = 750
|
|
22
21
|
DEFAULT_FT_REPLICA = 1
|
23
22
|
DEFAULT_FT_BATCH_SIZE = 1
|
24
23
|
DEFAULT_FT_VALIDATION_SET_SIZE = 0.1
|
25
|
-
|
26
24
|
MAXIMUM_ALLOWED_DATASET_IN_BYTE = 52428800 # 1024 x 1024 x 50 = 50MB
|
27
25
|
JOB_INFRASTRUCTURE_TYPE_DEFAULT_NETWORKING = "ME_STANDALONE"
|
28
26
|
NB_SESSION_IDENTIFIER = "NB_SESSION_OCID"
|
@@ -35,6 +33,7 @@ AQUA_MODEL_TYPE_CUSTOM = "custom"
|
|
35
33
|
AQUA_MODEL_ARTIFACT_CONFIG = "config.json"
|
36
34
|
AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME = "_name_or_path"
|
37
35
|
AQUA_MODEL_ARTIFACT_CONFIG_MODEL_TYPE = "model_type"
|
36
|
+
AQUA_MODEL_ARTIFACT_FILE = "model_file"
|
38
37
|
|
39
38
|
TRAINING_METRICS_FINAL = "training_metrics_final"
|
40
39
|
VALIDATION_METRICS_FINAL = "validation_metrics_final"
|
@@ -45,19 +44,37 @@ SERVICE_MANAGED_CONTAINER_URI_SCHEME = "dsmc://"
|
|
45
44
|
SUPPORTED_FILE_FORMATS = ["jsonl"]
|
46
45
|
MODEL_BY_REFERENCE_OSS_PATH_KEY = "artifact_location"
|
47
46
|
|
48
|
-
CONSOLE_LINK_RESOURCE_TYPE_MAPPING =
|
49
|
-
datasciencemodel
|
50
|
-
datasciencemodeldeployment
|
51
|
-
datasciencemodeldeploymentdev
|
52
|
-
datasciencemodeldeploymentint
|
53
|
-
datasciencemodeldeploymentpre
|
54
|
-
datasciencejob
|
55
|
-
datasciencejobrun
|
56
|
-
datasciencejobrundev
|
57
|
-
datasciencejobrunint
|
58
|
-
datasciencejobrunpre
|
59
|
-
datasciencemodelversionset
|
60
|
-
datasciencemodelversionsetpre
|
61
|
-
datasciencemodelversionsetint
|
62
|
-
datasciencemodelversionsetdev
|
63
|
-
|
47
|
+
CONSOLE_LINK_RESOURCE_TYPE_MAPPING = {
|
48
|
+
"datasciencemodel": "models",
|
49
|
+
"datasciencemodeldeployment": "model-deployments",
|
50
|
+
"datasciencemodeldeploymentdev": "model-deployments",
|
51
|
+
"datasciencemodeldeploymentint": "model-deployments",
|
52
|
+
"datasciencemodeldeploymentpre": "model-deployments",
|
53
|
+
"datasciencejob": "jobs",
|
54
|
+
"datasciencejobrun": "job-runs",
|
55
|
+
"datasciencejobrundev": "job-runs",
|
56
|
+
"datasciencejobrunint": "job-runs",
|
57
|
+
"datasciencejobrunpre": "job-runs",
|
58
|
+
"datasciencemodelversionset": "model-version-sets",
|
59
|
+
"datasciencemodelversionsetpre": "model-version-sets",
|
60
|
+
"datasciencemodelversionsetint": "model-version-sets",
|
61
|
+
"datasciencemodelversionsetdev": "model-version-sets",
|
62
|
+
}
|
63
|
+
|
64
|
+
VLLM_INFERENCE_RESTRICTED_PARAMS = {
|
65
|
+
"--port",
|
66
|
+
"--host",
|
67
|
+
"--served-model-name",
|
68
|
+
"--seed",
|
69
|
+
}
|
70
|
+
TGI_INFERENCE_RESTRICTED_PARAMS = {
|
71
|
+
"--port",
|
72
|
+
"--hostname",
|
73
|
+
"--num-shard",
|
74
|
+
"--sharded",
|
75
|
+
"--trust-remote-code",
|
76
|
+
}
|
77
|
+
LLAMA_CPP_INFERENCE_RESTRICTED_PARAMS = {
|
78
|
+
"--port",
|
79
|
+
"--host",
|
80
|
+
}
|