-
Notifications
You must be signed in to change notification settings - Fork 69
WIP:add session negotiating before running #687
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
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.
Summary of Changes
Hello @tyrone-yu, 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 implements a crucial session negotiation feature, enabling all participating parties in a secure multi-party computation environment to establish and agree upon a unified set of operational parameters. This ensures that complex operations like Private Set Intersection (PSI) and data streaming are executed with consistent and optimized configurations across all nodes, improving reliability and performance in distributed secure computations.
Highlights
- Session Negotiation Framework: Introduced a new Session::Negotiate() method and associated protobuf definitions (session_negotiation.proto) to allow parties in a multi-party computation (MPC) session to agree on common operational parameters.
- Dynamic PSI Configuration: The Private Set Intersection (PSI) low communication mode (low_comm_mode) is now determined through session negotiation rather than a global flag, ensuring consistent behavior across all participants.
- Streaming Options Integration: Streaming-related parameters (streaming_row_num_threshold, batch_row_num) are now part of the negotiated session options, allowing for dynamic adjustment based on collective agreement.
- Build System Updates: The MODULE.bazel.lock file has been updated to include new external dependencies, supporting the new functionalities and potentially other parts of the system.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
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 .gemini/
folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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 session negotiation mechanism to agree on parameters like PSI configurations and streaming options among parties before execution. This is a good improvement for ensuring compatibility and optimal settings. The implementation is mostly solid, with a new Negotiate()
method in the Session
class and a corresponding protobuf definition. The changes are also reflected in operators that use these configurations. I've found a few areas for improvement, including code simplification, removing redundant logic, and addressing minor issues like an unused import and a duplicated header include.
syntax = "proto3"; | ||
|
||
package scql.engine.negotiate; | ||
|
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.
这些选型,若不一致,会如何决策呀?有 pattern 吗?
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.
同步规则的基本原则是:
带宽好的迁就带宽差的
内存大的迁就内存小的
cpu 相关需要选出大家都能支持的
对于需要进入特殊分支的,需要大家的判断条件都满足才进
streaming_options_.batched = false; | ||
streaming_options_.streaming_row_num_threshold = | ||
session_opt_.streaming_options.batched = false; | ||
session_opt_.streaming_options.streaming_row_num_threshold = |
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.
可以和其他opt一样放在GenerateUpdatedSessionOptions里设置吗
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.
可以,先看看哪些 flag 要上移到 project conf,后面都挪到 GenerateUpdatedSessionOptions 初始化
No description provided.