qgallouedec HF Staff commited on
Commit
756edf1
·
1 Parent(s): 75cad04

fix model_info

Browse files
Files changed (1) hide show
  1. src/backend.py +3 -3
src/backend.py CHANGED
@@ -141,10 +141,10 @@ def _backend_routine():
141
  evaluated_models = [("/".join([x["user_id"], x["model_id"]]), x["sha"]) for x in dataset]
142
  pending_models = list(set(rl_models) - set(evaluated_models))
143
  pending_and_compatible_models = []
144
- for model in pending_models:
145
- filenames = [sib.rfilename for sib in model.siblings]
146
  if "agent.pt" in filenames:
147
- pending_and_compatible_models.append((model.modelId, model.sha))
148
 
149
  logger.info(f"Found {len(pending_and_compatible_models)} compatible pending models")
150
 
 
141
  evaluated_models = [("/".join([x["user_id"], x["model_id"]]), x["sha"]) for x in dataset]
142
  pending_models = list(set(rl_models) - set(evaluated_models))
143
  pending_and_compatible_models = []
144
+ for repo_id, sha in pending_models:
145
+ filenames = [sib.rfilename for sib in API.model_info(repo_id, revision=sha).siblings]
146
  if "agent.pt" in filenames:
147
+ pending_and_compatible_models.append((repo_id, sha))
148
 
149
  logger.info(f"Found {len(pending_and_compatible_models)} compatible pending models")
150