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

init_from is deprecated warnings on create collection calls #650

Open
viktorku opened this issue Jun 18, 2024 · 2 comments
Open

init_from is deprecated warnings on create collection calls #650

viktorku opened this issue Jun 18, 2024 · 2 comments

Comments

@viktorku
Copy link

I'm creating collections using the documented example as found on the official website documentation. However I constantly get warnings that init_from is deprecated and I wasn't even able to find it in the repo here.

from qdrant_client import QdrantClient, models

client = QdrantClient(url="http://localhost:6333")

client.create_collection(
    collection_name="{collection_name}",
    vectors_config=models.VectorParams(size=100, distance=models.Distance.COSINE),
    init_from=models.InitFrom(collection="{from_collection_name}"),
)

I also see that init_from is supported on the API itself with no sign of deprecation soon.

I have no issues with the newly created collections, but the deprecation warning is a bit off-putting.

I'm using [email protected] and running the service in a container from the qdrant/qdrant:v1.9.5 image on x86_64 Linux

@joein
Copy link
Member

joein commented Jun 20, 2024

Hi @viktorku

We've indeed deprecated InitFrom functionality, since it might not work correctly if there are ongoing write operations in the source collection
Hence the warning

@viktorku
Copy link
Author

Thanks for the clarification @joein. Does it make sense to have a warning that communicates that? I'm currently using it only for migrations during downtime, and no ongoing operations will obstruct the "copy" process.

If the plan is to ultimately remove the init_from functionality altogether, then I'd have to resort to calling the API directly. But it wouldn't make sense to remove it from the client if the service still supports it...

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

No branches or pull requests

2 participants