From 4ad0e30091693efa9bdd4e8efca7206b7f390ebe Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Mon, 9 Oct 2023 13:51:01 +0300 Subject: [PATCH] Fix --upload-files should wait until artifact is fully uploaded --- clearml_session/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clearml_session/__main__.py b/clearml_session/__main__.py index ecd5461..79a0d45 100644 --- a/clearml_session/__main__.py +++ b/clearml_session/__main__.py @@ -204,7 +204,13 @@ def create_base_task(state, project_name=None, task_name=None): # if we need to upload data now is the time if state.get("upload_files"): - task.upload_artifact(name="session-files", artifact_object=Path(state.get("upload_files")).expanduser()) + print("Uploading local files: {}".format(state.get("upload_files"))) + task.upload_artifact( + name="session-files", + artifact_object=Path(state.get("upload_files")).expanduser(), + wait_on_upload=True + ) + print("Local files upload completed") # only update the data at the end, so reload requests are smaller # noinspection PyProtectedMember