We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd4b52c commit 075db20Copy full SHA for 075db20
mlflow_stagein.py
@@ -47,6 +47,7 @@ def copy_model(connection_id, **context):
47
48
49
ssh_hook = get_connection(conn_id=connection_id, **context)
50
+ clt = ssh_hook.get_conn()
51
sftp_client = ssh_hook.get_conn().open_sftp()
52
53
with open(ret, "rb") as sr:
@@ -55,7 +56,7 @@ def copy_model(connection_id, **context):
55
56
if file_exist(sftp=sftp_client, name=target_name):
57
print(target_name," exists. Overwritting.")
58
- sftp_client.exec_command(command=f"touch {target_name}")
59
+ clt.exec_command(command=f"touch {target_name}")
60
with sftp_client.open(target_name, "wb") as tr:
61
tr.set_pipelined(pipelined=True)
62
copy_streams(inp=sr, outp=tr)
0 commit comments