Spaces:
Running
Running
Quentin Gallouédec
commited on
Commit
•
948a5b8
1
Parent(s):
c44db38
support gated models
Browse files- src/backend.py +8 -3
src/backend.py
CHANGED
@@ -537,10 +537,15 @@ def _backend_routine():
|
|
537 |
row = {"model_id": model_id, "user_id": user_id, "sha": sha}
|
538 |
|
539 |
# Run an evaluation on the models
|
540 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
|
542 |
-
# Extract the environment IDs from the tags (usually only one)
|
543 |
-
env_ids = pattern_match(model_info.tags, ALL_ENV_IDS)
|
544 |
if len(env_ids) > 0:
|
545 |
env = env_ids[0]
|
546 |
logger.info(f"Running evaluation on {user_id}/{model_id}")
|
|
|
537 |
row = {"model_id": model_id, "user_id": user_id, "sha": sha}
|
538 |
|
539 |
# Run an evaluation on the models
|
540 |
+
try:
|
541 |
+
model_info = API.model_info(repo_id, revision=sha)
|
542 |
+
# Extract the environment IDs from the tags (usually only one)
|
543 |
+
env_ids = pattern_match(model_info.tags, ALL_ENV_IDS)
|
544 |
+
except Exception as e:
|
545 |
+
logger.error(f"Error fetching model info for {repo_id}: {e}")
|
546 |
+
logger.exception(e)
|
547 |
+
env_ids = []
|
548 |
|
|
|
|
|
549 |
if len(env_ids) > 0:
|
550 |
env = env_ids[0]
|
551 |
logger.info(f"Running evaluation on {user_id}/{model_id}")
|