dhruv-anand-aintech commited on
Commit
55f4cc7
1 Parent(s): 80f7cc0

Only allow 1 instance of a particular model name to be in the list.

Browse files

New cloned models of the toppers in the leaderboard will obviously continue appearing in the leaderboard as duplicates, since we are adding models in the skip list manually.

This method attempts to avoid that process for models named identically to the existing ones.

You might like to also check the creation date of a model and choose the earliest one with a specific date to display.

Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -827,12 +827,12 @@ def get_mteb_data(tasks=["Clustering"], langs=[], datasets=[], fillna=True, add_
827
  res["Sequence Length"] = EXTERNAL_MODEL_TO_SEQLEN.get(model, "")
828
  df_list.append(res)
829
 
 
830
  for model in models:
831
  if model.modelId in MODELS_TO_SKIP: continue
832
- print("MODEL", model)
833
- readme_path = hf_hub_download(model.modelId, filename="README.md")
834
- meta = metadata_load(readme_path)
835
- # meta['model-index'][0]["results"] is list of elements like:
836
  # {
837
  # "task": {"type": "Classification"},
838
  # "dataset": {
 
827
  res["Sequence Length"] = EXTERNAL_MODEL_TO_SEQLEN.get(model, "")
828
  df_list.append(res)
829
 
830
+ models_processed_names = []
831
  for model in models:
832
  if model.modelId in MODELS_TO_SKIP: continue
833
+ if model.modelId.split('/')[1] in models_processed_names: continue
834
+ models_processed_names.append(model.modelId.split('/')[1])
835
+ print("MODEL", model) # meta['model-index'][0]["results"] is list of elements like:
 
836
  # {
837
  # "task": {"type": "Classification"},
838
  # "dataset": {