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]: the param 'mmap.enabled' and 'mmap_enabled' is confusing to the pymilvus users #38443

Open
1 task done
yanliang567 opened this issue Dec 13, 2024 · 2 comments
Open
1 task done
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@yanliang567
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: milvus
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus-2.4.11rc8

Current Behavior

when setting mmap in add_field() when creating collection, it requires a underscore() in the param "mmap_enabled"
while altering mmap in alter_collection_field(), it requires a dot(.) in the param "mmap.enabled"
when describing collection, it displays a underscore(
) again
image

Expected Behavior

use the same one format: dot or underscore

Steps To Reproduce

try to run the code snippet below

Milvus Log

No response

Anything else?

    def test_milvus_client_alter_collection_field_default(self):
        """
        target: test alter collection field before load
        method: alter varchar field maxlength
        expected: alter successfully
        """
        client = self._connect(enable_milvus_client_api=True)
        collection_name = cf.gen_unique_str(prefix)
        # 1. create collection
        schema = client_w.create_schema(client, enable_dynamic_field=False)[0]
        schema.add_field("id_string", DataType.VARCHAR, max_length=64, is_primary=True, auto_id=False)
        schema.add_field("embeddings", DataType.FLOAT_VECTOR, dim=32, mmap_enabled=True)
        schema.add_field("title", DataType.VARCHAR, max_length=64, mmap_enabled=True)

        index_params = client_w.prepare_index_params(client)[0]
        index_params.add_index(field_name="embeddings", metric_type="COSINE",
                               index_type="IVF_FLAT",
                               params={"nlist": 128, "mmap_enabled": True})
        index_params.add_index(field_name="title")
        client_w.create_collection(client, collection_name, schema=schema, index_params=index_params)
        client_w.describe_collection(client, collection_name, check_task=CheckTasks.check_collection_fields_properties,
                                     check_items={"title": {"max_length": 64, "mmap_enabled": True},
                                                  "embeddings": {"mmap_enabled": True}})
        # 1. alter collection field before load
        client_w.release_collection(client, collection_name)
        new_max_length = 123
        client_w.alter_collection_field(client, collection_name,  field_name='title',
                                        field_params={"max_length": new_max_length, "mmap.enabled": False})
        client_w.alter_collection_field(client, collection_name, field_name='embeddings',
                                        field_params={"mmap.enabled": False})
        client_w.describe_collection(client, collection_name, check_task=CheckTasks.check_collection_fields_properties,
                                     check_items={"title": {"max_length": new_max_length, "mmap_enabled": False},
                                                  "embeddings": {"mmap_enabled": False}})
@yanliang567 yanliang567 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 Dec 13, 2024
@yanliang567 yanliang567 self-assigned this Dec 13, 2024
@yanliang567
Copy link
Contributor Author

/assign @JsDove

/unassign

@sre-ci-robot
Copy link
Contributor

@yanliang567: GitHub didn't allow me to assign the following users: JsDove.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @JsDove

/unassign

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 13, 2024
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 triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants