Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Select benchmarks CLI option #1261

Merged
merged 8 commits into from
Oct 3, 2024
Merged

fix: Select benchmarks CLI option #1261

merged 8 commits into from
Oct 3, 2024

Conversation

isaac-chung
Copy link
Collaborator

@isaac-chung isaac-chung commented Sep 29, 2024

Address #1250 point 2.

  • Added test cases for a list of Benchmark objects passed into the task parameter
  • Added command line option to select Benchmarks

The following can now run. 1) script

from sentence_transformers import SentenceTransformer
import mteb

model_name = "average_word_embeddings_komninos"
model = SentenceTransformer(model_name)
benchmark = mteb.get_benchmarks(names=["MTEB(eng)"])
evaluation = mteb.MTEB(tasks=benchmark)
results = evaluation.run(model)

and command line:

mteb run -m average_word_embeddings_komninos -b 'MTEB(eng)'

Checklist

  • Run tests locally to make sure nothing is broken using make test.
  • Run the formatter to format the code using make lint.

@isaac-chung isaac-chung marked this pull request as draft September 29, 2024 20:16
@isaac-chung isaac-chung marked this pull request as ready for review September 29, 2024 20:37
Copy link
Contributor

@KennethEnevoldsen KennethEnevoldsen left a comment

Choose a reason for hiding this comment

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

only a few minor things.

mteb/evaluation/MTEB.py Outdated Show resolved Hide resolved
@isaac-chung
Copy link
Collaborator Author

Thanks! 🚀 Enabling auto-merge.

@isaac-chung isaac-chung enabled auto-merge (squash) October 3, 2024 21:40
@isaac-chung isaac-chung merged commit e717d6e into main Oct 3, 2024
9 checks passed
@isaac-chung isaac-chung deleted the select-benchmarks-cli branch October 3, 2024 21:44
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.

2 participants