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

Custom vectorizers #1152

Merged
merged 7 commits into from
Jul 3, 2024
Merged

Custom vectorizers #1152

merged 7 commits into from
Jul 3, 2024

Conversation

dirkkul
Copy link
Collaborator

@dirkkul dirkkul commented Jul 3, 2024

Closes #1138
Closes #950

This adds the possibility to add custom vectorzers, rerankers and generative modules to the collection config.
The syntax is

Configure.Generative.custom(
            "generative-whatever", module_config={"temperature": 0.5}
        )
Configure.Reranker.custom(
            "reranker-whatever", module_config={"model": "whatever"}
        )
Configure.Vectorizer.custom(
            "text2vec-whatever", module_config={"vectorizeClassName": False}
        )
Configure.NamedVectors.custom(
                "name", module_name="text2vec-contextionary", module_config={"vectorizeClassName": False}
            )

in addition, the client can now also handle returns with modules that it does not know

@dirkkul dirkkul requested a review from tsmith023 July 3, 2024 07:43
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.15152% with 8 lines in your changes missing coverage. Please review.

Project coverage is 94.61%. Comparing base (42fb96c) to head (a6aef0a).
Report is 80 commits behind head on main.

Files Patch % Lines
weaviate/collections/classes/config_methods.py 78.57% 6 Missing ⚠️
integration/test_collection_config.py 98.41% 1 Missing ⚠️
weaviate/collections/classes/config_vectorizers.py 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1152      +/-   ##
==========================================
- Coverage   94.68%   94.61%   -0.07%     
==========================================
  Files         190      193       +3     
  Lines       18932    19197     +265     
==========================================
+ Hits        17926    18164     +238     
- Misses       1006     1033      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dirkkul dirkkul merged commit 3fadccb into main Jul 3, 2024
42 checks passed
@dirkkul dirkkul deleted the custom_vectorizers branch July 3, 2024 08:37
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.

Cannot get config for collection with unknown module Add support for custom modules (generative+vectorizers)
3 participants