Issue with current documentation:
Description
While following the usage_overview.rst documentation, I encountered two issues:
- The sampling example is confusing and differs from the official tutorial.
- The code raises a RuntimeError on Windows systems.
- There are broken Links in Documentation.
Problem 1: Confusing Sampling Example
In the documentation, the sampling is written as:
idata = pm.sample(1000, tune=2000, cores=2)
However, in the top recommended Youtube tutorial by Chris Fonnesbeck titled "Getting Started with PyMC" Youtube it is stated that sampling is mostly automatic and can be done simply with: pm.sample() without any arguments. This discrepancy can confuse beginners.
Problem 2: RuntimeError on Windows
Running the given example raises:
RuntimeError:
An attempt has been made to start a new process before the current process has finished its bootstrapping phase
Problem 3: Broken Links in Documentation
The "See also" section contains links such as:
However, clicking on these leads to a 404 error:
docs/source/learn/nb_tutorials/index.html
This suggests that the links are either outdated or incorrectly referenced.
Overall this section seems to be very confusing for beginners on a windows system.
Idea or request for content:
Summary
I prepared an alternative, clearer example for the usage_overview.rst page (same model as in the official tutorial). This PR will add the example as a separate folder rather than editing the existing file. I chose a new folder so the example can ship as:
- a runnable
.py example file,
- a
About_model.md (with plain text explanation),
- images for equations/figures (so equations render the same across viewers),
- and separate test/run instructions.
I used the guidance from Chris Fonnesbeck’s video (https://www.youtube.com/watch?v=jrU0UBr2z3k&t=1770s) which shows pm.sample() can be used with automatic defaults. I also encountered a Windows RuntimeError from multiprocessing and noticed several broken links in the docs (screenshots attached).
Problems found
-
Sampling example mismatch / clarity
- The docs use explicit arguments (e.g.
pm.sample(1000, tune=2000, cores=2)), while the tutorial suggests sampling is mostly automatic (pm.sample()).
- This confuses beginners — suggestion: show the simple default example and show that it runs correctly.
-
RuntimeError on Windows
- Running the example raises:
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase
- Likely caused by using multiprocessing (e.g.
cores>1) without protecting the sample call or without guidance for Windows users.
- Suggested fixes: either wrap example usage in
if __name__ == "__main__":, set cores=1 in docs for Windows, or add a short note about Windows multiprocessing.
-
Broken links
- Several “See also” links point to
docs/source/learn/nb_tutorials/index.html and return 404. (Screenshot attached.)
- Suggestion: update/remove links or point to correct pages.
Why a separate folder?
I created a separate folder because it lets me include:
- a clean, runnable
.py example (so users can copy-paste and run without editing rst code blocks),
about_model.md that explains how to run it,
- high-quality images for equations (so they look consistent),
- and additional plotting examples (I plan to add more
az plots later).
If you prefer not to add a parallel folder, I can convert this to modifications of the existing .rst instead — please advise which you prefer.
What I can do next
- I can open a Draft PR with the folder (incomplete links are noted in the PR) so maintainers can review structure first.
- I can alternatively modify the existing
usage_overview.rst if you prefer minimal changes.
- I can include a Windows note and update examples to avoid the
RuntimeError.
- I can add more
az plots in follow-up PRs.
Request
Please advise:
- Do you prefer an in-place edit of
usage_overview.rst or adding the separate folder as an alternative example?
- If a new folder is acceptable, should I:
- keep both (original + alternative), or
- replace the existing example with the clearer version?
I plan to open a Draft PR
with a proposed structure for review. (and will mark it “Closes #<issue_number>” once the maintainers ask me to). Thanks!
Issue with current documentation:
Description
While following the
usage_overview.rstdocumentation, I encountered two issues:Problem 1: Confusing Sampling Example
In the documentation, the sampling is written as:
However, in the top recommended Youtube tutorial by Chris Fonnesbeck titled "Getting Started with PyMC" Youtube it is stated that sampling is mostly automatic and can be done simply with: pm.sample() without any arguments. This discrepancy can confuse beginners.
Problem 2: RuntimeError on Windows
Running the given example raises:
Problem 3: Broken Links in Documentation
The "See also" section contains links such as:
However, clicking on these leads to a 404 error:
docs/source/learn/nb_tutorials/index.html
This suggests that the links are either outdated or incorrectly referenced.
Overall this section seems to be very confusing for beginners on a windows system.
Idea or request for content:
Summary
I prepared an alternative, clearer example for the
usage_overview.rstpage (same model as in the official tutorial). This PR will add the example as a separate folder rather than editing the existing file. I chose a new folder so the example can ship as:.pyexample file,About_model.md(with plain text explanation),I used the guidance from Chris Fonnesbeck’s video (https://www.youtube.com/watch?v=jrU0UBr2z3k&t=1770s) which shows
pm.sample()can be used with automatic defaults. I also encountered a WindowsRuntimeErrorfrom multiprocessing and noticed several broken links in the docs (screenshots attached).Problems found
Sampling example mismatch / clarity
pm.sample(1000, tune=2000, cores=2)), while the tutorial suggests sampling is mostly automatic (pm.sample()).RuntimeError on Windows
cores>1) without protecting the sample call or without guidance for Windows users.if __name__ == "__main__":, setcores=1in docs for Windows, or add a short note about Windows multiprocessing.Broken links
docs/source/learn/nb_tutorials/index.htmland return 404. (Screenshot attached.)Why a separate folder?
I created a separate folder because it lets me include:
.pyexample (so users can copy-paste and run without editingrstcode blocks),about_model.mdthat explains how to run it,azplots later).If you prefer not to add a parallel folder, I can convert this to modifications of the existing
.rstinstead — please advise which you prefer.What I can do next
usage_overview.rstif you prefer minimal changes.RuntimeError.azplots in follow-up PRs.Request
Please advise:
usage_overview.rstor adding the separate folder as an alternative example?I plan to open a Draft PR
with a proposed structure for review. (and will mark it “Closes #<issue_number>” once the maintainers ask me to). Thanks!