Skip to content

Commit a37f287

Browse files
added str constants
1 parent 92974f2 commit a37f287

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ads/aqua/deployment.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
get_resource_name,
2424
get_model_by_reference_paths,
2525
get_ocid_substring,
26+
AQUA_MODEL_TYPE_SERVICE,
27+
AQUA_MODEL_TYPE_CUSTOM,
2628
)
2729
from ads.aqua.finetune import FineTuneCustomMetadata
2830
from ads.aqua.data import AquaResourceIdentifier
@@ -392,7 +394,9 @@ def create(
392394
.with_runtime(container_runtime)
393395
).deploy(wait_for_completion=False)
394396

395-
model_type = "custom" if is_fine_tuned_model else "service"
397+
model_type = (
398+
AQUA_MODEL_TYPE_CUSTOM if is_fine_tuned_model else AQUA_MODEL_TYPE_SERVICE
399+
)
396400
deployment_id = deployment.dsc_model_deployment.id
397401
# we arbitrarily choose last 8 characters of OCID to identify MD in telemetry
398402
telemetry_kwargs = {"ocid": get_ocid_substring(deployment_id, key_len=8)}

ads/aqua/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
READY_TO_DEPLOY_STATUS = "ACTIVE"
7474
READY_TO_FINE_TUNE_STATUS = "TRUE"
7575
AQUA_GA_LIST = ["id19sfcrra6z"]
76+
AQUA_MODEL_TYPE_SERVICE = "service"
77+
AQUA_MODEL_TYPE_CUSTOM = "custom"
7678

7779

7880
class LifecycleStatus(Enum):

0 commit comments

Comments
 (0)