EvalAI icon indicating copy to clipboard operation
EvalAI copied to clipboard

Add Prize Money to Challenges

Open gchhablani opened this issue 1 year ago • 10 comments

Description

Currently it is difficult to find know which challenges have prizes, and if yes, what are the first/second/thrid prizes, etc. This feature will help us understand which challenges on EvalAI have prizes. The idea is to add a new prize money section here:

Screenshot 2023-03-21 at 2 09 51 AM

There are several components to be designed here:

  1. The idea is to create a new model ChallengePrizes with the following details:
- challenge_pk
- amount
- rank
  1. The challenge prizes will be a new section in the challenge configuration. Example:
prizes:
- rank: 1
   amount: "1000USD"
- rank: 2
   amount: "500USD"
  1. This will also require you to add changes to the challenge validation script to ensure people put appropriate values for prizes.
  2. Add a new attribute has_prizes in the Challenge model.
  3. You will also need to modify the create_or_update_github_challenge function to update the challenge and the entries.
  4. Display the prizes for the challenge if the challenge has prizes. This will require you to modify the frontend.

Pre-requisites/Learnings

This issue essentially requires background on a few things:

How to Approach

  • You can start by setting up EvalAI locally. Set up the dev version locally (preferred) using the steps here.
  • Add the new models, the new attribute to the backend.
  • Update the challenge configuration, the validation and the create/update method to handle this.
  • Play around with the the frontend, and create a PR. Please add screenshots of the changes.
  • Reach out to us regarding any issues that you face or if you need any help with understanding any of the above.

gchhablani avatar Mar 21 '23 06:03 gchhablani

Hi @gchhablani Please assign me this issue.

b9aurav avatar Mar 21 '23 06:03 b9aurav

@gchhablani What's difference between 'prize_amount' and 'amount' in model?

b9aurav avatar Mar 21 '23 10:03 b9aurav

@b9aurav My bad, they are the same thing.

gchhablani avatar Mar 21 '23 10:03 gchhablani

@gchhablani hey i would also like to work on this issue? can i start working on this as you have assigned this one already ?

ADITYA97-CODER avatar Mar 21 '23 10:03 ADITYA97-CODER

@ADITYA97-CODER Can you please take up one of the other issues?

gchhablani avatar Mar 21 '23 12:03 gchhablani

@gchhablani sure . Can you assign me "contacting host using a form issue" Also i am getting an error while setting up locally "failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed" Can you help?

ADITYA97-CODER avatar Mar 21 '23 12:03 ADITYA97-CODER

@gchhablani I've done my coding part, Now I am struggling in hosting a challenge locally to test it. According to docs, I tried "evalai_host_url": "https://staging.eval.ai" and "evalai_host_url": "127.0.0.1:8888". But failed.

Workflow error log for https://staging.eval.ai File "github/challenge_processing_script.py", line 74, in <module> response.raise_for_status() File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://staging.eval.ai/api/challenges/challenge/challenge_host_team/1/validate_challenge_config/

Workflow error log for '127.0.0.1:8888' Following errors occurred while validating the challenge config: HTTPConnectionPool(host='127.0.0.1', port=8888): Max retries exceeded with url: /api/challenges/challenge/challenge_host_team/1/validate_challenge_config/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9e197adb50>: Failed to establish a new connection: [Errno 111] Connection refused'))

I am guessing, there's another way to host challenge locally (For testing purpose).

b9aurav avatar Mar 23 '23 15:03 b9aurav

@gchhablani I've done my coding part, Now I am struggling in hosting a challenge locally to test it. According to docs, I tried "evalai_host_url": "https://staging.eval.ai" and "evalai_host_url": "127.0.0.1:8888". But failed.

Workflow error log for https://staging.eval.ai File "github/challenge_processing_script.py", line 74, in <module> response.raise_for_status() File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://staging.eval.ai/api/challenges/challenge/challenge_host_team/1/validate_challenge_config/

Workflow error log for '127.0.0.1:8888' Following errors occurred while validating the challenge config: HTTPConnectionPool(host='127.0.0.1', port=8888): Max retries exceeded with url: /api/challenges/challenge/challenge_host_team/1/validate_challenge_config/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9e197adb50>: Failed to establish a new connection: [Errno 111] Connection refused'))

I am guessing, there's another way to host challenge locally (For testing purpose).

@b9aurav I had the same problem and I fixed by creating a script to test the challenges locally you can refer to my pull request here It include script along with the documentation. It will solve your issue

AyushR1 avatar Mar 24 '23 06:03 AyushR1

@gchhablani I've done my coding part, Now I am struggling in hosting a challenge locally to test it. According to docs, I tried "evalai_host_url": "https://staging.eval.ai" and "evalai_host_url": "127.0.0.1:8888". But failed. Workflow error log for https://staging.eval.ai File "github/challenge_processing_script.py", line 74, in <module> response.raise_for_status() File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://staging.eval.ai/api/challenges/challenge/challenge_host_team/1/validate_challenge_config/ Workflow error log for '127.0.0.1:8888' Following errors occurred while validating the challenge config: HTTPConnectionPool(host='127.0.0.1', port=8888): Max retries exceeded with url: /api/challenges/challenge/challenge_host_team/1/validate_challenge_config/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9e197adb50>: Failed to establish a new connection: [Errno 111] Connection refused')) I am guessing, there's another way to host challenge locally (For testing purpose).

@b9aurav I had the same problem and I fixed by creating a script to test the challenges locally you can refer to my pull request here It include script along with the documentation. It will solve your issue

@AyushR1 Thanks, I'll definitely give it try

b9aurav avatar Mar 24 '23 07:03 b9aurav

@gchhablani It seems like my pull request #3906 build failed due to test case failure, Do I need to add test cases along with my other commits?

b9aurav avatar Mar 25 '23 17:03 b9aurav