You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling pyMC SMC sampling from RStudio with multiple chains, the new Rich progress bars fill the Console and the Rmarkdown output with chains lines every 0.1 seconds, eventually flooding the console and slowing down RStudio to a crawl.
This is because RStudio console output does not implement cursor movement ANSI control sequences used by Rich multi-progress bars.
importpymcaspm# Run this via a Python chunk in Rstudio with reticulatedefmain():
withpm.Model() asmodel:
x=pm.Normal("x", mu=0, sigma=1)
y=pm.Normal("y", mu=x, sigma=0.001, observed=2)
withmodel:
trace=pm.sample_smc(draws=1000, chains=12, cores=1, progressbar=False)
if__name__=="__main__":
main()
Error message:
No error message. See the screenshot.
PyMC version information:
- PyMC 5.16.1, installed via Conda
- Pytensor 2.23.0 (but not important)
- macOS 14.5 Catalina, and also reproduced on Windows Server 2022
- rich 13.7.1 (relevant!)
Context for the issue:
This ruins every call to PyMC SMC sampler with progress bars from RStudio, and hence the use of SMC Sampler by R-heavy biostatisticians.
Turning off the progressbar would work, but then would give no visibility as to how the algorithm is progressing.
I'm submitting a PR in a minute to fix this :)
The text was updated successfully, but these errors were encountered:
Describe the issue:
When calling pyMC SMC sampling from RStudio with multiple chains, the new Rich progress bars fill the Console and the Rmarkdown output with
chains
lines every 0.1 seconds, eventually flooding the console and slowing down RStudio to a crawl.This is because RStudio console output does not implement cursor movement ANSI control sequences used by Rich multi-progress bars.
See rstudio/reticulate#1632 and rstudio/rstudio#14942
Reproduceable code example:
Error message:
PyMC version information:
Context for the issue:
This ruins every call to PyMC SMC sampler with progress bars from RStudio, and hence the use of SMC Sampler by R-heavy biostatisticians.
Turning off the progressbar would work, but then would give no visibility as to how the algorithm is progressing.
I'm submitting a PR in a minute to fix this :)
The text was updated successfully, but these errors were encountered: