Code Monkey home page Code Monkey logo

Comments (4)

afzalIbnSH avatar afzalIbnSH commented on September 26, 2024

Can someone look at this?

from pymilvus.

czs007 avatar czs007 commented on September 26, 2024

@afzalIbnSH sorry for the late response.

I have made some modifications based on your example to facilitate local execution.
I was unable to reproduce the issue in version 2.3.7 and 2.4.0.

import time
import numpy as np

import time

import numpy as np
from pymilvus import (
    connections,
    utility,
    FieldSchema, CollectionSchema, DataType,
    MilvusClient,
)

dim = 8
collection_name = "hello_milvus"
milvus_client = MilvusClient("http://localhost:19530")

fields = [
    FieldSchema(
        name="pk",
        dtype=DataType.VARCHAR,
        max_length=50,
        is_primary=True,
        auto_id=False,
    ),
    FieldSchema(name="bool", dtype=DataType.BOOL),
    FieldSchema(name="codes", dtype=DataType.JSON),
    FieldSchema(name="json", dtype=DataType.JSON),
    FieldSchema(name="embeddings", dtype=DataType.FLOAT_VECTOR, dim=dim),
]
schema = CollectionSchema(
    fields=fields, description="search recipes", enable_dynamic_field=True
)

index_params = milvus_client.prepare_index_params()
index_params.add_index(
    field_name="embeddings",
    index_type="IVF_FLAT",
    metric_type="IP",
    params={"nlist": 1536}
)

milvus_client.create_collection(
    collection_name,
    id_type="string",
    vector_field_name="embeddings",
    metric_type="IP",
    schema=schema,
    index_params=index_params
)

index_names = milvus_client.list_indexes(collection_name)
print(f"index names for {collection_name}:", index_names)
for index_name in index_names:
    index_info = milvus_client.describe_index(collection_name, index_name=index_name)
    print(f"index info for index {index_name} is:", index_info)

output:

index names for hello_milvus: ['embeddings']
index info for index embeddings is: {'index_type': 'IVF_FLAT', 'metric_type': 'IP', 'nlist': '1536', 'field_name': 'embeddings', 'index_name': 'embeddings'}

from pymilvus.

binbinlv avatar binbinlv commented on September 26, 2024

The return from the SDK side is OK , and I could reproduce this issue on Zilliz Cloud, so I think this is not a pymilvus issue。
A6Us9YdGZX

On zilliz cloud, this could be reproduced indeed:

Orm created collection and index:
img_v3_02ac_17dbf716-5330-4c13-adf8-ed3f703bc9eg

Client created collection and index
kAQQfIoz3o

from pymilvus.

binbinlv avatar binbinlv commented on September 26, 2024

So I think maybe need to file an issue on Zilliz cloud

from pymilvus.

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.