Skip to content
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

add Background: SGD in MPC-ML doc in Chinese #1052

Closed
wants to merge 3 commits into from

Conversation

lilxmx
Copy link
Contributor

@lilxmx lilxmx commented Mar 8, 2025

Pull Request

What problem does this PR solve?

image
image
image
image
image
image

Issue Number: Fixed #1035

Possible side effects?

  • Performance:

  • Backward compatibility:

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @lilxmx, 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!

Summary of Changes

This pull request adds a Chinese translation to the documentation for the "Background: SGD in MPC-ML" section. The changes involve translating the English text in docs/development/policy_sgd_insight.rst to Chinese in the corresponding .po files. Additionally, some references to spu_pb2 are updated to libspu in the reference documentation.

Highlights

  • Translation: Adds Chinese translation for the SGD in MPC-ML documentation.
  • Documentation Update: Updates references from spu_pb2 to libspu in the reference documentation.

Changelog

Click here to see the changelog
  • docs/locales/zh_CN/LC_MESSAGES/development.po
    • Translated "Background: SGD in MPC-ML" to Chinese.
    • Translated the explanation of SGD and its drawbacks in MPC.
    • Translated the section on improving SGD and Policy SGD.
    • Translated the experiments section, including dataset details and precision tests.
    • Translated the comparison between Naive SGD and Policy SGD.
  • docs/locales/zh_CN/LC_MESSAGES/reference.po
    • Updated POT-Creation-Date.
    • Replaced spu_pb2.ValueMeta with libspu.ValueMeta.
    • Replaced spu_pb2.ExecutableProto with libspu.ExecutableProto.
    • Replaced spu_pb2.Visibility with libspu.Visibility.
    • Replaced spu_pb2.CompilationSource and spu_pb2.CompilerOptions with libspu.CompilationSource and libspu.CompilerOptions respectively.
    • Replaced spu_pb2.ValueProto with libspu.ValueProto.
    • Replaced spu_pb2.ProtocolKind with libspu.ProtocolKind.
    • Replaced spu_pb2.FieldType with libspu.FieldType.
  • docs/locales/zh_CN/LC_MESSAGES/tutorials.po
    • Updated POT-Creation-Date.
    • Translated various sections of the quick start tutorial, including descriptions of physical nodes, device layouts, and SPU device details.
    • Translated sections on moving JAX programs to SPU, visibility inference, and logistic regression examples.
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 is currently in preview and 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 to provide feedback.

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.


Trivia time!

What does the acronym SGD stand for in the context of machine learning?

Click here for the answer
SGD stands for Stochastic Gradient Descent.

Footnotes

  1. 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.

Copy link

github-actions bot commented Mar 8, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (lilxmx)[https://github.com/lilxmx]
❌ @李国瑞
李国瑞 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 adds Chinese translations for documentation related to SGD in MPC-ML. The translations appear to be comprehensive and cover the key concepts and experimental results. However, there are a few areas where the translation could be improved for clarity and accuracy, as detailed in the review comments.

Summary of Findings

  • Inconsistent terminology: The translation uses different terms for the same concept (e.g., '轮次' and '训练周期' for 'epoch'). This inconsistency can be confusing for readers. It's important to pick one term and use it consistently throughout the document.
  • Minor grammatical issues: There are a few minor grammatical issues and awkward phrasing in the translation that could be improved to enhance readability.
  • Inaccurate translation: There are a few instances where the translation doesn't accurately reflect the meaning of the original English text. These inaccuracies need to be corrected to ensure the document's technical accuracy.

Merge Readiness

While the pull request provides a valuable translation of the documentation, the identified issues with terminology, grammar, and accuracy should be addressed before merging. Addressing these comments will improve the quality and clarity of the translated documentation. I am unable to approve this pull request, and recommend that another reviewer approves this code before merging.

@lilxmx
Copy link
Contributor Author

lilxmx commented Mar 8, 2025

Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

李国瑞 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

I have read the CLA Document and I hereby sign the CLA

@lilxmx
Copy link
Contributor Author

lilxmx commented Mar 8, 2025

I have read the CLA Document and I hereby sign the CLA

@lilxmx
Copy link
Contributor Author

lilxmx commented Mar 8, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 adds Chinese translations for the SGD in MPC-ML documentation. The translations appear to be comprehensive and cover the key aspects of the document. However, some minor improvements can be made to ensure clarity and accuracy.

Summary of Findings

  • Inconsistent terminology: The translation uses different terms for the same concept (e.g., "轮次" and "epoch"). Consistency in terminology is crucial for understanding.
  • Minor grammatical issues: Some sentences have minor grammatical issues that could be improved for better readability.
  • Inaccurate translation: Some translations are not accurate and could lead to misunderstanding.

Merge Readiness

While the pull request introduces valuable content by providing Chinese translations, there are several issues that need to be addressed before merging. I recommend that the author address the comments, particularly those of high and medium severity, to ensure the accuracy and clarity of the translation. I am unable to directly approve this pull request, and users should have others review and approve this code before merging.

msgstr ""

#: of spu.api.Runtime.run:1
msgid "Run an SPU executable."
msgstr ""

#: of spu.api.Runtime.run:4
msgid "executable (spu_pb2.ExecutableProto): executable."
msgid "executable (libspu.ExecutableProto): executable."
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The translation "executable (spu_pb2.ExecutableProto): executable." is not accurate. It should be translated to "executable (libspu.ExecutableProto): 可执行文件。"

executable (spu_pb2.ExecutableProto): executable.

Comment on lines +4634 to +4635
"source (libspu.CompilationSource): input to compiler. copts "
"(libspu.CompilerOptions): compiler options."
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The translation "source (spu_pb2.CompilationSource): input to compiler. copts (spu_pb2.CompilerOptions): compiler options." is not accurate. It should be translated to "source (libspu.CompilationSource): 编译器的输入。copts (libspu.CompilerOptions): 编译器选项。"

source (spu_pb2.CompilationSource): input to compiler. copts 
"(spu_pb2.CompilerOptions): compiler options.

@@ -4652,11 +4652,11 @@
msgstr ""

#: of spu.utils.simulation.Simulator.simple:6
msgid "prot (spu_pb2.ProtocolKind): protocol."
msgid "prot (libspu.ProtocolKind): protocol."
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The translation "prot (spu_pb2.ProtocolKind): protocol." is not accurate. It should be translated to "prot (libspu.ProtocolKind): 协议。"

prot (spu_pb2.ProtocolKind): protocol.

@lilxmx
Copy link
Contributor Author

lilxmx commented Mar 9, 2025

recheck

1 similar comment
@lilxmx
Copy link
Contributor Author

lilxmx commented Mar 9, 2025

recheck

@lilxmx lilxmx marked this pull request as draft March 11, 2025 07:25
@lilxmx lilxmx closed this Mar 11, 2025
@lilxmx lilxmx reopened this Mar 11, 2025
@lilxmx lilxmx closed this Mar 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

【文档季】【SPU】文档 [Background: SGD in MPC-ML] 翻译成中文文档
1 participant