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

[Bug]: Unable set nlist while creating IVF_FLAT IP index #31710

Closed
1 task done
afzalIbnSH opened this issue Mar 28, 2024 · 1 comment
Closed
1 task done

[Bug]: Unable set nlist while creating IVF_FLAT IP index #31710

afzalIbnSH opened this issue Mar 28, 2024 · 1 comment
Assignees
Labels
kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@afzalIbnSH
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: zilliz serverless (Compatible With 2.3.x)
- Deployment mode(standalone or cluster): zilliz cloud
- MQ type(rocksmq, pulsar or kafka): zilliz cloud
- SDK version(e.g. pymilvus v2.0.0rc2): 2.4.0
- OS(Ubuntu or CentOS): zilliz cloud
- CPU/Memory: zilliz cloud
- GPU: zilliz cloud
- Others: -

Current Behavior

Below is my code;

    fields = [
        FieldSchema(
            name=Columns.ID.value,
            dtype=DataType.VARCHAR,
            max_length=50,
            is_primary=True,
            auto_id=False,
        ),
        FieldSchema(name=Columns.IS_ENABLED.value, dtype=DataType.BOOL),
        FieldSchema(name=Columns.COUNTRY_CODES.value, dtype=DataType.JSON),
        FieldSchema(name=Columns.APPLICABLE_FOR.value, dtype=DataType.JSON),
        FieldSchema(name=Columns.EMBEDDING.value, dtype=DataType.FLOAT_VECTOR, dim=MODEL_DIM),
    ]
    schema = CollectionSchema(
        fields=fields, description="search recipes", enable_dynamic_field=True
    )

    index_params = MilvusClient.prepare_index_params()
    index_params.add_index(
        field_name=Columns.EMBEDDING.value,
        index_type=IndexType.IVF_FLAT,
        metric_type=MetricType.IP,
        params={"nlist": 1536}
    )

    client.create_collection(
        collection_name,
        id_type="string",
        vector_field_name=Columns.EMBEDDING.value,
        metric_type=MetricType.IP,
        schema=schema,
        index_params=index_params
    )

It does result in creation of an IVF_FLAT IP index but the nlist isn't getting set.

Expected Behavior

The nlist should get set as well.

Steps To Reproduce

Use the above piece of code for collection and index creation.

Milvus Log

No logs.

Anything else?

No.

@afzalIbnSH afzalIbnSH added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 28, 2024
@afzalIbnSH
Copy link
Author

This is a pymilvus issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants