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

enhance: [2.4] add metrics for counting number of nun-zeros/tokens of sparse search #38328

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

zhengbuqian
Copy link
Collaborator

@zhengbuqian zhengbuqian commented Dec 10, 2024

sparse vectors may have arbitrary number of non zeros and it is hard to optimize without knowing the actual distribution of nnz. this PR adds a metric for analyzing that.

pr: #38329

also fixed a bug of sparse when searching by pk

@sre-ci-robot sre-ci-robot added the size/M Denotes a PR that changes 30-99 lines. label Dec 10, 2024
Copy link
Contributor

mergify bot commented Dec 10, 2024

@zhengbuqian Please associate the related pr of master to the body of your Pull Request. (eg. “pr: #”)

@mergify mergify bot added dco-passed DCO check passed. do-not-merge/missing-related-pr kind/enhancement Issues or changes related to enhancement labels Dec 10, 2024
@zhengbuqian zhengbuqian changed the title enhance: add metrics for counting number of nun-zeros/tokens of sparse search enhance: [2.4] add metrics for counting number of nun-zeros/tokens of sparse search Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.14%. Comparing base (c4b6460) to head (e97f221).
Report is 2 commits behind head on 2.4.

Files with missing lines Patch % Lines
pkg/util/funcutil/placeholdergroup.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.4   #38328      +/-   ##
==========================================
- Coverage   80.41%   72.14%   -8.27%     
==========================================
  Files        1074     1074              
  Lines      168774   168776       +2     
==========================================
- Hits       135713   121768   -13945     
- Misses      28613    42565   +13952     
+ Partials     4448     4443       -5     
Files with missing lines Coverage Δ
internal/proxy/task_search.go 74.84% <100.00%> (+0.03%) ⬆️
pkg/metrics/proxy_metrics.go 100.00% <100.00%> (ø)
pkg/util/typeutil/schema.go 85.24% <100.00%> (+0.03%) ⬆️
pkg/util/funcutil/placeholdergroup.go 53.33% <0.00%> (+1.72%) ⬆️

... and 224 files with indirect coverage changes

@@ -83,14 +82,10 @@ func fieldDataToPlaceholderValue(fieldData *schemapb.FieldData) (*commonpb.Place
return nil, errors.New("vector data is not schemapb.VectorField_SparseFloatVector")
}
vec := vectors.SparseFloatVector
bytes, err := proto.Marshal(vec)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for removing this Marshal?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was a mistake: PlaceholderValue::Values should be just the byte representation of sparse vector, not some serialized proto. no one has ever used this search by pk feature thus this bug is never triggered.

@foxspy
Copy link
Contributor

foxspy commented Dec 10, 2024

/lgtm

Copy link
Contributor

@congqixia congqixia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia, 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

@sre-ci-robot sre-ci-robot merged commit 25249fd into milvus-io:2.4 Dec 11, 2024
14 of 15 checks passed
sre-ci-robot pushed a commit that referenced this pull request Dec 12, 2024
…e/FTS search (#38329)

sparse vectors may have arbitrary number of non zeros and it is hard to
optimize without knowing the actual distribution of nnz. this PR adds a
metric for analyzing that.

issue: #35853

comparing with #38328, this
includes also metric for FTS in query node delegator

also fixed a bug of sparse when searching by pk

Signed-off-by: Buqian Zheng <[email protected]>
@zhengbuqian zhengbuqian deleted the sparse-nnz-metrics-2.4 branch December 12, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants