Maharshi Gor
Updated workflow APIs, code clean up and minor functions for hf pipeline support
f064c62
import os | |
from huggingface_hub import HfApi | |
# Info to change for your repository | |
# ---------------------------------- | |
TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org | |
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY") | |
ANTHROPIC_API_KEY = os.environ.get("ANTHROPIC_API_KEY") | |
COHERE_API_KEY = os.environ.get("COHERE_API_KEY") | |
# Change to your org - don't forget to create a results and request dataset, with the correct format! | |
OWNER = "qanta-challenge" | |
REPO_ID = f"{OWNER}/quizbowl-submission" | |
QUEUE_REPO = f"{OWNER}/advcal-requests" | |
RESULTS_REPO = f"{OWNER}/advcal-results" | |
LLM_CACHE_REPO = f"{OWNER}/advcal-llm-cache" | |
USERS_REPO = f"{OWNER}/registered-users" | |
EVAL_SPLITS = ["tiny_eval"] | |
# Important Links | |
QANTA_WEBSITE_URL = "https://sites.google.com/view/qanta/home" | |
COMPETITION_URL = "https://sites.google.com/view/qanta/2025-competition" | |
DOCS_REPO_URL = "https://github.com/qanta-challenge/QANTA25" | |
DOCS_URL = DOCS_REPO_URL + "/tree/main" | |
GITHUB_ISSUES_URL = DOCS_REPO_URL + "/issues" | |
CONTACT_EMAIL = "[email protected]" | |
DISCORD_URL = "https://discord.gg/ChmDVatJ6Y" | |
REGISTRATION_URL = "https://huggingface.co/spaces/qanta-challenge/register" | |
LEADERBOARD_URL = "https://huggingface.co/spaces/qanta-challenge/leaderboard" | |
EXAMPLES_PATH = "examples" | |
PLAYGROUND_DATASET_NAMES = { | |
"tossup": f"{OWNER}/acf-co24-tossups", | |
"bonus": f"{OWNER}/acf-co24-bonuses", | |
} | |
# ---------------------------------- | |
# If you setup a cache later, just change HF_HOME | |
CACHE_PATH = os.getenv("HF_HOME", ".") | |
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") | |
# Local caches | |
LLM_CACHE_PATH = os.path.join(CACHE_PATH, "llm-cache") | |
USERS_PATH = os.path.join(CACHE_PATH, "registered-users") | |
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") | |
LLM_CACHE_REFRESH_INTERVAL = 600 # seconds (30 minutes) | |
SERVER_RESTART_INTERVAL = 2 * 24 * 60 * 60 # seconds (2 days) | |
LEADERBOARD_REFRESH_INTERVAL = 600 # seconds (10 minutes) | |
API = HfApi(token=TOKEN) | |