-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* restructing the readme * removed double specification of versions and moved all setup to pyproject.toml * correctly use flat-layout for the package
- Loading branch information
1 parent
8a758bc
commit 769157b
Showing
17 changed files
with
424 additions
and
355 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,6 @@ dmypy.json | |
|
||
# error logs | ||
error_logs.txt | ||
|
||
# tests | ||
tests/results |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Adding a Model to the MTEB Leaderboard | ||
|
||
The MTEB Leaderboard is available [here](https://huggingface.co/spaces/mteb/leaderboard). To submit: | ||
|
||
1. Run on MTEB: You can reference [scripts/run_mteb_english.py](https://github.com/embeddings-benchmark/mteb/blob/main/scripts/run_mteb_english.py) for all MTEB English datasets used in the main ranking, or [scripts/run_mteb_chinese.py](https://github.com/embeddings-benchmark/mteb/blob/main/scripts/run_mteb_chinese.py) for the Chinese ones. | ||
Advanced scripts with different models are available in the [mteb/mtebscripts repo](https://github.com/embeddings-benchmark/mtebscripts). | ||
2. Format the json files into metadata using the script at `scripts/mteb_meta.py`. For example | ||
`python scripts/mteb_meta.py path_to_results_folder`, which will create a `mteb_metadata.md` file. If you ran CQADupstack retrieval, make sure to merge the results first with `python scripts/merge_cqadupstack.py path_to_results_folder`. | ||
3. Copy the content of the `mteb_metadata.md` file to the top of a `README.md` file of your model on the Hub. See [here](https://huggingface.co/Muennighoff/SGPT-5.8B-weightedmean-msmarco-specb-bitfit/blob/main/README.md) for an example. | ||
4. Hit the Refresh button at the bottom of the leaderboard and you should see your scores 🥇 | ||
5. To have the scores appear without refreshing, you can open an issue on the [Community Tab of the LB](https://huggingface.co/spaces/mteb/leaderboard/discussions) and someone will restart the space to cache your average scores. The cache is updated anyways ~1x/week. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Contributing to MTEB | ||
We welcome contributions such as new datasets to MTEB! This section describes how to set up the repository for development. | ||
|
||
### Development Installation | ||
If you want to submit a dataset or on other ways contribute to MTEB, you can install the package in development mode: | ||
|
||
```bash | ||
git clone https://github.com/embeddings-benchmark/mteb | ||
cd mteb | ||
|
||
# create your virtual environment and activate it | ||
make install | ||
``` | ||
|
||
### Running Tests | ||
To run the tests, you can use the following command: | ||
|
||
```bash | ||
make test | ||
# or if you want to run on multiple cores | ||
make test-parallel | ||
``` | ||
|
||
### Running linting | ||
To run the linting before a PR you can use the following command: | ||
|
||
```bash | ||
make lint | ||
``` |
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,125 @@ | ||
[build-system] | ||
requires = ["pbr>=5.7.0", "setuptools>=36.6.0"] | ||
build-backend = "pbr.build" | ||
requires = ["setuptools>=42", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mteb" | ||
version = "1.2.1.dev0" | ||
description = "Massive Text Embedding Benchmark" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "MTEB Contributors", email = "niklas@huggingface.co" }, | ||
{ email = "nouamane@huggingface.co" }, | ||
{ email = "info@nils-reimers.de" } | ||
] | ||
license = { file = "LICENSE" } | ||
keywords = ["deep learning", "text embeddings", "benchmark"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Information Technology", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python" | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"datasets>=2.2.0", | ||
"jsonlines", | ||
"numpy", | ||
"requests>=2.26.0", | ||
"scikit_learn>=1.0.2", | ||
"scipy", | ||
"sentence_transformers>=2.2.0", | ||
"torch", | ||
"tqdm", | ||
"rich", | ||
"pytrec_eval" | ||
] | ||
|
||
|
||
[project.urls] | ||
homepage = "https://github.com/embeddings-benchmark/mteb" | ||
"Huggingface Organization" = "https://huggingface.co/mteb" | ||
"Source Code" = "https://github.com/embeddings-benchmark/mteb" | ||
|
||
[project.scripts] | ||
mteb = "mteb.cmd:main" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"flake8", | ||
"Flake8-pyproject>=1.2.3", | ||
"isort", | ||
"black==24.2.0", | ||
"pytest", | ||
"pytest-xdist" | ||
] | ||
|
||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["tests", "results"] | ||
|
||
[tool.black] | ||
line-length = 119 | ||
target-version = ['py35'] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
profile = "black" | ||
default_section = "FIRSTPARTY" | ||
ensure_newline_before_comments = true | ||
force_grid_wrap = 0 | ||
include_trailing_comma = true | ||
known_first_party = "transformers" | ||
known_third_party = [ | ||
"absl", | ||
"conllu", | ||
"datasets", | ||
"elasticsearch", | ||
"fairseq", | ||
"faiss-cpu", | ||
"fastprogress", | ||
"fire", | ||
"fugashi", | ||
"git", | ||
"h5py", | ||
"matplotlib", | ||
"nltk", | ||
"numpy", | ||
"packaging", | ||
"pandas", | ||
"PIL", | ||
"psutil", | ||
"pytest", | ||
"pytorch_lightning", | ||
"rouge_score", | ||
"sacrebleu", | ||
"seqeval", | ||
"sklearn", | ||
"streamlit", | ||
"tensorboardX", | ||
"tensorflow", | ||
"tensorflow_datasets", | ||
"timeout_decorator", | ||
"torch", | ||
"torchaudio", | ||
"torchtext", | ||
"torchvision", | ||
"torch_xla", | ||
"tqdm", | ||
] | ||
line_length = 119 | ||
lines_after_imports = 2 | ||
multi_line_output = 3 | ||
use_parentheses = true | ||
|
||
[tool.flake8] | ||
ignore = [ | ||
"E203", | ||
"E501", | ||
"E741", | ||
"W503", | ||
"W605", | ||
] | ||
max-line-length = 119 |
Oops, something went wrong.