Abhishek Thakur
commited on
Commit
·
9e10e0f
1
Parent(s):
724c5d5
docs + script
Browse files- competitions/app.py +1 -1
- competitions/runner.py +1 -1
- competitions/templates/index.html +2 -2
- docs/source/leaderboard.mdx +14 -1
- docs/source/submit.mdx +24 -1
competitions/app.py
CHANGED
@@ -164,7 +164,7 @@ async def new_submission(
|
|
164 |
if COMP_INFO.competition_type == "generic":
|
165 |
resp = sub.new_submission(token, submission_file, submission_comment)
|
166 |
return {"response": f"Success! You have {resp} submissions remaining today."}
|
167 |
-
elif COMP_INFO.competition_type == "
|
168 |
resp = sub.new_submission(token, hub_model, submission_comment)
|
169 |
return {"response": f"Success! You have {resp} submissions remaining today."}
|
170 |
except AuthenticationError:
|
|
|
164 |
if COMP_INFO.competition_type == "generic":
|
165 |
resp = sub.new_submission(token, submission_file, submission_comment)
|
166 |
return {"response": f"Success! You have {resp} submissions remaining today."}
|
167 |
+
elif COMP_INFO.competition_type == "script":
|
168 |
resp = sub.new_submission(token, hub_model, submission_comment)
|
169 |
return {"response": f"Success! You have {resp} submissions remaining today."}
|
170 |
except AuthenticationError:
|
competitions/runner.py
CHANGED
@@ -175,7 +175,7 @@ class JobRunner:
|
|
175 |
continue
|
176 |
if self.competition_type == "generic":
|
177 |
self.run_local(pending_submissions)
|
178 |
-
elif self.competition_type == "
|
179 |
for _, row in pending_submissions.iterrows():
|
180 |
team_id = row["team_id"]
|
181 |
submission_id = row["submission_id"]
|
|
|
175 |
continue
|
176 |
if self.competition_type == "generic":
|
177 |
self.run_local(pending_submissions)
|
178 |
+
elif self.competition_type == "script":
|
179 |
for _, row in pending_submissions.iterrows():
|
180 |
team_id = row["team_id"]
|
181 |
submission_id = row["submission_id"]
|
competitions/templates/index.html
CHANGED
@@ -375,7 +375,7 @@
|
|
375 |
id="submission_file" type="file" name="submission_file">
|
376 |
</div>
|
377 |
{% endif %}
|
378 |
-
{% if competition_type == '
|
379 |
<div class="form-group">
|
380 |
<label for="hub_model" class="text-sm font-medium text-gray-700">Hub model
|
381 |
</label>
|
@@ -424,7 +424,7 @@
|
|
424 |
var submissionFile = document.getElementById('submission_file').files[0];
|
425 |
formData.append('submission_file', submissionFile);
|
426 |
formData.append('hub_model', 'None');
|
427 |
-
} else if (competitionType === '
|
428 |
var hubModel = document.getElementById('hub_model').value;
|
429 |
if (!hubModel) {
|
430 |
alert('Hub model is required.');
|
|
|
375 |
id="submission_file" type="file" name="submission_file">
|
376 |
</div>
|
377 |
{% endif %}
|
378 |
+
{% if competition_type == 'script' %}
|
379 |
<div class="form-group">
|
380 |
<label for="hub_model" class="text-sm font-medium text-gray-700">Hub model
|
381 |
</label>
|
|
|
424 |
var submissionFile = document.getElementById('submission_file').files[0];
|
425 |
formData.append('submission_file', submissionFile);
|
426 |
formData.append('hub_model', 'None');
|
427 |
+
} else if (competitionType === 'script') {
|
428 |
var hubModel = document.getElementById('hub_model').value;
|
429 |
if (!hubModel) {
|
430 |
alert('Hub model is required.');
|
docs/source/leaderboard.mdx
CHANGED
@@ -1 +1,14 @@
|
|
1 |
-
# Understanding the leaderboard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Understanding the leaderboard
|
2 |
+
|
3 |
+
There are two types of leaderboards for all competitions:
|
4 |
+
|
5 |
+
- Public Leaderboard: This leaderboard is calculated on X% of the test dataset, and is what you see on the competition page all the time.
|
6 |
+
The value of X will be mentioned in the problem statement by the organizers.
|
7 |
+
|
8 |
+
- Private Leaderboard: This leaderboard is calculated on the remaining (100-X)% of the test dataset, and is made public only after the competition is over.
|
9 |
+
Your final ranking is based on the private leaderboard.
|
10 |
+
|
11 |
+
When you make a submission, both the public and private leaderboard scores are calculated but only the public leaderboard score is displayed.
|
12 |
+
When a competition is over, the private leaderboard score is revealed and the final rankings are calculated based on that.
|
13 |
+
You can select N submissions to be considered for the private leaderboard score calculation.
|
14 |
+
The value of N will be mentioned in the problem statement by the organizers.
|
docs/source/submit.mdx
CHANGED
@@ -1 +1,24 @@
|
|
1 |
-
# Making a submission
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Making a submission
|
2 |
+
|
3 |
+
The submission format and example submissions are usually provided by the competition organizer.
|
4 |
+
This page describes how to make submissions using the competition UI.
|
5 |
+
|
6 |
+
To make a submission, you must provide a read-only token that allows the competition to access user info.
|
7 |
+
|
8 |
+
### `generic` competition: submitting a file
|
9 |
+
|
10 |
+
- provide your hugginface read-only token
|
11 |
+
- upload a file
|
12 |
+
- add a description
|
13 |
+
- click "Submit"
|
14 |
+
|
15 |
+

|
16 |
+
|
17 |
+
### `script` competition: submitting a model repo with `script.py`
|
18 |
+
|
19 |
+
- provide your hugginface read-only token
|
20 |
+
- provide a link to your model repo (e.g. abhishek/submission-model-1). The model repo must contain a `script.py` file that generates submission in the required format.
|
21 |
+
- add a description
|
22 |
+
- click "Submit"
|
23 |
+
|
24 |
+

|