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

feat: allow empty sparse row #2291

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

zhengbuqian
Copy link
Collaborator

currently pymilvus supports the following sparse vector formats:

  • scipy sparse classes
  • list of tuples: [(dim, val), (dim, val), ...]
  • dict: {dim: val, dim: val, ...}

When dealing with input data, pymilvus doesn't check the schema to infer the data type, instead it tries to infer the data type based on the shape. that's why we have entity_is_sparse_matrix method.

Now we want to support empty sparse vector row, it is easy for scipy sparse classes, but for the other 2 format, it means we must infer empty list/dict []/{} as sparse vector.

Will this be problematic? what could be the other options?

Signed-off-by: Buqian Zheng <[email protected]>
@XuanYang-cn
Copy link
Contributor

Is this a subtask of None support?

@XuanYang-cn
Copy link
Contributor

/lgtm
/approve

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XuanYang-cn, zhengbuqian

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhengbuqian
Copy link
Collaborator Author

Is this a subtask of None support?

no, this is to allow empty sparse vector(no valid dim), not null support

@sre-ci-robot sre-ci-robot merged commit 60ce3af into milvus-io:master Oct 11, 2024
11 checks passed
@zhengbuqian zhengbuqian deleted the allow-empty-sparse branch October 11, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants