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

Added requirements file to config zip and GUI view of requirements #3593

Merged
merged 10 commits into from
Sep 20, 2021

Conversation

vinceli1004
Copy link
Contributor

@vinceli1004 vinceli1004 commented Sep 8, 2021

This PR adds the ability to add a requirements.txt file for custom challenge package installation.

Approach:
The submission worker, upon extracting the challenge configuration zip, checks for a requirements.txt file and attempts to install its contents with a subprocess call. Any issues are logged.

An API was added to get the requirements given the challenge id, and this was used to display the requirements on a challenge's manage page.

Copy link
Member

@RishabhJain2018 RishabhJain2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinceli1004 Can you please add the description for the PR mainly what this PR adds and what is the approach for it.

@vinceli1004
Copy link
Contributor Author

@vinceli1004 Can you please add the description for the PR mainly what this PR adds and what is the approach for it.

Added!

apps/challenges/migrations/0086_challenge_requirements.py Outdated Show resolved Hide resolved
apps/challenges/migrations/0087_auto_20210811_0825.py Outdated Show resolved Hide resolved
apps/challenges/migrations/0088_auto_20210811_0833.py Outdated Show resolved Hide resolved
apps/challenges/migrations/0089_auto_20210811_0842.py Outdated Show resolved Hide resolved
apps/challenges/migrations/0090_auto_20210813_0245.py Outdated Show resolved Hide resolved
apps/challenges/models.py Outdated Show resolved Hide resolved
apps/challenges/views.py Outdated Show resolved Hide resolved
apps/challenges/views.py Outdated Show resolved Hide resolved
scripts/workers/submission_worker.py Outdated Show resolved Hide resolved
@vinceli1004 vinceli1004 changed the title Added requirements file to config zip and GUI view of reqwuirements Added requirements file to config zip and GUI view of requirements Sep 9, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2021

Codecov Report

Merging #3593 (39c13d7) into master (96968d6) will decrease coverage by 1.43%.
The diff coverage is 35.37%.

@@            Coverage Diff             @@
##           master    #3593      +/-   ##
==========================================
- Coverage   72.93%   71.49%   -1.44%     
==========================================
  Files          83       20      -63     
  Lines        5368     3235    -2133     
==========================================
- Hits         3915     2313    -1602     
+ Misses       1453      922     -531     
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 63.54% <34.61%> (-10.15%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 94.68% <50.00%> (ø)
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 31 more
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 63.54% <34.61%> (-10.15%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 94.68% <50.00%> (ø)
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c509e38...39c13d7. Read the comment docs.

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinceli1004 can we remove the API based on our discussion.

@@ -2603,6 +2603,60 @@ def get_challenge_phases_by_challenge_pk(request, challenge_pk):
return Response(response_data, status=status.HTTP_200_OK)


@api_view(["GET"])
@throttle_classes([AnonRateThrottle])
def get_challenge_requirements_by_challenge_pk(request, challenge_pk):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinceli1004 can we remove this API

@@ -151,6 +151,11 @@
views.get_challenge_phases_by_challenge_pk,
name="get_challenge_phases_by_challenge_pk",
),
url(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinceli1004 can we remove this API

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RishabhJain2018 RishabhJain2018 merged commit 8479e91 into Cloud-CV:master Sep 20, 2021
vaheta pushed a commit to vahetag/EvalAI that referenced this pull request Dec 10, 2024
…iew of requirements (Cloud-CV#3593)

* completed requirements task

* make default for requirements empty

* made requirements.txt part of the evaluation_script folder

* style changes

* responding to comments

* added fixes for missed comments

* removed unused variable

* frontend changes removed

* removed requirements api, clarified worker error message

Co-authored-by: Rishabh Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants