Repository navigation
Migrate MS MARCO examples to hf datasets - #3783
Merged
tomaarsen merged 5 commits intoJun 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the MS MARCO example scripts away from downloading/parsing raw MS MARCO tarballs/qrels and instead uses maintained Hugging Face datasets for qrels/queries (and a HF-hosted corpus for the SBERT dev evaluator).
Changes:
- Replace MS MARCO raw file downloads/parsing with
datasets.load_dataset()in the MS MARCO dev evaluation and multilingual query translation scripts. - Switch TREC-DL 2019 qrels loading to the
mteb/msmarcodataset while keeping the candidate top1000 download flow. - Simplify/modernize the scripts by removing tar/http download logic where no longer needed.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/sentence_transformer/training/ms_marco/eval_msmarco.py | Uses HF datasets for dev qrels + queries and a HF-hosted MS MARCO corpus to run IR evaluation. |
| examples/sentence_transformer/training/ms_marco/multilingual/translate_queries.py | Uses HF datasets for train qrels + queries to build the set of queries to translate. |
| examples/cross_encoder/training/ms_marco/eval_cross_encoder_trec_dl.py | Loads TREC-DL 2019 qrels from HF datasets; derives queries from the top1000 candidate file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Hello! Thank you, I did a slight cleanup, but this was already looking strong.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MS MARCO examples downloaded raw files from
msmarco.z22.web.core.windows.net(a 1GB tarballplus qrels/queries) and parsed them by hand. This replaces those raw downloads with the maintained
Hf datasets
Files
training/ms_marco/eval_msmarco.pytraining/ms_marco/multilingual/translate_queries.pytraining/ms_marco/eval_cross_encoder_trec_dl.pyData verification
collection.tsv; row countmatches exactly at 8,841,823).
queries; qrels are equivalent