Description
The collection.config.update
method doesn’t update the description when invoked withcollection.config.update(description="Updated")
Server Setup Information
- Weaviate Server Version: 1.25.1
- Deployment Method: docker
- Client Language and Version: Python 4.6.2
Any additional Information
Minimal reproduction
These three files shall be put in same folder:
main.py
import time
from weaviate.classes.config import DataType, Property
from weaviate import connect_to_custom
try:
while True:
try:
weaviate_client = connect_to_custom(
http_host="weaviate",
http_port="8085",
http_secure=False,
grpc_host="weaviate",
grpc_port="50051",
grpc_secure=False,
)
break
except:
print("Error connecting")
time.sleep(1)
def delete_collection(name: str):
try:
weaviate_client.collections.delete(name)
except:
pass
def create_collection(name: str):
weaviate_client.collections.create(
name,
description=name,
properties=[
Property(
name="text",
description="Field",
data_type=DataType.TEXT,
skip_vectorization=True,
index_filterable=True,
index_searchable=False,
)
],
)
def update_collection(name: str):
collection = weaviate_client.collections.get(name=name)
collection.config.update(description="Updated")
NAME = "Test"
delete_collection(NAME)
create_collection(NAME)
collection1 = weaviate_client.collections.get(name=NAME)
config1 = collection1.config.get()
print("BEFORE", config1.description, flush=True)
update_collection(NAME)
collection2 = weaviate_client.collections.get(name=NAME)
config2 = collection2.config.get()
print("AFTER", config2.description, flush=True)
except Exception as e:
print(e, flush=True)
pass
while True:
time.sleep(1)
Dockerfile
FROM python:3.11.6-slim
RUN apt-get update
WORKDIR /app
RUN pip install -U weaviate-client
compose.yaml
services:
server:
build: .
working_dir: /app
volumes:
- .:/app
depends_on:
- weaviate
command: python3 /app/main.py
weaviate:
command:
- --host
- 0.0.0.0
- --port
- "8085"
- --scheme
- http
image: semitechnologies/weaviate:1.25.0
volumes:
- ./weaviate:/var/lib/weaviate
restart: on-failure:0
environment:
PYTHONASYNCIODEBUG: 1
QUERY_DEFAULTS_LIMIT: 25
LIMIT_RESOURCES: "true"
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true"
PERSISTENCE_DATA_PATH: "/var/lib/weaviate"
DEFAULT_VECTORIZER_MODULE: "none"
ENABLE_MODULES: "tiktoken_ext.openai_public"
CLUSTER_HOSTNAME: "node1"
Steps to reproduce:
- Run docker compose
- View the docker log