-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker based submission fix #379
Add docker based submission fix #379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor comments and questions.
Please fix asap.
@@ -126,6 +127,147 @@ def push(image, phase, url, public, private): | |||
max_docker_image_size = response.get("max_docker_image_size") | |||
|
|||
docker_image_size = docker_image.__dict__.get("attrs").get("VirtualSize") | |||
# Prompt for submission details | |||
if click.confirm("Do you want to include the Submission Details?"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this based on the submit method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
@@ -126,6 +127,147 @@ def push(image, phase, url, public, private): | |||
max_docker_image_size = response.get("max_docker_image_size") | |||
|
|||
docker_image_size = docker_image.__dict__.get("attrs").get("VirtualSize") | |||
# Prompt for submission details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment
|
||
# After collecting submission_attribute_metadata | ||
if submission_attribute_metadata: | ||
submission_metadata["submission_meta_attributes"] = submission_attribute_metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this submission metadata pushed to EvalAI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it on line 352. Nvm.
@@ -442,7 +442,7 @@ def pretty_print_challenge_phase_data(phase): | |||
|
|||
title = "{} {} {}".format(phase_title, challenge_id, phase_id) | |||
|
|||
cleaned_desc = BeautifulSoup(phase["description"], "lxml").text | |||
cleaned_desc = BeautifulSoup(phase["description"], "html.parser").text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we making this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried to run CLI and fetch the challenge by id, it showed a parsing error, so I used this to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it doesn't break any of the old functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gchhablani I think this lxml
, html.parser
is used to actually write fetched text in a cleaner way in terminal(CLI)
So I have tested this in my local environment by fetching challenge details etc
I don't see this breaking any functionality.
@@ -135,7 +135,7 @@ def clean_data(data): | |||
""" | |||
Strip HTML and clean spaces | |||
""" | |||
data = BeautifulSoup(data, "lxml").text.strip() | |||
data = BeautifulSoup(data, "html.parser").text.strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Fix Parsing error on CLI
d51eb04
to
a652d0f
Compare
34a1480
to
7142815
Compare
tests/test_submissions.py
Outdated
@@ -336,7 +335,6 @@ def test_make_submission_when_file_is_valid_with_metadata(self): | |||
input="Y\nTest\nTest\nTest\nTest\nY\nTest\nA\nalpha\nTrue\n", | |||
) | |||
assert result.exit_code == 0 | |||
assert result.output.strip() == expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remove this line.
tests/test_submissions.py
Outdated
@@ -293,7 +293,6 @@ def test_make_submission_when_file_is_valid_without_metadata(self): | |||
input="N\nN", | |||
) | |||
assert result.exit_code == 0 | |||
assert result.output.strip() == expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remove this line.
No description provided.