Spaces:
Runtime error
Runtime error
Add retrain_space_id to BaseConfig and update config validation
Browse files- configs.py +5 -2
configs.py
CHANGED
|
@@ -30,6 +30,7 @@ class BaseConfig:
|
|
| 30 |
hub_model_id: str = os.getenv("HUB_MODEL_ID", None)
|
| 31 |
api_endpoint: str = os.getenv("API_ENDPOINT", None)
|
| 32 |
space_repo_id: str = os.getenv("SPACE_REPO_ID", None)
|
|
|
|
| 33 |
|
| 34 |
# Weights & Biases
|
| 35 |
wandb_api_key: str = os.getenv("WANDB_API_KEY", None)
|
|
@@ -81,7 +82,8 @@ def get_config() -> BaseConfig:
|
|
| 81 |
"hub_model_id",
|
| 82 |
"api_endpoint",
|
| 83 |
"space_repo_id",
|
| 84 |
-
"wandb_api_key"
|
|
|
|
| 85 |
]
|
| 86 |
elif label == "urgency":
|
| 87 |
config = UrgencyConfig()
|
|
@@ -91,7 +93,8 @@ def get_config() -> BaseConfig:
|
|
| 91 |
"hub_model_id",
|
| 92 |
"api_endpoint",
|
| 93 |
"space_repo_id",
|
| 94 |
-
"wandb_api_key"
|
|
|
|
| 95 |
]
|
| 96 |
else:
|
| 97 |
raise ValueError(f"Unsupported LABEL '{label}' in environment variables.")
|
|
|
|
| 30 |
hub_model_id: str = os.getenv("HUB_MODEL_ID", None)
|
| 31 |
api_endpoint: str = os.getenv("API_ENDPOINT", None)
|
| 32 |
space_repo_id: str = os.getenv("SPACE_REPO_ID", None)
|
| 33 |
+
retrain_space_id: str= os.getenv("RETRAIN_SPACE_ID", None)
|
| 34 |
|
| 35 |
# Weights & Biases
|
| 36 |
wandb_api_key: str = os.getenv("WANDB_API_KEY", None)
|
|
|
|
| 82 |
"hub_model_id",
|
| 83 |
"api_endpoint",
|
| 84 |
"space_repo_id",
|
| 85 |
+
"wandb_api_key",
|
| 86 |
+
"retrain_space_id"
|
| 87 |
]
|
| 88 |
elif label == "urgency":
|
| 89 |
config = UrgencyConfig()
|
|
|
|
| 93 |
"hub_model_id",
|
| 94 |
"api_endpoint",
|
| 95 |
"space_repo_id",
|
| 96 |
+
"wandb_api_key",
|
| 97 |
+
"retrain_space_id"
|
| 98 |
]
|
| 99 |
else:
|
| 100 |
raise ValueError(f"Unsupported LABEL '{label}' in environment variables.")
|