Abhishek Thakur
commited on
Commit
·
2d208af
1
Parent(s):
a04edc8
add scoring_metric to creator
Browse files- competitions/app.py +1 -1
- competitions/create.py +1 -0
- competitions/info.py +2 -0
competitions/app.py
CHANGED
|
@@ -25,7 +25,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
| 25 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 26 |
COMPETITION_ID = os.getenv("COMPETITION_ID")
|
| 27 |
OUTPUT_PATH = os.getenv("OUTPUT_PATH", "/tmp/model")
|
| 28 |
-
START_DATE = os.getenv("START_DATE", "2000-12-
|
| 29 |
|
| 30 |
disable_progress_bars()
|
| 31 |
|
|
|
|
| 25 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 26 |
COMPETITION_ID = os.getenv("COMPETITION_ID")
|
| 27 |
OUTPUT_PATH = os.getenv("OUTPUT_PATH", "/tmp/model")
|
| 28 |
+
START_DATE = os.getenv("START_DATE", "2000-12-31")
|
| 29 |
|
| 30 |
disable_progress_bars()
|
| 31 |
|
competitions/create.py
CHANGED
|
@@ -165,6 +165,7 @@ def _create(
|
|
| 165 |
"LOGO": competition_logo,
|
| 166 |
"DATASET": "",
|
| 167 |
"SUBMISSION_FILENAMES": ["submission.csv"],
|
|
|
|
| 168 |
}
|
| 169 |
teams_json = {}
|
| 170 |
user_team_json = {}
|
|
|
|
| 165 |
"LOGO": competition_logo,
|
| 166 |
"DATASET": "",
|
| 167 |
"SUBMISSION_FILENAMES": ["submission.csv"],
|
| 168 |
+
"SCORING_METRIC": "",
|
| 169 |
}
|
| 170 |
teams_json = {}
|
| 171 |
user_team_json = {}
|
competitions/info.py
CHANGED
|
@@ -149,5 +149,7 @@ class CompetitionInfo:
|
|
| 149 |
if self.config["EVAL_METRIC"] == "custom":
|
| 150 |
if "SCORING_METRIC" not in self.config:
|
| 151 |
raise Exception("Please provide a single SCORING_METRIC in the competition config file: conf.json")
|
|
|
|
|
|
|
| 152 |
return self.config["SCORING_METRIC"]
|
| 153 |
return self.config["EVAL_METRIC"]
|
|
|
|
| 149 |
if self.config["EVAL_METRIC"] == "custom":
|
| 150 |
if "SCORING_METRIC" not in self.config:
|
| 151 |
raise Exception("Please provide a single SCORING_METRIC in the competition config file: conf.json")
|
| 152 |
+
if self.config["SCORING_METRIC"] is None:
|
| 153 |
+
raise Exception("Please provide a single SCORING_METRIC in the competition config file: conf.json")
|
| 154 |
return self.config["SCORING_METRIC"]
|
| 155 |
return self.config["EVAL_METRIC"]
|