Skip to content

Commit 2c4f7db

Browse files
committed
base name instead of cutting
1 parent 075db20 commit 2c4f7db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlflow_stagein.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def copy_model(connection_id, **context):
5151
sftp_client = ssh_hook.get_conn().open_sftp()
5252

5353
with open(ret, "rb") as sr:
54-
target_name = os.path.join(location, ret[len(temp_dir):])
54+
target_name = os.path.join(location, os.path.basename(ret))
5555
print(f"Uploading: {ret}-->{target_name}")
5656
if file_exist(sftp=sftp_client, name=target_name):
5757
print(target_name," exists. Overwritting.")

0 commit comments

Comments
 (0)