Download constants.py from ginkgo-datapoints/abdev-leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 3.33 kB
-
https://huggingface.co/spaces/ginkgo-datapoints/abdev-leaderboard/resolve/main/constants.py
- Command line
-
hf download hf://spaces/ginkgo-datapoints/abdev-leaderboard/constants.py
-
curl -L -o constants.py https://huggingface.co/spaces/ginkgo-datapoints/abdev-leaderboard/resolve/main/constants.py
3.33 kB
| """ | |
| Constants for the Antibody Developability Benchmark | |
| """ | |
| import os | |
| from huggingface_hub import HfApi | |
| import pandas as pd | |
| ASSAY_LIST = ["AC-SINS_pH7.4", "PR_CHO", "HIC", "Tm2", "Titer"] | |
| ASSAY_RENAME = { | |
| "AC-SINS_pH7.4": "Self-association", | |
| "PR_CHO": "Polyreactivity", | |
| "HIC": "Hydrophobicity", | |
| "Tm2": "Thermostability", | |
| "Titer": "Titer", | |
| } | |
| ASSAY_DESCRIPTION = { | |
| "AC-SINS_pH7.4": "Self association by AC-SINS at pH 7.4", | |
| "PR_CHO": "Polyreactivity by bead-based method against CHO SMP", | |
| "HIC": "Hydrophobicity by HIC", | |
| "Tm2": "Thermostability by nanoDSF", | |
| "Titer": "Titer by Valita", | |
| } | |
| ASSAY_EMOJIS = { | |
| "AC-SINS_pH7.4": "π§²", | |
| "PR_CHO": "π―", | |
| "HIC": "π§", | |
| "Tm2": "π‘οΈ", | |
| "Titer": "π§ͺ", | |
| } | |
| ASSAY_HIGHER_IS_BETTER = { | |
| "HIC": False, | |
| "Tm2": True, | |
| "Titer": True, | |
| "PR_CHO": False, | |
| "AC-SINS_pH7.4": False, | |
| } | |
| # Tabs with emojis | |
| ABOUT_TAB_NAME = "π About / Rules" | |
| FAQ_TAB_NAME = "β FAQs" | |
| SUBMIT_TAB_NAME = "βοΈ Submit" | |
| REGISTRATION_CODE = os.environ.get("REGISTRATION_CODE") | |
| TERMS_URL = "https://euphsfcyogalqiqsawbo.supabase.co/storage/v1/object/public/gdpweb/pdfs/2025%20Ginkgo%20Antibody%20Developability%20Prediction%20Competition%202025-08-28-v2.pdf" | |
| SLACK_URL = "https://join.slack.com/t/bitsinbio/shared_invite/zt-3dqigle2b-e0dEkfPPzzWL055j_8N_eQ" | |
| TUTORIAL_URL = "https://huggingface.co/blog/ginkgo-datapoints/making-antibody-embeddings-and-predictions" | |
| GITHUB_URL = "https://github.com/ginkgobioworks/abdev-benchmark" | |
| # Input CSV file requirements | |
| REQUIRED_COLUMNS: list[str] = [ | |
| "antibody_name", | |
| ] | |
| # Cross validation | |
| CV_COLUMN = "hierarchical_cluster_IgG_isotype_stratified_fold" | |
| # Sequence files | |
| SEQUENCES_FILE_DICT = { | |
| "GDPa1": "data/GDPa1_v1.2_sequences.csv", | |
| "GDPa1_cross_validation": "data/GDPa1_v1.2_sequences.csv", | |
| "Heldout Test Set": "data/heldout-set-sequences.csv", | |
| } | |
| # GDPa1 dataset | |
| GDPa1_path = "hf://datasets/ginkgo-datapoints/GDPa1/GDPa1_v1.2_20250814.csv" | |
| # Huggingface API | |
| TOKEN = os.environ.get("HF_TOKEN") | |
| CACHE_PATH = os.getenv("HF_HOME", ".") | |
| API = HfApi(token=TOKEN) | |
| # Huggingface repos | |
| ORGANIZATION = "ginkgo-datapoints" | |
| SUBMISSIONS_REPO = f"{ORGANIZATION}/abdev-bench-submissions" | |
| RESULTS_REPO = f"{ORGANIZATION}/abdev-bench-results" | |
| # Leaderboard dataframes | |
| LEADERBOARD_RESULTS_COLUMNS = [ | |
| "user", | |
| "assay", | |
| "spearman", | |
| "dataset", | |
| "model", | |
| "submission_time", | |
| ] # The columns expected from the results dataset | |
| LEADERBOARD_DISPLAY_COLUMNS = [ | |
| "user", | |
| "property", | |
| "spearman", | |
| "dataset", | |
| "model", | |
| "submission_time", | |
| ] # After changing assay to property (pretty formatting) | |
| LEADERBOARD_COLUMNS_RENAME = { | |
| "spearman": "Spearman Correlation", | |
| "dataset": "Dataset", | |
| "user": "User", | |
| "submission_time": "Submission Time", | |
| "model": "Model Name", | |
| "property": "Property", | |
| } | |
| BASELINE_USERNAMES = ["loodvanniekerkginkgo", "jmollerginkgobioworks", "sritter-ginkgobioworks"] | |
| def LEADERBOARD_COLUMNS_RENAME_LIST(columns: list[str]) -> list[str]: | |
| return list(map(lambda x: LEADERBOARD_COLUMNS_RENAME.get(x, x), columns)) | |
| # First deadline: 2025-10-14 23:59:59 EST | |
| FIRST_DEADLINE = pd.to_datetime("2025-10-14 23:59:59").tz_localize("US/Eastern") | |
| SECOND_DEADLINE = pd.to_datetime("2025-11-18 23:59:59").tz_localize("US/Eastern") |