Git Product home page Git Product logo

Comments (4)

joein avatar joein commented on July 23, 2024 1

Fastembed creates a named vector with this name fast-bge-small-en-v1.5 in your case, however you are uploading unnamed vectors, that's why you they are not added to your collection.

You don't see any error on python client side, because upload_collection has param wait set to False by default, which means that client does not wait for the response from the server.

Here is a link to an example with upsert

You can check accepted param types of vectors in upload_collection signature.
You can also find examples of usage it with various input types in tests

from qdrant-client.

joein avatar joein commented on July 23, 2024

Hi @uguraydrd

Could you show please how you upload points to your collection?

from qdrant-client.

uguraydrd avatar uguraydrd commented on July 23, 2024

Hi @joein,

Of course. I do this:

metadata = data["col"].to_dict(orient="records")
model = qdrant_client.embedding_models[qdrant_client.embedding_model_name]

qdrant_client.upload_collection(
    collection_name="test",
    vectors=[
        arr.tolist()
        for arr in list(
            model.passage_embed(
                texts=data,
                batch_size=128,
            )
        )
    ],
    ids=range(len(data)),
    payload=metadata,
    batch_size=128,
)

from qdrant-client.

uguraydrd avatar uguraydrd commented on July 23, 2024

Thank you very much for your information. Finally, It works for me, but normally, I could not find or see this anything on your tutorials unfortunately . When I analyzed qdrant_client.add() deeply, I noticed the situation you mentioned.

I want to put the working code here, maybe it will be useful to other people.

metadata = data["col"].to_dict(orient="records")
model = qdrant_client.embedding_models[qdrant_client.embedding_model_name]
vector_field_name = qdrant_client.get_vector_field_name()

qdrant_client.upload_collection(
    collection_name="test",
    vectors=[
        {self.vector_field_name: arr.tolist()}
        for arr in self.model.passage_embed(
            texts=data,
            batch_size=128,
        )
    ],
    ids=range(len(data)),
    payload=metadata,
    batch_size=128,
)

from qdrant-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.