Spaces:
Running
Running
inoki-giskard
commited on
Commit
•
a0a107f
1
Parent(s):
139ec5a
Add Giskard hub info
Browse files
text_classification_ui_helpers.py
CHANGED
@@ -24,6 +24,8 @@ MAX_FEATURES = 20
|
|
24 |
HF_REPO_ID = "HF_REPO_ID"
|
25 |
HF_SPACE_ID = "SPACE_ID"
|
26 |
HF_WRITE_TOKEN = "HF_WRITE_TOKEN"
|
|
|
|
|
27 |
|
28 |
|
29 |
def check_dataset_and_get_config(dataset_id):
|
@@ -245,6 +247,12 @@ def try_submit(m_id, d_id, config, split, local, uid):
|
|
245 |
"--leaderboard_dataset",
|
246 |
leaderboard_dataset,
|
247 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
|
250 |
logging.info(f"Start local evaluation on {eval_str}")
|
|
|
24 |
HF_REPO_ID = "HF_REPO_ID"
|
25 |
HF_SPACE_ID = "SPACE_ID"
|
26 |
HF_WRITE_TOKEN = "HF_WRITE_TOKEN"
|
27 |
+
HF_GSK_HUB_KEY = "GSK_HUB_KEY"
|
28 |
+
HF_GSK_HUB_UNLOCK_TOKEN = "GSK_HUB_UNLOCK_TOKEN"
|
29 |
|
30 |
|
31 |
def check_dataset_and_get_config(dataset_id):
|
|
|
247 |
"--leaderboard_dataset",
|
248 |
leaderboard_dataset,
|
249 |
]
|
250 |
+
if os.environ.get(HF_GSK_HUB_KEY):
|
251 |
+
command.append("--giskard_hub_api_key")
|
252 |
+
command.append(os.environ.get(HF_GSK_HUB_KEY))
|
253 |
+
if os.environ.get(HF_GSK_HUB_UNLOCK_TOKEN):
|
254 |
+
command.append("--giskard_hub_unlock_token")
|
255 |
+
command.append(os.environ.get(HF_GSK_HUB_UNLOCK_TOKEN))
|
256 |
|
257 |
eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
|
258 |
logging.info(f"Start local evaluation on {eval_str}")
|