Skip to content

🌐 [translation-sync] [numba.md] numba_ex3: run the solution at the n the exercise asks for - #151

Open
mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-08-12T03-39-38-pr-601
Open

🌐 [translation-sync] [numba.md] numba_ex3: run the solution at the n the exercise asks for#151
mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-08-12T03-39-38-pr-601

Conversation

@mmcky

@mmcky mmcky commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-programming.

Source PR

#601 - [numba.md] numba_ex3: run the solution at the n the exercise asks for

Files Updated

  • ✏️ lectures/numba.md
  • ✏️ .translate/state/numba.md.yml

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI lite review requested due to automatic review settings August 12, 2026 03:39
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation ready labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-12
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other); terminology 8 below floor 9
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 8/10
Terminology 8/10
Formatting 9/10
Overall 8.5/10

Summary: The translated Exercises section is accurate, fluent, and faithfully preserves the technical and mathematical content of the source, including the intricate discussion of parallel random number generation, data races, and Numba-specific behavior. Formatting and MyST/Markdown syntax are correctly preserved with no structural errors. Minor issues include occasional translation of code-embedded strings (plot labels) and code comments, which slightly diverges from the otherwise consistent policy of keeping code artifacts in English, but these are stylistic nits rather than substantive errors. Overall this is a high quality translation of the modified section. The technical content, especially the nuanced explanations of data races, thread-safety, and Numba parallelization, is accurately and clearly conveyed in Persian. Mathematical notation and code blocks are fully preserved without corruption. The translation maintains a consistent formal academic register appropriate for technical educational content throughout the Exercises section. Complex exercise instructions and multi-step solution explanations are well-structured and readable in Persian.

Suggestions:

  • [minor · fluency] lectures/numba.md — Exercises: 'راهنمایی: سعی کنید از یک تابع تصادفی قدیمی...': The English word 'legacy' (referring to np.random.uniform as a legacy/older API) is translated as 'قدیمی' which is acceptable but loses the specific technical connotation of 'legacy API'. This is minor since 'قدیمی' conveys the general idea adequately. → Consider 'تابع تصادفی نسل قدیم (legacy)' to preserve the technical nuance, though current translation is acceptable.
  • [minor · terminology] lectures/numba.md — numba_ex_race solution: 'حالت مخصوص هر نخ (درست)' and 'تولیدکننده مشترک در prange (رقابت داده)': The plot legend labels 'per-thread state (correct)' and 'shared generator in prange (data race)' were translated inside a code cell (matplotlib label strings). While translating these strings is a reasonable choice for readability, it's inconsistent with the general policy of keeping code/technical identifiers in English, and could cause confusion if readers compare code output to text elsewhere … → Either keep these plot labels in English (as they are code-embedded strings) or ensure consistent terminology such as 'حالت اختصاصی هر نخ (درست)' and 'تولیدکننده مشترک در prange (رقابت داده)' throughout, matching the surrounding prose translations of 'data race' as 'رقابت داده'.
  • [nit · fluency] lectures/numba.md — numba_ex4 solution comments: '# برای هر مسیر نمونه' and '# شبیه‌سازی رو به جلو در زمان': Inline code comments were translated, which is a stylistic choice; while not wrong, mixing translated comments in code cells depycts a slight inconsistency with the general 'keep code in English/Latin script' policy applied elsewhere (e.g., other comments like '# Draw shocks' were left in English in earlier parts, but this section translates them). → For consistency, consider leaving code comments in English as done elsewhere in the same lecture, or ensure this is applied uniformly across all code cells in the Exercises section.

🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The translation sync correctly mirrors the source document's expanded numba_ex3 exercise/solution text and new code cells in the same positions, with no heading changes required since no headings were added or modified.


This review was generated automatically by action-translation review mode.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This translation-sync PR updates the Persian (fa) Numba lecture to match upstream changes, ensuring the numba_ex3 solution runs at the larger n value requested by the exercise (rather than reusing smaller previously-generated draws).

Changes:

  • Updated the numba_ex3 exercise narrative to emphasize that parallel speedups require sufficiently large workloads.
  • Updated the numba_ex3 solution to generate and use large random draw arrays (n = 100_000_000) for timing, and added a memory-usage note plus explicit cleanup (del) afterward.
  • Refreshed translation sync state metadata (source SHA, sync date, tool version).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lectures/numba.md Aligns the Persian lecture’s numba_ex3 exercise/solution with upstream by running the parallel solution at the exercise’s intended scale and documenting memory implications.
.translate/state/numba.md.yml Updates translation-sync tracking metadata to the new upstream source commit and tool version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit bc19e46
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/6a7beaff1b16200007d866e5
😎 Deploy Preview https://deploy-preview-151--majestic-griffin-10b166.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants