Skip to content

Commit

Permalink
* add translations for API reference entries
Browse files Browse the repository at this point in the history
* add translation for visualization API
  • Loading branch information
chenghuzi committed Feb 5, 2021
1 parent 7c25571 commit bea2542
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 48 deletions.
53 changes: 27 additions & 26 deletions source/locale/zh_CN/LC_MESSAGES/reference/integration.po
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ msgstr ""

#: ../../source/reference/integration.rst:26:<autosummary>:1
msgid "AllenNLP extension to use optuna with Jsonnet config file."
msgstr ""
msgstr "为了让 Jsonnet 配置文件在 Optuna 中可用的 AllenNLP 扩展。"

#: ../../source/reference/integration.rst:26:<autosummary>:1
msgid ""
Expand All @@ -93,7 +93,7 @@ msgstr ""
msgid ""
"Save JSON config file after updating with parameters from the best trial "
"in the study."
msgstr ""
msgstr "保存 study 中最佳 trial 的参数更新到 JSON 配置文件。"

#: ../../source/reference/integration.rst:26:<autosummary>:1
msgid ""
Expand All @@ -103,7 +103,7 @@ msgstr ""

#: ../../source/reference/integration.rst:26:<autosummary>:1
msgid "AllenNLP callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 AllenNLP 回调函数。"

#: ../../source/reference/integration.rst:28
msgid "BoTorch"
Expand All @@ -119,14 +119,15 @@ msgstr ""
msgid ""
"A sampler that uses BoTorch, a Bayesian optimization library built on top"
" of PyTorch."
msgstr ""
msgstr "采用 BoTorch 的采样器。BoTorch 是一个建立在 PyTorch 上的贝叶斯优化库。"

#: ../../source/reference/integration.rst:38:<autosummary>:1
msgid ""
":obj:`optuna.integration.botorch.qei_candidates_func "
"<optuna.integration.botorch.qei_candidates_func>`"
msgstr ""

# TODO: maybe we should not translate these terminology parts
#: ../../source/reference/integration.rst:38:<autosummary>:1
msgid "Quasi MC-based batch Expected Improvement (qEI)."
msgstr ""
Expand Down Expand Up @@ -165,7 +166,7 @@ msgstr ""

#: ../../source/reference/integration.rst:47:<autosummary>:1
msgid "Catalyst callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 Catalyst 回调。"

#: ../../source/reference/integration.rst:49
msgid "Chainer"
Expand All @@ -179,7 +180,7 @@ msgstr ""

#: ../../source/reference/integration.rst:57:<autosummary>:1
msgid "Chainer extension to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 Chainer 扩展。"

#: ../../source/reference/integration.rst:57:<autosummary>:1
msgid ""
Expand All @@ -191,7 +192,7 @@ msgstr ""
msgid ""
"A wrapper of :class:`~optuna.study.Study` to incorporate Optuna with "
"ChainerMN."
msgstr ""
msgstr "一个将 Optuna 并入 CHainerMN 的 :class:`~optuna.study.Study` wrapper."

#: ../../source/reference/integration.rst:59
msgid "fast.ai"
Expand All @@ -205,7 +206,7 @@ msgstr ""

#: ../../source/reference/integration.rst:68:<autosummary>:1
msgid "FastAI callback to prune unpromising trials for fastai."
msgstr ""
msgstr "用于清除 FastAI 中无望 trial 的回调函数。"

#: ../../source/reference/integration.rst:68:<autosummary>:1
msgid ""
Expand Down Expand Up @@ -235,7 +236,7 @@ msgstr ""

#: ../../source/reference/integration.rst:77:<autosummary>:1
msgid "Keras callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 Keras 回调函数。"

#: ../../source/reference/integration.rst:79
msgid "LightGBM"
Expand All @@ -249,7 +250,7 @@ msgstr ""

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid "Callback for LightGBM to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 LightGBM 回调函数。"

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid ""
Expand All @@ -259,7 +260,7 @@ msgstr ""

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid "Wrapper of LightGBM Training API to tune hyperparameters."
msgstr ""
msgstr "用于超参数调参的 LightGBM training API 的 wrapper."

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid ""
Expand All @@ -269,7 +270,7 @@ msgstr ""

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid "Hyperparameter tuner for LightGBM."
msgstr ""
msgstr "用于 LightGBM 的超参数调参器。"

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid ""
Expand All @@ -279,7 +280,7 @@ msgstr ""

#: ../../source/reference/integration.rst:89:<autosummary>:1
msgid "Hyperparameter tuner for LightGBM with cross-validation."
msgstr ""
msgstr "带有交叉验证的、用于 LightGBM 的超参数调参器。"

#: ../../source/reference/integration.rst:91
msgid "MLflow"
Expand All @@ -293,7 +294,7 @@ msgstr ""

#: ../../source/reference/integration.rst:98:<autosummary>:1
msgid "Callback to track Optuna trials with MLflow."
msgstr ""
msgstr "用 MLflow 来追踪 Optuna trial 的回调函数。"

#: ../../source/reference/integration.rst:100
msgid "MXNet"
Expand All @@ -307,7 +308,7 @@ msgstr ""

#: ../../source/reference/integration.rst:107:<autosummary>:1
msgid "MXNet callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 MXNet 回调函数。"

#: ../../source/reference/integration.rst:109
msgid "pycma"
Expand All @@ -319,15 +320,15 @@ msgstr ""

#: ../../source/reference/integration.rst:117:<autosummary>:1
msgid "A Sampler using cma library as the backend."
msgstr ""
msgstr "使用 cma 库作为后端的采样器。"

#: ../../source/reference/integration.rst:117:<autosummary>:1
msgid ":obj:`optuna.integration.CmaEsSampler <optuna.integration.CmaEsSampler>`"
msgstr ""

#: ../../source/reference/integration.rst:117:<autosummary>:1
msgid "Wrapper class of PyCmaSampler for backward compatibility."
msgstr ""
msgstr "用于向后兼容的 PyCmaSampler wrapper 类。"

#: ../../source/reference/integration.rst:119
msgid "PyTorch"
Expand All @@ -341,7 +342,7 @@ msgstr ""

#: ../../source/reference/integration.rst:127:<autosummary>:1
msgid "PyTorch Ignite handler to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 PyTorch Ignite handler。"

#: ../../source/reference/integration.rst:127:<autosummary>:1
msgid ""
Expand All @@ -351,7 +352,7 @@ msgstr ""

#: ../../source/reference/integration.rst:127:<autosummary>:1
msgid "PyTorch Lightning callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 PyTorch Lighting 回调函数。"

#: ../../source/reference/integration.rst:129
msgid "scikit-learn"
Expand All @@ -365,7 +366,7 @@ msgstr ""

#: ../../source/reference/integration.rst:136:<autosummary>:1
msgid "Hyperparameter search with cross-validation."
msgstr ""
msgstr "带有交叉验证的超参数搜索。"

#: ../../source/reference/integration.rst:138
msgid "scikit-optimize"
Expand All @@ -377,7 +378,7 @@ msgstr ""

#: ../../source/reference/integration.rst:145:<autosummary>:1
msgid "Sampler using Scikit-Optimize as the backend."
msgstr ""
msgstr "以 Scikit-Optimize 为后端的 sampler。"

#: ../../source/reference/integration.rst:147
msgid "skorch"
Expand All @@ -391,7 +392,7 @@ msgstr ""

#: ../../source/reference/integration.rst:154:<autosummary>:1
msgid "Skorch callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 Skorch 回调函数。"

#: ../../source/reference/integration.rst:156
msgid "TensorFlow"
Expand All @@ -405,7 +406,7 @@ msgstr ""

#: ../../source/reference/integration.rst:165:<autosummary>:1
msgid "Callback to track Optuna trials with TensorBoard."
msgstr ""
msgstr "使用 TensorBoard 追踪 Optuna trial 的回调函数。"

#: ../../source/reference/integration.rst:165:<autosummary>:1
msgid ""
Expand All @@ -415,7 +416,7 @@ msgstr ""

#: ../../source/reference/integration.rst:165:<autosummary>:1
msgid "TensorFlow SessionRunHook to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 TensorFlow SessionRunHook 钩子函数。"

#: ../../source/reference/integration.rst:165:<autosummary>:1
msgid ""
Expand All @@ -425,7 +426,7 @@ msgstr ""

#: ../../source/reference/integration.rst:165:<autosummary>:1
msgid "tf.keras callback to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 tf.keras 回调函数。"

#: ../../source/reference/integration.rst:167
msgid "XGBoost"
Expand All @@ -439,7 +440,7 @@ msgstr ""

#: ../../source/reference/integration.rst:173:<autosummary>:1
msgid "Callback for XGBoost to prune unpromising trials."
msgstr ""
msgstr "用于清除无望 trial 的 XGBoost 回调函数。"

#~ msgid "Parameters"
#~ msgstr ""
Expand Down
26 changes: 14 additions & 12 deletions source/locale/zh_CN/LC_MESSAGES/reference/structs.po
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ msgid ""
"removal of this feature is currently scheduled for v3.0.0, but this "
"schedule is subject to change. See "
"https://github.com/optuna/optuna/releases/tag/v1.4.0."
msgstr ""
msgstr "在 v1.4.0 中被弃用。该特性将在未来被移除。目前我们计划在 v3.0.0 中移除它,但也可能会改变。参见 "
"https://github.com/optuna/optuna/releases/tag/v1.4.0."

#: of optuna.structs.FrozenTrial:7
msgid ""
Expand All @@ -95,11 +96,11 @@ msgstr "该类已经迁移至 :mod:`~optuna.trial`, 请改用 :class:`~optuna.tr

#: of optuna.structs.FrozenTrial.distributions:1
msgid "Dictionary that contains the distributions of :attr:`params`."
msgstr ""
msgstr "包含了 :attr:`params` 分布的字典。"

#: of optuna.structs.FrozenTrial.duration:1
msgid "Return the elapsed time taken to complete the trial."
msgstr ""
msgstr "返回完成一个 trial 所消耗的时间。"

#: of optuna.structs.FrozenTrial.duration optuna.structs.FrozenTrial.last_step
#: optuna.structs.FrozenTrial.should_prune
Expand All @@ -108,19 +109,19 @@ msgstr ""

#: of optuna.structs.FrozenTrial.duration:3
msgid "The duration."
msgstr ""
msgstr "消耗的时间。"

#: of optuna.structs.FrozenTrial.last_step:1
msgid "Return the maximum step of `intermediate_values` in the trial."
msgstr ""
msgstr "返回 trial 中 `intermediate_values` 的最大步数。"

#: of optuna.structs.FrozenTrial.last_step:3
msgid "The maximum step of intermediates."
msgstr ""
msgstr "`intermediate_values` 的最大步数。"

#: of optuna.structs.FrozenTrial.report:1
msgid "Interface of report function."
msgstr ""
msgstr "report 函数接口。"

#: of optuna.structs.FrozenTrial.report:3
msgid ""
Expand All @@ -138,29 +139,30 @@ msgstr ""

#: of optuna.structs.FrozenTrial.report:9
msgid "A value returned from the objective function."
msgstr ""
msgstr "目标函数返回的值。"

#: of optuna.structs.FrozenTrial.report:10
msgid ""
"Step of the trial (e.g., Epoch of neural network training). Note that "
"pruners assume that ``step`` starts at zero. For example, "
":class:`~optuna.pruners.MedianPruner` simply checks if ``step`` is less "
"than ``n_warmup_steps`` as the warmup mechanism."
msgstr ""
msgstr "Trial 的步骤(比如,神经网络训练中的 epoch 数)。注意,pruners 假定 ``step`` "
"从零开始计算。比如 :class:`~optuna.pruners.MedianPruner` 将仅检查 ``step`` 是否小于 ``n_warmup_steps`` 作为热身机制。"

#: of optuna.structs.FrozenTrial.should_prune:1
msgid "Suggest whether the trial should be pruned or not."
msgstr ""
msgstr "建议该 trial 是否应该被剪枝。"

#: of optuna.structs.FrozenTrial.should_prune:3
msgid "The suggestion is always :obj:`False` regardless of a pruning algorithm."
msgstr ""
msgstr "无论剪枝算法是什么,建议值永远是 :obj:`False`."

#: of optuna.structs.FrozenTrial.should_prune:6
msgid ""
":class:`~optuna.trial.FrozenTrial` only samples one combination of "
"parameters."
msgstr ""
msgstr ":class:`~optuna.trial.FrozenTrial` 只对参数组合进行一次采样。"

#: of optuna.structs.FrozenTrial.should_prune:8
msgid ":obj:`False`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ msgid ""
msgstr ""

#: ../../source/reference/visualization/index.rst:29:<autosummary>:1
#, fuzzy
msgid "Plot the Pareto front of a study."
msgstr "将study中的参数关系绘制成切片图。"
msgstr "绘制 study 的帕累托前沿面。"

#: ../../source/reference/visualization/index.rst:29:<autosummary>:1
msgid ":obj:`optuna.visualization.plot_slice <optuna.visualization.plot_slice>`"
Expand Down

0 comments on commit bea2542

Please sign in to comment.