Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCMC sampling messages not displayed in JupyterLab #559

Open
syu-id opened this issue Sep 15, 2018 · 1 comment
Open

MCMC sampling messages not displayed in JupyterLab #559

syu-id opened this issue Sep 15, 2018 · 1 comment

Comments

@syu-id
Copy link

syu-id commented Sep 15, 2018

Summary:

MCMC sampling progress messages are not displayed in JupyterLab or Jupyter Notebook.
Although the issue is actually caused by Jupyter, redirecting the stdout messages of Stan to the R streams could be a workaround solution.

Description:

Currently Jupyter does not capture OS-level output, this problem is not fixed for 2 years (see IRkernel/IRkernel#416 and jupyter/enhancement-proposals#14). As a consequence, the MCMC sampling messages of Stan are not shown in JupyterLab or Jupyter Notebook.

It is suggested that redirecting the stdout messages to the R streams could solve the problem (see IRkernel/IRkernel#584).

Update:

Sampling messages are displayed when mc.cores = 1 .

Reproducible Steps:

Run any model

Current Output:

No output

Expected Output:

Something like this:

SAMPLING FOR MODEL 'x' NOW (CHAIN 1).

Iteration:     1 / 50500 [  0%]  (Warmup)
Iteration:   501 / 50500 [  0%]  (Sampling)
Iteration:  5550 / 50500 [ 10%]  (Sampling)
Iteration: 10600 / 50500 [ 20%]  (Sampling)
Iteration: 15650 / 50500 [ 30%]  (Sampling)
Iteration: 20700 / 50500 [ 40%]  (Sampling)
Iteration: 25750 / 50500 [ 50%]  (Sampling)
Iteration: 30800 / 50500 [ 60%]  (Sampling)
Iteration: 35850 / 50500 [ 70%]  (Sampling)
Iteration: 40900 / 50500 [ 80%]  (Sampling)
Iteration: 45950 / 50500 [ 90%]  (Sampling)
Iteration: 50500 / 50500 [100%]  (Sampling)

 Elapsed Time: 0.00354 seconds (Warm-up)
               0.273752 seconds (Sampling)
               0.277292 seconds (Total)

RStan Version:

2.17.3

R Version:

R version 3.5.1 (2018-07-02)

Operating System:

Ubuntu 18.04.1

@aakhmetz
Copy link

pystan updates the output - it would be great to have the same for rstan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants