Spaces:
Sleeping
Sleeping
Commit
·
c09202f
1
Parent(s):
ba9c430
handle gated models
Browse files- src/backend.py +8 -3
src/backend.py
CHANGED
@@ -160,10 +160,15 @@ def _backend_routine():
|
|
160 |
row = {"model_id": model_id, "user_id": user_id, "sha": sha}
|
161 |
|
162 |
# Run an evaluation on the models
|
163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
-
# Extract the environment IDs from the tags (usually only one)
|
166 |
-
env_ids = pattern_match(model_info.tags, ALL_ENV_IDS)
|
167 |
if len(env_ids) > 0:
|
168 |
env_id = env_ids[0]
|
169 |
logger.info(f"Running evaluation on {user_id}/{model_id}")
|
|
|
160 |
row = {"model_id": model_id, "user_id": user_id, "sha": sha}
|
161 |
|
162 |
# Run an evaluation on the models
|
163 |
+
try:
|
164 |
+
model_info = API.model_info(repo_id, revision=sha)
|
165 |
+
# Extract the environment IDs from the tags (usually only one)
|
166 |
+
env_ids = pattern_match(model_info.tags, ALL_ENV_IDS)
|
167 |
+
except Exception as e:
|
168 |
+
logger.error(f"Error fetching model info for {repo_id}: {e}")
|
169 |
+
logger.exception(e)
|
170 |
+
env_ids = []
|
171 |
|
|
|
|
|
172 |
if len(env_ids) > 0:
|
173 |
env_id = env_ids[0]
|
174 |
logger.info(f"Running evaluation on {user_id}/{model_id}")
|