Skip to content

Ensure topk results for IVF_FLAT_CC#353

Merged
sre-ci-robot merged 1 commit intozilliztech:mainfrom
chasingegg:ivfflatcc-topk
Jan 19, 2024
Merged

Ensure topk results for IVF_FLAT_CC#353
sre-ci-robot merged 1 commit intozilliztech:mainfrom
chasingegg:ivfflatcc-topk

Conversation

@chasingegg
Copy link
Collaborator

@chasingegg chasingegg commented Jan 19, 2024

#354
/kind improvement

Signed-off-by: chasingegg <chao.gao@zilliz.com>
@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chasingegg

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

The pull request process is described here

Details 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

}
}
} else if constexpr (std::is_same<IndexType, faiss::IndexIVFFlat>::value) {
} else if constexpr (std::is_same<IndexType, faiss::IndexIVFFlatCC>::value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're not using IndexIVFFlat, just IndexIVFFlatCC all the time, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually I dont know why we need a seperate code branch for IndexIVFFlat, it is the same with IVFPQ, IVFSQ, etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But we do need a new code branch for IndexIVFFlatCC, so I replace it.

struct SearchParametersIVF : SearchParameters {
size_t nprobe = 1; ///< number of probes at query time
size_t max_codes = 0; ///< max nb of codes to visit to do a query
bool ensure_topk_full = false; ///< indicate whether we make sure topk result is full
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd add more comments here. It did not become clear what this parameter does before I read the code :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I will add more comments in the next pr.

idx_t* labels,
size_t k) const;
size_t k,
size_t& scan_cnt) const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add comments to the description of the function.

@alexanderguzhva
Copy link
Collaborator

/lgtm
This change will need to be merged wirh the baseline whenever time permits. I'll do that.

@chasingegg
Copy link
Collaborator Author

/lgtm This change will need to be merged wirh the baseline whenever time permits. I'll do that.

Yeah, I've opened an issue at faiss repo, it is actually a break change to current faiss implementation on 'scan_count' meaning, and I somehow prefer the meaning in knowhere :)

@chasingegg chasingegg deleted the ivfflatcc-topk branch January 20, 2024 03:37
chasingegg added a commit to chasingegg/Knowhere that referenced this pull request Jan 22, 2024
Signed-off-by: chasingegg <chao.gao@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Jan 22, 2024
Signed-off-by: chasingegg <chao.gao@zilliz.com>
chasingegg added a commit to chasingegg/Knowhere that referenced this pull request Feb 4, 2024
Signed-off-by: chasingegg <chao.gao@zilliz.com>
chasingegg added a commit to chasingegg/Knowhere that referenced this pull request Feb 4, 2024
Signed-off-by: chasingegg <chao.gao@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Feb 4, 2024
Signed-off-by: chasingegg <chao.gao@zilliz.com>
foxspy added a commit that referenced this pull request Feb 29, 2024
* Remove omp (#276)

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>

* [cherry-pick]Pip3 install in requirements.txt order (#303)

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>

* Cherry-pick #294 #298 from main (#300)

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>

* Deprecate Invalid config checking (#304)

Signed-off-by: Li Liu <li.liu@zilliz.com>

* Fix scann range search (#316)

Signed-off-by: chasingegg <chao.gao@zilliz.com>

* Upgrade conan to 1.61.0 (#182) (#347)

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
Co-authored-by: Enwei Jiao <enwei.jiao@zilliz.com>

* raft hasrawdata return false

Signed-off-by: yusheng.ma <yusheng.ma@zilliz.com>

* switch knowhere-test branch (#384)

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>

* Ensure topk results for IVF_FLAT_CC (#353) (#383)

Signed-off-by: chasingegg <chao.gao@zilliz.com>

* make sure we rethrow exceptions in async tasks: make sure we do not crash due to uncaught exceptions when we called folly::Future::wait but not trying to get the values; use folly::collect to simplify code (#382)

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>

* [2.2 fix] wrap IVF index train/build calls in lambdas passed to knowhere thread pool, so OMP threads spawned will have low nice values (#379)

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>

* fix diskann async cache generation (#377)

Signed-off-by: xianliang <xianliang.li@zilliz.com>

* fix:miss wait thread tasks finish in diskann. (#380)

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>

* Shuffle ids for building hnsw index (#322) (#381)

Signed-off-by: chasingegg <chao.gao@zilliz.com>

* sync knowherer 2.2.4

Signed-off-by: xianliang <xianliang.li@zilliz.com>

---------

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>
Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
Signed-off-by: Li Liu <li.liu@zilliz.com>
Signed-off-by: chasingegg <chao.gao@zilliz.com>
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
Signed-off-by: yusheng.ma <yusheng.ma@zilliz.com>
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Signed-off-by: xianliang <xianliang.li@zilliz.com>
Co-authored-by: Cai Yudong <yudong.cai@zilliz.com>
Co-authored-by: cqy123456 <39671710+cqy123456@users.noreply.github.com>
Co-authored-by: liliu-z <105927039+liliu-z@users.noreply.github.com>
Co-authored-by: Gao <chao.gao@zilliz.com>
Co-authored-by: Enwei Jiao <enwei.jiao@zilliz.com>
Co-authored-by: yusheng.ma <yusheng.ma@zilliz.com>
Co-authored-by: Buqian Zheng <zhengbuqian@gmail.com>
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