File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,6 @@ class FineTuneCustomMetadata(str, metaclass=ExtendedEnumMeta):
15
15
SERVICE_MODEL_ARTIFACT_LOCATION = "artifact_location"
16
16
SERVICE_MODEL_DEPLOYMENT_CONTAINER = "deployment-container"
17
17
SERVICE_MODEL_FINE_TUNE_CONTAINER = "finetune-container"
18
+
19
+
20
+ ENV_AQUA_FINE_TUNING_CONTAINER = "AQUA_FINE_TUNING_CONTAINER"
Original file line number Diff line number Diff line change 31
31
UNKNOWN_DICT ,
32
32
)
33
33
from ads .aqua .data import AquaResourceIdentifier
34
- from ads .aqua .finetuning .constants import *
34
+ from ads .aqua .finetuning .constants import (
35
+ ENV_AQUA_FINE_TUNING_CONTAINER ,
36
+ FineTuneCustomMetadata ,
37
+ )
35
38
from ads .aqua .finetuning .entities import *
36
39
from ads .common .auth import default_signer
37
40
from ads .common .object_storage_details import ObjectStorageDetails
@@ -310,6 +313,15 @@ def create(
310
313
except Exception :
311
314
pass
312
315
316
+ if not is_custom_container and ENV_AQUA_FINE_TUNING_CONTAINER in os .environ :
317
+ ft_container = os .environ [ENV_AQUA_FINE_TUNING_CONTAINER ]
318
+ logger .info (
319
+ "Using container set by environment variable %s=%s" ,
320
+ ENV_AQUA_FINE_TUNING_CONTAINER ,
321
+ ft_container ,
322
+ )
323
+ is_custom_container = True
324
+
313
325
ft_parameters .batch_size = ft_parameters .batch_size or (
314
326
ft_config .get ("shape" , UNKNOWN_DICT )
315
327
.get (create_fine_tuning_details .shape_name , UNKNOWN_DICT )
@@ -559,7 +571,6 @@ def get_finetuning_config(self, model_id: str) -> Dict:
559
571
Dict:
560
572
A dict of allowed finetuning configs.
561
573
"""
562
-
563
574
config = self .get_config (model_id , AQUA_MODEL_FINETUNING_CONFIG )
564
575
if not config :
565
576
logger .debug (
You can’t perform that action at this time.
0 commit comments