Abhishek Thakur
commited on
Commit
·
f63d039
1
Parent(s):
7dbcdbe
private test dataset
Browse files- competitions/create.py +1 -0
- competitions/evaluate.py +2 -1
- competitions/info.py +4 -0
- competitions/params.py +1 -0
- docs/source/competition_repo.mdx +3 -1
- docs/source/custom_metric.mdx +1 -0
competitions/create.py
CHANGED
@@ -163,6 +163,7 @@ def _create(
|
|
163 |
"SUBMISSION_ROWS": int(submission_rows),
|
164 |
"EVAL_METRIC": metric,
|
165 |
"LOGO": competition_logo,
|
|
|
166 |
}
|
167 |
teams_json = {}
|
168 |
user_team_json = {}
|
|
|
163 |
"SUBMISSION_ROWS": int(submission_rows),
|
164 |
"EVAL_METRIC": metric,
|
165 |
"LOGO": competition_logo,
|
166 |
+
"DATASET": "",
|
167 |
}
|
168 |
teams_json = {}
|
169 |
user_team_json = {}
|
competitions/evaluate.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
import shutil
|
5 |
import subprocess
|
6 |
|
7 |
-
from huggingface_hub import HfApi, snapshot_download
|
8 |
from loguru import logger
|
9 |
|
10 |
from competitions import utils
|
@@ -81,6 +81,7 @@ def run(params):
|
|
81 |
utils.update_submission_status(params, "processing")
|
82 |
|
83 |
if params.competition_type == "script":
|
|
|
84 |
generate_submission_file(params)
|
85 |
|
86 |
evaluation = compute_metrics(params)
|
|
|
4 |
import shutil
|
5 |
import subprocess
|
6 |
|
7 |
+
from huggingface_hub import HfApi, Repository, snapshot_download
|
8 |
from loguru import logger
|
9 |
|
10 |
from competitions import utils
|
|
|
81 |
utils.update_submission_status(params, "processing")
|
82 |
|
83 |
if params.competition_type == "script":
|
84 |
+
_ = Repository(local_dir="/tmp/data", clone_from=params.dataset)
|
85 |
generate_submission_file(params)
|
86 |
|
87 |
evaluation = compute_metrics(params)
|
competitions/info.py
CHANGED
@@ -129,3 +129,7 @@ class CompetitionInfo:
|
|
129 |
@property
|
130 |
def hardware(self):
|
131 |
return self.config["HARDWARE"]
|
|
|
|
|
|
|
|
|
|
129 |
@property
|
130 |
def hardware(self):
|
131 |
return self.config["HARDWARE"]
|
132 |
+
|
133 |
+
@property
|
134 |
+
def dataset(self):
|
135 |
+
return self.config.get("DATASET", "")
|
competitions/params.py
CHANGED
@@ -17,6 +17,7 @@ class EvalParams(BaseModel):
|
|
17 |
output_path: str
|
18 |
submission_repo: str
|
19 |
time_limit: int
|
|
|
20 |
|
21 |
class Config:
|
22 |
protected_namespaces = ()
|
|
|
17 |
output_path: str
|
18 |
submission_repo: str
|
19 |
time_limit: int
|
20 |
+
dataset: str
|
21 |
|
22 |
class Config:
|
23 |
protected_namespaces = ()
|
docs/source/competition_repo.mdx
CHANGED
@@ -47,7 +47,8 @@ conf.json is the configuration file for the competition. An example conf.json is
|
|
47 |
"SUBMISSION_COLUMNS":"id,pred",
|
48 |
"SUBMISSION_ROWS":10000,
|
49 |
"EVAL_METRIC":"roc_auc_score",
|
50 |
-
"LOGO":"https://github.com/abhishekkrthakur/public_images/blob/main/song.png?raw=true"
|
|
|
51 |
}
|
52 |
```
|
53 |
|
@@ -69,6 +70,7 @@ as it would require you to re-evaluate all the submissions.
|
|
69 |
- SUBMISSION_ROWS: This field is used to specify the number of rows in the submission file without the header.
|
70 |
- EVAL_METRIC: This field is used to specify the evaluation metric. We support all the scikit-learn metrics and even custom metrics.
|
71 |
- LOGO: This field is used to specify the logo of the competition. The logo must be a png file. The logo is shown on the all pages of the competition.
|
|
|
72 |
|
73 |
|
74 |
### solution.csv
|
|
|
47 |
"SUBMISSION_COLUMNS":"id,pred",
|
48 |
"SUBMISSION_ROWS":10000,
|
49 |
"EVAL_METRIC":"roc_auc_score",
|
50 |
+
"LOGO":"https://github.com/abhishekkrthakur/public_images/blob/main/song.png?raw=true",
|
51 |
+
"DATASET": ""
|
52 |
}
|
53 |
```
|
54 |
|
|
|
70 |
- SUBMISSION_ROWS: This field is used to specify the number of rows in the submission file without the header.
|
71 |
- EVAL_METRIC: This field is used to specify the evaluation metric. We support all the scikit-learn metrics and even custom metrics.
|
72 |
- LOGO: This field is used to specify the logo of the competition. The logo must be a png file. The logo is shown on the all pages of the competition.
|
73 |
+
- DATASET: This field is used to specify the PRIVATE dataset used in the competition. The dataset is available to the users only during the script run. This is only used for script competitions.
|
74 |
|
75 |
|
76 |
### solution.csv
|
docs/source/custom_metric.mdx
CHANGED
@@ -48,6 +48,7 @@ class EvalParams(BaseModel):
|
|
48 |
output_path: str
|
49 |
submission_repo: str
|
50 |
time_limit: int
|
|
|
51 |
```
|
52 |
|
53 |
You are free to do whatever you want to in the `compute` function.
|
|
|
48 |
output_path: str
|
49 |
submission_repo: str
|
50 |
time_limit: int
|
51 |
+
dataset: str # private test dataset, used only for script competitions
|
52 |
```
|
53 |
|
54 |
You are free to do whatever you want to in the `compute` function.
|