Skip to content

Commit

Permalink
[BugFix] Fix issue with metadata submission (#381)
Browse files Browse the repository at this point in the history
* [BugFix] Fix issue with metadata submission

* Fix
  • Loading branch information
gchhablani authored Aug 23, 2024
1 parent 9336bdc commit 97ea430
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions evalai/submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 97ea430

Please sign in to comment.