-
Notifications
You must be signed in to change notification settings - Fork 430
Py builder in store_py.cpp #1025
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @JasonZhang517, 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 initialization process for the Highlights
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a builder pattern for creating MooncakeDistributedStore instances from Python, which is a great improvement for API usability. The implementation is well-structured, adding both a C++ builder (MooncakeStoreBuilder) and a pybind11 wrapper (MooncakeStoreBuilderPy), along with corresponding tests. I have identified a critical bug in the C++ builder's error reporting, some dead code in the pybind wrapper, and a minor portability concern in the new tests. Addressing these points will enhance the code's correctness and maintainability.
mooncake-store/src/pybind_client.cpp
Outdated
| MooncakeStoreBuilder builder; | ||
| builder.WithLocalHostname(this->local_hostname) | ||
| .WithMetadataConnectionString(metadata_server) | ||
| .UsingProtocol(protocol) | ||
| .WithMasterServerEntry(master_server_addr); | ||
|
|
||
| if (device_name) { | ||
| builder.WithRdmaDeviceNames(*device_name); | ||
| } | ||
| if (transfer_engine) { | ||
| builder.WithExistingTransferEngine(transfer_engine); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| os.environ["LD_LIBRARY_PATH"] = \ | ||
| "/usr/lib/x86_64-linux-gnu:" + os.environ.get("LD_LIBRARY_PATH", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the path /usr/lib/x86_64-linux-gnu for LD_LIBRARY_PATH may reduce the portability of this test, as this path is specific to Debian-based distributions like Ubuntu. Consider making this more robust, for example by searching for libstdc++.so.6 in common system library directories, or at least adding a comment to explain why this specific path is needed for the test environment.
a9a944d to
1abf0a9
Compare
Corresponding to #978
Based on existing create method:
store.setup(
local_hostname="host1",
metadata_server="127.0.0.1:8080",
global_segment_size=1024102416,
local_buffer_size=1024102416,
protocol="tcp",
rdma_devices="",
master_server_addr="127.0.0.1:50051",
engine=None
)
Added builder functions in store_py.cpp