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.5]intermin index support different index type and more data type(fp16/bf16) #39180

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

cqy123456
Copy link
Contributor

@cqy123456 cqy123456 commented Jan 12, 2025

issue: #27678
related: #39753
some raw data status will change:
Intermin index has raw data:

sparse vector growing segment sealed segment
BM25 no no
IP yes no
     
dense vector growing segment sealed segment
ivf flat cc yes yes
scann_dvr no no

@cqy123456 cqy123456 changed the title enhance: intermin index support index without raw data and metric type fp16/bf16 enhance: [2.5]intermin index support index without raw data and metric type fp16/bf16 Jan 12, 2025
@sre-ci-robot sre-ci-robot added area/compilation size/XL Denotes a PR that changes 500-999 lines. labels Jan 12, 2025
@mergify mergify bot added the dco-passed DCO check passed. label Jan 12, 2025
Copy link
Contributor

mergify bot commented Jan 12, 2025

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

@mergify mergify bot added do-not-merge/missing-related-pr kind/enhancement Issues or changes related to enhancement labels Jan 12, 2025
Copy link
Contributor

mergify bot commented Jan 12, 2025

@cqy123456 Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

Copy link
Contributor

mergify bot commented Jan 12, 2025

@cqy123456 go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 67.62402% with 124 lines in your changes missing coverage. Please review.

Project coverage is 81.02%. Comparing base (0f4d3ef) to head (7e89f9d).
Report is 2 commits behind head on 2.5.

Files with missing lines Patch % Lines
...rnal/core/src/segcore/ChunkedSegmentSealedImpl.cpp 4.08% 47 Missing ⚠️
internal/core/src/segcore/SegmentSealedImpl.cpp 60.65% 24 Missing ⚠️
internal/core/src/segcore/segcore_init_c.cpp 5.00% 19 Missing ⚠️
internal/core/src/segcore/FieldIndexing.cpp 77.33% 17 Missing ⚠️
internal/core/src/storage/storage_c.cpp 0.00% 6 Missing ⚠️
internal/core/src/index/VectorMemIndex.cpp 72.72% 3 Missing ⚠️
internal/querynodev2/server.go 25.00% 2 Missing and 1 partial ⚠️
pkg/util/paramtable/component_param.go 90.32% 2 Missing and 1 partial ⚠️
internal/core/src/segcore/FieldIndexing.h 85.71% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (67.62%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.5   #39180      +/-   ##
==========================================
- Coverage   81.06%   81.02%   -0.04%     
==========================================
  Files        1415     1415              
  Lines      198960   199201     +241     
==========================================
+ Hits       161279   161397     +118     
- Misses      32027    32136     +109     
- Partials     5654     5668      +14     
Components Coverage Δ
Client 78.26% <ø> (ø)
Core 69.37% <62.17%> (-0.10%) ⬇️
Go 83.02% <91.54%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
internal/core/src/index/VectorMemIndex.h 100.00% <ø> (ø)
internal/core/src/mmap/ChunkVector.h 87.09% <ø> (+3.22%) ⬆️
internal/core/src/query/SearchOnGrowing.cpp 93.02% <100.00%> (ø)
internal/core/src/segcore/ConcurrentVector.h 96.68% <100.00%> (+0.85%) ⬆️
internal/core/src/segcore/IndexConfigGenerator.cpp 82.53% <100.00%> (+0.87%) ⬆️
internal/core/src/segcore/InsertRecord.h 89.55% <100.00%> (+0.63%) ⬆️
internal/core/src/segcore/SegcoreConfig.h 100.00% <100.00%> (ø)
internal/core/src/segcore/SegmentGrowingImpl.cpp 82.66% <100.00%> (-0.14%) ⬇️
internal/core/src/segcore/SegmentGrowingImpl.h 68.29% <100.00%> (-0.76%) ⬇️
internal/core/src/segcore/vector_index_c.cpp 22.22% <ø> (ø)
... and 13 more

... and 26 files with indirect coverage changes

@cqy123456 cqy123456 changed the title enhance: [2.5]intermin index support index without raw data and metric type fp16/bf16 enhance: [2.5]intermin index support different index type and more metric type(fp16/bf16) Jan 13, 2025
Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 cpp-unit-test check failed, comment rerun cpp-unit-test can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 cpp-unit-test check failed, comment rerun cpp-unit-test can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

nprobe: 16 # nprobe to search small index, based on your accuracy requirement, must smaller than nlist
subDim: 4 # interim index sub dim, recommend to (subDim % vector dim == 0)
refineRatio: 3.5 # interim index parameters, should set to be >= 1.0
withRawData: true # Whether to keep raw data inside the intermin index
Copy link
Contributor Author

Choose a reason for hiding this comment

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

replace withRawData by denseVectorIndexType

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@cqy123456 cqy123456 changed the title enhance: [2.5]intermin index support different index type and more metric type(fp16/bf16) enhance: [2.5]intermin index support different index type and more data type(fp16/bf16) Jan 13, 2025
nprobe: 16 # nprobe to search small index, based on your accuracy requirement, must smaller than nlist
subDim: 4 # interim index sub dim, recommend to (subDim % vector dim == 0)
refineRatio: 3.5 # interim index parameters, should set to be >= 1.0
withRawData: true # Whether to keep raw data inside the intermin index
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an index feature, not a configuration item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with a index type as config

@@ -102,7 +103,8 @@ SegmentGrowingImpl::Insert(int64_t reserved_offset,
AssertInfo(field_id_to_offset.count(field_id),
fmt::format("can't find field {}", field_id.get()));
auto data_offset = field_id_to_offset[field_id];
if (!indexing_record_.SyncDataWithIndex(field_id)) {
if (!indexing_record_.SyncDataWithIndex(field_id) ||
!indexing_record_.HasRawData(field_id)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This may seem difficult to understand; please change it to insert_raw_to_index = indexing_record_.SyncDataWithIndex(field_id) && indexing_record_.HasRawData(field_id); if (!insert_raw_to_index) xxx , which means that only the index holds the original data and the index data has been matched with the inserted data, and no more data will be written to the chunk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replace indexing_record_.SyncDataWithIndex(field_id) && indexing_record_.HasRawData(field_id) with indexing_record_.HasRawData(field_id), because indexing_record_.HasRawData(field_id) include indexing_record_.SyncDataWithIndex(field_id).

Copy link
Contributor

mergify bot commented Jan 13, 2025

@cqy123456 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@cqy123456
Copy link
Contributor Author

/run-cpu-e2e

@sre-ci-robot sre-ci-robot removed the size/XL Denotes a PR that changes 500-999 lines. label Jan 15, 2025
@foxspy
Copy link
Contributor

foxspy commented Feb 11, 2025

rerun go-sdk

@foxspy
Copy link
Contributor

foxspy commented Feb 11, 2025

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Feb 11, 2025

@cqy123456 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@foxspy
Copy link
Contributor

foxspy commented Feb 11, 2025

/run-cpu-e2e

@yanliang567 yanliang567 added this to the 2.5.5 milestone Feb 11, 2025
Copy link
Contributor

mergify bot commented Feb 11, 2025

@cqy123456 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@@ -1760,11 +1757,9 @@ ChunkedSegmentSealedImpl::bulk_subscript(FieldId field_id,
return get_raw_data(field_id, field_meta, seg_offsets, count);
}
return get_vector(field_id, seg_offsets, count);
} else {
return fill_with_empty(field_id, count);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not panic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@@ -2091,19 +2129,26 @@ ChunkedSegmentSealedImpl::generate_interim_index(const FieldId field_id) {

if (enable_binlog_index()) {
std::unique_lock lck(mutex_);
if (vec_index->HasRawData()) {
// some knowhere view data index not has raw data, still keep it
Copy link
Collaborator

Choose a reason for hiding this comment

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

comment in wrong place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor

@foxspy foxspy left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

mergify bot commented Feb 12, 2025

@cqy123456 go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

@foxspy foxspy left a comment

Choose a reason for hiding this comment

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

/lgtm

@czs007
Copy link
Collaborator

czs007 commented Feb 13, 2025

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cqy123456, czs007, foxspy

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 d121ac3 into milvus-io:2.5 Feb 13, 2025
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/compilation ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants