From 97ea43010c7b89b57d75fa500ae58239e088b1b3 Mon Sep 17 00:00:00 2001 From: Gunjan Chhablani Date: Fri, 23 Aug 2024 19:02:51 -0400 Subject: [PATCH] [BugFix] Fix issue with metadata submission (#381) * [BugFix] Fix issue with metadata submission * Fix --- evalai/submissions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evalai/submissions.py b/evalai/submissions.py index ffe6bc2c..20bfacfc 100644 --- a/evalai/submissions.py +++ b/evalai/submissions.py @@ -265,8 +265,7 @@ def push(image, phase, url, public, private): submission_attribute_metadata.append(attribute_data) # After collecting submission_attribute_metadata - if submission_attribute_metadata: - submission_metadata["submission_meta_attributes"] = submission_attribute_metadata + submission_attribute_metadata = json.dumps(submission_attribute_metadata) if docker_image_size > max_docker_image_size: max_docker_image_size = convert_bytes_to(max_docker_image_size, "gb") @@ -349,7 +348,10 @@ def push(image, phase, url, public, private): json.dump(data, outfile) request_path = URLS.make_submission.value request_path = request_path.format(challenge_pk, phase_pk) - response = make_request(request_path, "POST", submission_file_path, data=submission_metadata) + submission_data = { + "submission_metadata": submission_attribute_metadata, + } + response = make_request(request_path, "POST", submission_file_path, data=dict(submission_data, **submission_metadata)) shutil.rmtree(BASE_TEMP_DIR) else: print(