refactor(pyramid): modify default value of pyramid thread pool#1595
refactor(pyramid): modify default value of pyramid thread pool#1595
Conversation
Summary of ChangesHello @inabao, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the pyramid algorithm's parameter handling by adjusting the default thread pool size and improving the initialization process for pyramid parameters. The primary impact is a change in the default concurrency for pyramid building and a more robust parameter loading mechanism, ensuring all necessary parameters are correctly parsed from JSON. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces two beneficial changes to the Pyramid index. It adjusts the default build thread count from 16 to 1, which is a more sensible and safer default, consistent with other index types. More importantly, it rectifies a significant bug in PyramidParameters::FromJson by ensuring the base class's FromJson method is called. This fix is crucial for correctness, as it enables user-defined parameters from InnerIndexParameter (such as build_thread_count) to be properly configured via JSON. I've added one comment regarding an opportunity to further improve parameter propagation. Overall, these changes enhance the robustness and configurability of the Pyramid index.
| } | ||
| }, | ||
| "{BUILD_THREAD_COUNT_KEY}": 16, | ||
| "{BUILD_THREAD_COUNT_KEY}": 1, |
There was a problem hiding this comment.
While changing this default to 1 is a good step for a safer default, this change highlights a more significant issue. The build_thread_count value is hardcoded here. This means that any user-configured build_thread_count (which is now correctly parsed thanks to the other change in this PR) will be ignored for the internal HGraph index used by Pyramid. The index will always be built with 1 thread, regardless of configuration.
To properly respect user settings, the build_thread_count from PyramidParameters should be propagated here. This likely involves changing this template to use a placeholder for the value (e.g., {BUILD_THREAD_COUNT_VALUE}) and updating Pyramid::CheckAndMappingExternalParam to substitute it with the configured value.
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #1595 +/- ##
==========================================
+ Coverage 90.46% 91.05% +0.58%
==========================================
Files 329 329
Lines 19469 19475 +6
==========================================
+ Hits 17613 17732 +119
+ Misses 1856 1743 -113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
4337431 to
8faa1b4
Compare
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
No description provided.