File size: 1,297 Bytes
2a5f9fb
df66f6e
2a5f9fb
 
1ffc326
 
f982b8e
971bce4
 
 
 
 
 
 
 
f712ac1
 
1ffc326
2a5f9fb
971bce4
 
 
7bc82b8
971bce4
7bc82b8
971bce4
7bc82b8
2a5f9fb
971bce4
4ff9eef
395eff6
971bce4
395eff6
 
1ffc326
 
2a5f9fb
efeee6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os

from huggingface_hub import HfApi

# Info to change for your repository
# ----------------------------------

# A read/write user access token for a user in the org
# You can create these at https://huggingface.co/settings/tokens
# This must be set as a 'Secret' in the leaderboard Space settings.
TOKEN = os.environ.get("TOKEN")

# Change to your org name
OWNER = "Bias-Leaderboard"
DEVICE = "cuda:0" # "cpu" or "cuda:0" if you add compute
# !!!! None for actual evaluations. !!!!! Use a low val like 20 for debugging
LIMIT = None # 20
# ----------------------------------

# Define some input/output variables.
# Don't forget to create a results and requests Dataset for your org
# Leaderboard Space
REPO_ID = f"{OWNER}/leaderboard"
# Leaderboard input Dataset
QUEUE_REPO = f"{OWNER}/requests"
# Leaderboard output Dataset
RESULTS_REPO = f"{OWNER}/results"

# If you setup a cache, set HF_HOME.
CACHE_PATH=os.getenv("HF_HOME", ".")

# Local caches to read previously-submitted/computed results
EVAL_REQUESTS_PATH = os.path.join(CACHE_PATH, "eval-queue")
EVAL_RESULTS_PATH = os.path.join(CACHE_PATH, "eval-results")
EVAL_REQUESTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-queue-bk")
EVAL_RESULTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-results-bk")

API = HfApi(token=TOKEN)