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

pyv4 client is not honoring server config DEFAULT_VECTORIZER_MODULE #1059

Closed
dudanogueira opened this issue May 11, 2024 · 0 comments · Fixed by #1067
Closed

pyv4 client is not honoring server config DEFAULT_VECTORIZER_MODULE #1059

dudanogueira opened this issue May 11, 2024 · 0 comments · Fixed by #1067

Comments

@dudanogueira
Copy link
Contributor

First, run a server like this:

docker run -e DEFAULT_VECTORIZER_MODULE="text2vec-openai" -e ENABLE_MODULES="text2vec-openai" -p 8080:8080 -p 50051:50051 cr.weaviate.io/semitechnologies/weaviate:1.25.0 

Now, if you do not define a vectorizer at all, it should default to `text2vec-openai``

This is true when calling the endpoint api directly, and never passing the vectorizer whatsoever

curl --request POST  -H "Content-Type: application/json" --url http://localhost:8080/v1/schema  --data '{"class": "Test"}'
curl --request GET --url http://localhost:8080/v1/schema/Test | jq .vectorizer

$ "text2vec-openai"

if you intentionally pass it as none, it will be honored the provided value

curl --request POST  -H "Content-Type: application/json" --url http://localhost:8080/v1/schema  --data '{"class": "TestNone", "vectorizer": "none"}'
curl --request GET --url http://localhost:8080/v1/schema/Test | jq .vectorizer

$ "none"

that expected behaviour is not reflected in the client, if you call

collection = client.collections.create("TestNoneFromClient")

it will intentionally pass none to the rest endpoint, and not honor the server configuration.

curl --request GET --url http://localhost:8080/v1/schema/TestNoneFromClient | jq .vectorizer

$none

The new collection TestNoneFromClient is expected to have the vectorizer set to text2vec-openai

I propose removing or _Vectorizer.none() from:

vectorizer_config=vectorizer_config or _Vectorizer.none(),

Not sure how to write tests for this 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant