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

Open
wants to merge 1 commit into
base: 2.5
Choose a base branch
from

Conversation

cqy123456
Copy link
Contributor

@cqy123456 cqy123456 commented Jan 12, 2025

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
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cqy123456
To complete the pull request process, please assign liliu-z after the PR has been reviewed.
You can assign the PR to them by writing /assign @liliu-z in a comment when ready.

The full list of commands accepted by this bot can be found 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

@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 61.31148% with 118 lines in your changes missing coverage. Please review.

Project coverage is 69.37%. Comparing base (54036bc) to head (68d4c0e).
Report is 32 commits behind head on 2.5.

Files with missing lines Patch % Lines
...rnal/core/src/segcore/ChunkedSegmentSealedImpl.cpp 9.30% 39 Missing ⚠️
internal/core/src/segcore/SegmentSealedImpl.cpp 50.81% 30 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/core/src/segcore/FieldIndexing.h 85.71% 2 Missing ⚠️
internal/core/src/segcore/SegcoreConfig.h 77.77% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (54036bc) and HEAD (68d4c0e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (54036bc) HEAD (68d4c0e)
2 1
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##              2.5   #39180       +/-   ##
===========================================
- Coverage   81.06%   69.37%   -11.69%     
===========================================
  Files        1399      300     -1099     
  Lines      196700    26958   -169742     
===========================================
- Hits       159448    18703   -140745     
+ Misses      31653     8255    -23398     
+ Partials     5599        0     -5599     
Components Coverage Δ
Client ∅ <ø> (∅)
Core 69.37% <61.31%> (-0.16%) ⬇️
Go ∅ <ø> (∅)
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 83.92% <100.00%> (+0.90%) ⬆️
internal/core/src/segcore/InsertRecord.h 89.55% <100.00%> (+0.63%) ⬆️
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% <ø> (ø)
internal/core/src/storage/Types.h 40.27% <100.00%> (+3.51%) ⬆️
... and 8 more

... and 1129 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

@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.

@@ -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

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 added size/XXL Denotes a PR that changes 1000+ lines. and removed size/XL Denotes a PR that changes 500-999 lines. labels Jan 15, 2025
…e fp16/bf16

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
@@ -404,8 +404,11 @@ queryNode:
# Milvus will eventually seals and indexes all segments, but enabling this optimizes search performance for immediate queries following data insertion.
# This defaults to true, indicating that Milvus creates temporary index for growing segments and the sealed segments that are not indexed upon searches.
enableIndex: true
nlist: 128 # temp index nlist, recommend to set sqrt(chunkRows), must smaller than chunkRows/8
nprobe: 16 # nprobe to search small index, based on your accuracy requirement, must smaller than nlist
nlist: 128 # interim index nlist, recommend to set sqrt(chunkRows), must smaller than chunkRows/8
Copy link
Contributor Author

Choose a reason for hiding this comment

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

change these config before merge

Copy link
Contributor

mergify bot commented Jan 16, 2025

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

@cqy123456
Copy link
Contributor Author

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jan 16, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compilation dco-passed DCO check passed. do-not-merge/missing-related-issue do-not-merge/missing-related-pr kind/enhancement Issues or changes related to enhancement size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants