Repository navigation
🌐 [translation-sync] bayes_nonconj: declare the truncated log-normal prior's (0, 1] support (numpyro 0.22) - #288
Conversation
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-10-05 📝 Translation Quality
Summary: The changed sections (frontmatter/preamble and the truncated log-normal prior subsection) are translated accurately and fluently, preserving all mathematical notation, code blocks, and MyST directive syntax correctly. Terminology aligns well with the glossary and established conventions. Minor stylistic nitpicks exist (slight repetition in a code comment translation) but do not impede comprehension. The addition of font-configuration code in the import cell is a deviation worth flagging for awareness, though it appears to be a standard practice for CJK rendering support rather than a translation error. The translated 'A truncated log-normal prior' section accurately preserves the mathematical description of the truncated log-normal construction (Z ~ N(μ,σ) truncated to Z ≤ 0, θ = e^Z) and the NumPyro-specific implementation details. Code comments are faithfully translated while preserving code block structure and syntax. The YAML frontmatter translation metadata block is correctly added and does not interfere with document structure, matching expected conventions. Technical terminology (截断对数正态, 支撑范围, 采样器) is consistent and correctly reflects standard statistical translation conventions. Suggestions:
🔍 Diff Quality
Summary: The translation correctly mirrors the source's code change (adding explicit support declaration to truncated_lognormal) in the same location with no structural or scope issues. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The code change matches the upstream source verbatim, the translated comment is accurate, and the state metadata is consistent.
Review effort: Balanced
Findings: None
What changed in this PR
This is an automated translation-sync PR that propagates upstream changes from the English lecture repository (QuantEcon/lecture-python.myst#1065) into the Simplified Chinese lecture lectures/bayes_nonconj.md. The upstream fix declares the truncated log-normal prior's (0, 1] support explicitly (for numpyro 0.22) so the sampler no longer proposes θ > 1. This keeps the zh-cn lectures faithful to the upstream English source.
Changes:
- Wraps the truncated log-normal in a
_UnitLogNormal(TransformedDistribution)subclass declaringsupport = dist.constraints.interval(0.0, 1.0), with a translated explanatory comment. - Bumps the
jupytext_versionin the notebook front matter from 1.16.4 to 1.17.2. - Updates the translation state file (
source-sha,synced-at,mode,tool-version).
| File | Description |
|---|---|
lectures/bayes_nonconj.md |
Adds the _UnitLogNormal support declaration (verbatim from source) with an accurately translated comment, and updates the jupytext version. |
.translate/state/bayes_nonconj.md.yml |
Updates translation sync metadata (source SHA, sync date, mode, tool version) to reflect this sync. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python.myst.
Source PR
[#1065 - bayes_nonconj: declare the truncated log-normal prior's (0, 1] support (numpyro 0.22)](QuantEcon/lecture-python.myst#1065)
Files Updated
lectures/bayes_nonconj.md.translate/state/bayes_nonconj.md.ymlDetails
This PR was created automatically by the translation action.