Skip to content

refactor the code for index parameter parsing#126

Merged
inabao merged 16 commits into
mainfrom
refactor_param_parser
Nov 28, 2024
Merged

refactor the code for index parameter parsing#126
inabao merged 16 commits into
mainfrom
refactor_param_parser

Conversation

@inabao

@inabao inabao commented Nov 11, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
@inabao inabao self-assigned this Nov 11, 2024
@inabao inabao added the kind/improvement Optimizations, UX polish, or minor improvements 性能优化、体验打磨或细节改良 label Nov 11, 2024
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Comment thread src/factory/factory.cpp
} else {
common_param.allocator_ = DefaultAllocator::Instance().get();
if (allocator == nullptr) {
index_common_params.allocator_ = DefaultAllocator::Instance().get();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the allocator_ can change to shared_ptr ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The allocator_ may be passed in as a raw pointer from outside.

Comment thread CMakeLists.txt Outdated
Comment thread src/factory/factory.cpp Outdated
Comment thread src/factory/factory.cpp Outdated
Comment thread tests/CMakeLists.txt Outdated
Comment thread src/index/index_commom_param_test.cpp
Comment thread src/index/hnsw.cpp
Comment thread src/index/hnsw.cpp Outdated
Comment thread src/index/hgraph_zparameters.h Outdated
Comment thread src/index/hgraph_zparameters.h Outdated
Comment thread src/index/diskann_zparameters.h
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Comment thread src/index/diskann.cpp Outdated
Comment thread src/index/diskann_zparameters.h
class HGraphParameters {
public:
explicit HGraphParameters(const IndexCommonParam& common_param, const std::string& str = "");
explicit HGraphParameters(JsonType& hgraph_param, const IndexCommonParam& common_param);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Keep a consistent params sequence style:
explicit HGraphParams(const IndexCommonParam& common_param, JsonType& hgraph_param)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have refactored all the construct function of index to the style like HGraphParameters(JsonType& hgraph_param, const IndexCommonParam& common_param); to keep the same style with data_cell

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

miss commit ?

Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>

@jiaweizone jiaweizone left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@@ -31,6 +32,6 @@ class IndexCommonParam {
Allocator* allocator_{nullptr};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

public fields do not need to end with _
change in next PR

@LHT129 LHT129 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@inabao
inabao merged commit 8d96099 into main Nov 28, 2024
@inabao
inabao deleted the refactor_param_parser branch November 28, 2024 09:15
Roxanne0321 pushed a commit to Roxanne0321/vsag that referenced this pull request Mar 3, 2025
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
jiacai2050 pushed a commit to jiacai2050/vsag that referenced this pull request Mar 6, 2025
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
LHT129 pushed a commit that referenced this pull request May 11, 2026
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
Sia-Sheerland pushed a commit to Sia-Sheerland/vsag that referenced this pull request Jun 26, 2026
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: Sia Sheerland <x1075956441x@163.com>

Signed-off-by: Sia Sheerland <x1075956441x@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/improvement Optimizations, UX polish, or minor improvements 性能优化、体验打磨或细节改良 size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants