Skip to content
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

Merged

Conversation

Harshit28j
Copy link
Contributor

No description provided.

Copy link
Collaborator

@gchhablani gchhablani left a 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?"):
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

Copy link
Contributor Author

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()
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@Harshit28j Harshit28j force-pushed the add_docker_based_meta_submission branch from d51eb04 to a652d0f Compare August 23, 2024 20:09
@Harshit28j Harshit28j force-pushed the add_docker_based_meta_submission branch from 34a1480 to 7142815 Compare August 23, 2024 21:05
@@ -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
Copy link
Collaborator

@gchhablani gchhablani Aug 23, 2024

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.

@@ -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
Copy link
Collaborator

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.

@gchhablani gchhablani merged commit 9336bdc into Cloud-CV:master Aug 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants