File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3024,9 +3024,15 @@ def download_artifact(
3024
3024
The connection timeout in seconds for the client.
3025
3025
"""
3026
3026
3027
+ model_id = ocid .lower ()
3028
+ target_dir = (
3029
+ artifact_dir
3030
+ if not ObjectStorageDetails .is_oci_path (artifact_dir )
3031
+ else tempfile .mkdtemp ()
3032
+ )
3033
+
3027
3034
model_deployment = None
3028
3035
3029
- model_id = ocid .lower ()
3030
3036
if DataScienceModelType .MODEL_DEPLOYMENT in ocid :
3031
3037
model_deployment = ModelDeployment .from_id (ocid )
3032
3038
model_id = model_deployment .properties .model_id
@@ -3035,12 +3041,6 @@ def download_artifact(
3035
3041
f"Invalid OCID: { ocid } . Please provide valid model OCID or model deployment OCID."
3036
3042
)
3037
3043
3038
- target_dir = (
3039
- artifact_dir
3040
- if not ObjectStorageDetails .is_oci_path (artifact_dir )
3041
- else tempfile .mkdtemp ()
3042
- )
3043
-
3044
3044
dsc_model = DataScienceModel .from_id (model_id )
3045
3045
3046
3046
if not load_artifact :
You can’t perform that action at this time.
0 commit comments