Skip to content

fix: load BelebeleRetrieval language configs - #4866

Merged
Samoed merged 2 commits into
embeddings-benchmark:mainfrom
wgu9:fix-belebele-retrieval-config-loading
Jun 30, 2026
Merged

Samoed merged 2 commits into
embeddings-benchmark:mainfrom
wgu9:fix-belebele-retrieval-config-loading

Conversation

@wgu9

@wgu9 wgu9 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #4865.

BelebeleRetrieval still attempted to load mteb/belebele without a config and then index language configs from the returned object. The migrated Hugging Face dataset requires an explicit language config such as eng_Latn, so the task failed during load_data() with ValueError: Config name is missing.

This PR loads only the language configs needed by the selected hf_subsets, caches each language once, and keeps the existing query/corpus/qrels construction unchanged.

Test Plan

  • uv run --group test pytest -q tests/test_tasks/test_load_data.py
  • uv run --group lint ruff check mteb/tasks/retrieval/multilingual/belebele_retrieval.py tests/test_tasks/test_load_data.py
  • uv run --group lint ruff format --check mteb/tasks/retrieval/multilingual/belebele_retrieval.py tests/test_tasks/test_load_data.py
  • Real dataset smoke test: mteb.get_task("BelebeleRetrieval", hf_subsets=["eng_Latn-eng_Latn"]).load_data() produced 900 queries, 488 corpus docs, and 900 qrels.

@wgu9
wgu9 force-pushed the fix-belebele-retrieval-config-loading branch from 8da5ea7 to d0b2c5d Compare June 29, 2026 19:17
@wgu9

wgu9 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the current failing checks appear to be Hugging Face Hub availability/rate-limit issues rather than failures from this change.

  • dataset-loading-check failed after 5 reruns with 429 Too Many Requests for https://huggingface.co/api/datasets/mteb/belebele/revision/979a211276faa22f671e69d096634193567cfd05.
  • test (ubuntu-latest, 3.12) failed on SciDocsRR with a 504 Gateway Time-out while listing mteb/SciDocsRR/tree/.../queries.

The same PR already had dataset-loading-check pass in the previous run, and the current run has build/lint/typecheck/test plus Python 3.10/3.11/3.13/3.14 and Windows 3.10 passing.

@Samoed Samoed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run and compared with original version from facebook/belebele and got same scores on random model

@Samoed
Samoed merged commit b820972 into embeddings-benchmark:main Jun 30, 2026
12 of 13 checks passed
@wgu9
wgu9 deleted the fix-belebele-retrieval-config-loading branch June 30, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BelebeleRetrieval is broken

2 participants