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: Add ModelMeta license & custom validations #2293

Merged
merged 5 commits into from
Mar 9, 2025
Merged

Conversation

Samoed
Copy link
Collaborator

@Samoed Samoed commented Mar 8, 2025

Fixes #2286

  • validate license in ModelMeta
  • move LICENSES, STR_DATE, STR_URL into custom validators

Code Quality

  • Code Formatted: Format the code using make lint to maintain consistent style.

Documentation

  • Updated Documentation: Add or update documentation to reflect the changes introduced in this PR.

Testing

  • New Tests Added: Write tests to cover new functionality. Validate with make test-with-coverage.
  • Tests Passed: Run tests locally using make test or make test-with-coverage to ensure no existing functionality is broken.

@Samoed Samoed requested a review from isaac-chung March 8, 2025 16:53
Copy link
Collaborator

@isaac-chung isaac-chung left a comment

Choose a reason for hiding this comment

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

💪 Just a small non-blocking question.

@isaac-chung
Copy link
Collaborator

This might break the leaderboard:

from ..modalities import MODALITIES

@isaac-chung
Copy link
Collaborator

I'd just do a quick search for where MODALITIES and other moved fields are imported so they don't break, e.g.

from mteb.abstasks.TaskMetadata import MODALITIES, TASK_DOMAIN, TASK_TYPE

@isaac-chung isaac-chung changed the title Add ModelMeta license validation fix: Add ModelMeta license & custom validations Mar 9, 2025
@@ -104,7 +103,7 @@ class ModelMeta(BaseModel):
memory_usage_mb: float | None
max_tokens: float | None
embed_dim: int | None
license: str | None
license: LICENSES | STR_URL | None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

@isaac-chung isaac-chung merged commit 5dce601 into main Mar 9, 2025
10 checks passed
@isaac-chung isaac-chung deleted the licence_validation branch March 9, 2025 15:48
Samoed added a commit that referenced this pull request Mar 11, 2025
* 1.36.11

Automatically generated by python-semantic-release

* fix: Added Filter Modality (#2262)

* Added Filter Modality

* resolve suggestions

* make lint

* make sure test pass

* make lint

* added exclusive_modality_filter and unit tests

* Integrate tests on overview.py

* Update tests/test_overview.py

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>

* added task related to image modality

* Update mteb/abstasks/AbsTask.py

Co-authored-by: Kenneth Enevoldsen <kennethcenevoldsen@gmail.com>

* Update mteb/abstasks/AbsTask.py

Co-authored-by: Kenneth Enevoldsen <kennethcenevoldsen@gmail.com>

* update overview..py

* make lint

* update documentation

---------

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>
Co-authored-by: Kenneth Enevoldsen <kennethcenevoldsen@gmail.com>

* 1.36.12

Automatically generated by python-semantic-release

* fix: Add `ModelMeta` license & custom validations (#2293)

* license validation

* move licenses

* update imports

---------

Co-authored-by: Isaac Chung <chungisaac1217@gmail.com>

* 1.36.13

Automatically generated by python-semantic-release

* ci: Add pre-commit hook (#2194)

* make dev life nicer - pre-commit hooks

* add pre-commit to install

* update precommit

* update ruff pre-commit

* lint

* lint

---------

Co-authored-by: sam021313 <40773225+sam021313@users.noreply.github.com>

* Update tasks table

* fix: bug in voyage implementation (#2304)

* fix: Fix bug in voyage implementation

"passage" is not a valid input for the voyage API. Remapped to "document".

* Update mteb/models/voyage_models.py

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>

---------

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>

* 1.36.14

Automatically generated by python-semantic-release

* fix: Update voyage name to include Org. (#2322)

* 1.36.15

Automatically generated by python-semantic-release

* Added VDR Model (#2290)

* Added VDR Model

* change custom wrapper to SentenceTransformer Wrapper

* remove kwargs and add TODO for Image Modality

* Update mteb/models/vdr_models.py

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>

---------

Co-authored-by: Roman Solomatin <samoed.roman@gmail.com>

* lint

* fix license

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Munot Ayush Sunil <munotayush6@kgpian.iitkgp.ac.in>
Co-authored-by: Kenneth Enevoldsen <kennethcenevoldsen@gmail.com>
Co-authored-by: Isaac Chung <chungisaac1217@gmail.com>
Co-authored-by: Sam <40773225+sam-hey@users.noreply.github.com>
Co-authored-by: sam021313 <40773225+sam021313@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

Use literal for licenses in ModelMeta as well
2 participants