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(
30243024 The connection timeout in seconds for the client.
30253025 """
30263026
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+
30273034 model_deployment = None
30283035
3029- model_id = ocid .lower ()
30303036 if DataScienceModelType .MODEL_DEPLOYMENT in ocid :
30313037 model_deployment = ModelDeployment .from_id (ocid )
30323038 model_id = model_deployment .properties .model_id
@@ -3035,12 +3041,6 @@ def download_artifact(
30353041 f"Invalid OCID: { ocid } . Please provide valid model OCID or model deployment OCID."
30363042 )
30373043
3038- target_dir = (
3039- artifact_dir
3040- if not ObjectStorageDetails .is_oci_path (artifact_dir )
3041- else tempfile .mkdtemp ()
3042- )
3043-
30443044 dsc_model = DataScienceModel .from_id (model_id )
30453045
30463046 if not load_artifact :
You can’t perform that action at this time.
0 commit comments