Description
When I add a property to an existing class skip_vectorization is not being propagated to the _PropertyVectorizerConfig making it impossible to add a property with skip_vectorization=True. It seems only to happen if generative_config is not null. If generative_config is null, this bug doesn’t happen.
Server Setup Information
- Weaviate Server Version: Docker Image 1.28.2
- Deployment Method: Docker
- Multi Node? Number of Running Nodes: No
- Client Language and Version: Python 3.12
- Multitenancy?: No
Any additional Information
Code:
client = weaviate.connect_to_local(host=‘127.0.0.1’,port=8080,grpc_port=50051)
try:
client.collections.delete(‘Test’)
except:
pass
client.collections.create(
“Test”,
vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_ollama(
api_endpoint=“http://localhost:11434”,
model=“snowflake-arctic-embed2:568m”
),
generative_config=Configure.Generative.ollama(
api_endpoint=“http://localhost:11434”, # If using Docker, use this to contact your local Ollama instance
model=“dolphin3:8b-llama3.1-q4_K_M” # The model to use, e.g. “phi3”, or “mistral”, “command-r-plus”, “gemma”
),
properties=[
Property(name=“property_made_during_class_creation”,data_type=DataType.BOOL,vectorize_property_name=False,skip_vectorization=True),
]
)
testCollection = client.collections.get(‘Test’)
testCollection.config.add_property(Property(name=“property_made_after_class_creation”,data_type=DataType.BOOL,vectorize_property_name=False,skip_vectorization=True))
testCollection.config.get().properties
Output:
[_Property(name=‘property_made_during_class_creation’, description=None, data_type=<DataType.BOOL: ‘boolean’>, index_filterable=True, index_range_filters=False, index_searchable=False, nested_properties=None, tokenization=None, vectorizer_config=_PropertyVectorizerConfig(skip=True, vectorize_property_name=False), vectorizer=‘text2vec-ollama’),
_Property(name=‘property_made_after_class_creation’, description=None, data_type=<DataType.BOOL: ‘boolean’>, index_filterable=True, index_range_filters=False, index_searchable=False, nested_properties=None, tokenization=None, vectorizer_config=_PropertyVectorizerConfig(skip=False, vectorize_property_name=False), vectorizer=‘text2vec-ollama’)]
Expected Behavior:
Both properties would have _PropertyVectorizerConfig.skip = True
Deployment Config:
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- ‘8080’
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.28.2
network_mode: ‘host’
volumes:
- /Volume:/var/lib/weaviate
restart: on-failure:0
environment:
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ‘true’
PERSISTENCE_DATA_PATH: ‘/var/lib/weaviate’
ENABLE_API_BASED_MODULES: ‘true’
CLUSTER_HOSTNAME: ‘node1’
ENABLE_MODULES: ‘text2vec-ollama,generative-ollama’
OLLAMA_API_BASE_URL: ‘http://127.0.0.1:11434/api’
~