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]: [Nightly] Create index on sparse vector with invalid ratio does not report error #37269

Closed
1 task done
NicoYuan1986 opened this issue Oct 29, 2024 · 6 comments
Closed
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.
Milestone

Comments

@NicoYuan1986
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:master(1e75a42)
- Deployment mode(standalone or cluster):cluster
- MQ type(rocksmq, pulsar or kafka):    kafka
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

Create index on sparse vector with invalid ratio does not report error.

[pytest : test] _____ TestIndexInvalid.test_invalid_sparse_ratio[SPARSE_INVERTED_INDEX-1] ______
[pytest : test] [gw3] linux -- Python 3.8.17 /usr/local/bin/python3
[pytest : test] 
[pytest : test] self = <test_index.TestIndexInvalid object at 0x7f328eb53ee0>, ratio = 1
[pytest : test] index = 'SPARSE_INVERTED_INDEX'
[pytest : test] 
[pytest : test]     @pytest.mark.tags(CaseLabel.L2)
[pytest : test]     @pytest.mark.parametrize("ratio", [-0.5, 1, 3])
[pytest : test]     @pytest.mark.parametrize("index ", ct.all_index_types[9:11])
[pytest : test]     def test_invalid_sparse_ratio(self, ratio, index):
[pytest : test]         """
[pytest : test]         target: index creation for unsupported ratio parameter
[pytest : test]         method: indexing of unsupported ratio parameters
[pytest : test]         expected: raise exception
[pytest : test]         """
[pytest : test]         c_name = cf.gen_unique_str(prefix)
[pytest : test]         schema = cf.gen_default_sparse_schema()
[pytest : test]         collection_w = self.init_collection_wrap(name=c_name, schema=schema)
[pytest : test]         data = cf.gen_default_list_sparse_data()
[pytest : test]         collection_w.insert(data=data)
[pytest : test]         params = {"index_type": index, "metric_type": "IP", "params": {"drop_ratio_build": ratio}}
[pytest : test]         error = {ct.err_code: 1100,
[pytest : test]                  ct.err_msg: f"invalid drop_ratio_build: {ratio}, must be in range [0, 1): invalid parameter[expected=valid index params"}
[pytest : test] >       index, _ = self.index_wrap.init_index(collection_w.collection, ct.default_sparse_vec_field_name, params,
[pytest : test]                                               check_task=CheckTasks.err_res,
[pytest : test]                                               check_items=error)
[pytest : test] 

[pytest : test] [2024-10-28 19:28:42 - DEBUG - ci_test]: (api_request)  : [Index] args: [<Collection>:
[pytest : test] -------------
[pytest : test] <name>: index_ExmpDRnQ
[pytest : test] <description>: 
[pytest : test] <schema>: {'auto_id': False, 'description': '', 'fields': [{'name': 'int64', 'description': '', 'type': <DataType.INT64: 5>, 'is_primary': True, 'auto_id': False}, {'name': 'float', 'description': '', 'type': <DataType.FLOAT: 10>}, ......, kwargs: {'timeout': 1200, 'index_name': ''} (api_request.py:62)
[pytest : test] [2024-10-28 19:28:43 - DEBUG - ci_test]: (api_response) : <pymilvus.orm.index.Index object at 0x7f324c5f87c0>  (api_request.py:37)

Expected Behavior

report error

Steps To Reproduce

No response

Milvus Log

  1. link: https://jenkins.milvus.io:18080/blue/organizations/jenkins/Milvus%20Nightly%20CI(new)/detail/master/162/pipeline/114/
  2. log: artifacts-milvus-distributed-kafka-mdk-master-162-py-n-162-e2e-logs.tar.gz
  3. error case: test_bitmap_cardinality_limit_invalid

Anything else?

No response

@NicoYuan1986 NicoYuan1986 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 Oct 29, 2024
@NicoYuan1986 NicoYuan1986 added this to the 2.5.0 milestone Oct 29, 2024
@yanliang567
Copy link
Contributor

/assign @zhengbuqian
/unassign

@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 Oct 29, 2024
@zhengbuqian
Copy link
Collaborator

likely caused by #36844. @foxspy can you help with this?

/assign @foxspy

@liliu-z
Copy link
Member

liliu-z commented Nov 1, 2024

/unassign @zhengbuqian

sre-ci-robot pushed a commit that referenced this issue Nov 4, 2024
@foxspy
Copy link
Contributor

foxspy commented Nov 4, 2024

/assign @yanliang567

@yanliang567
Copy link
Contributor

/assign @NicoYuan1986
please help to verify the fix

@NicoYuan1986
Copy link
Contributor Author

fixed. master-20241106-8275e40f

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

5 participants