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

fit.summary() not working in jupyter notebooks #744

Open
filippoferrari opened this issue Apr 8, 2024 · 8 comments
Open

fit.summary() not working in jupyter notebooks #744

filippoferrari opened this issue Apr 8, 2024 · 8 comments

Comments

@filippoferrari
Copy link

Summary:

fit.summary() crashes when run in a jupyter notebook.

Description:

fit.summary() and fit.diagnose() don't work when following the Hello World tutorial in a jupyter notebook.

The tutorial works fine when run as a python file.

Additional Information:

Error RuntimeError: Command ['/Users/ff/.cmdstan/cmdstan-2.34.1/bin/diagnose', '/var/folders/2r/tmwm99ns51qfspk50vj23snh0000gn/T/tmpvoigfpsl/bernoulliomselojt/bernoulli-20240408175756_1.csv', '/var/folders/2r/tmwm99ns51qfspk50vj23snh0000gn/T/tmpvoigfpsl/bernoulliomselojt/bernoulli-20240408175756_2.csv', '/var/folders/2r/tmwm99ns51qfspk50vj23snh0000gn/T/tmpvoigfpsl/bernoulliomselojt/bernoulli-20240408175756_3.csv', '/var/folders/2r/tmwm99ns51qfspk50vj23snh0000gn/T/tmpvoigfpsl/bernoulliomselojt/bernoulli-20240408175756_4.csv'] terminated by signal 6 Unknown error: -6

Current Version:

INSTALLED VERSIONS
---------------------
python: 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:54:21) [Clang 16.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 23.4.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
cmdstan_folder: /Users/ff/.cmdstan/cmdstan-2.34.1
cmdstan: (2, 34)
cmdstanpy: 1.2.2
pandas: 2.2.1
xarray: 2024.3.0
tqdm: 4.66.2
numpy: 1.26.4
@WardBrian
Copy link
Member

WardBrian commented Apr 8, 2024

I wonder if this has something to do with one being run under ARM and one under x86

Did you install cmdstan with conda or with install_cmdstan?

@filippoferrari
Copy link
Author

It was through conda - it's quite weird because, when I run the notebook, all the processes in the activity monitor are ARM.

I tried to run install_cmdstan from a notebook and it fails, while it works fine through repl in the terminal.

@WardBrian
Copy link
Member

Are all the processes in ARM when run from the terminal as well?

@filippoferrari
Copy link
Author

From what I can see yes - unless they're so quick that they won't show in the activity monitor

@WardBrian
Copy link
Member

From the jupyter notebook, can you try running the commands directly? Even just !/Users/ff/.cmdstan/cmdstan-2.34.1/bin/diagnose --help might be helpful to see the output of

@filippoferrari
Copy link
Author

Hi Brian,
Apologies for the slow reply.
!/Users/ff/.cmdstan/cmdstan-2.34.1/bin/diagnose --help returns zsh:1: no such file or directory: /Users/ff/.cmdstan/cmdstan-2.34.1/bin/diagnose both from jupyter and command line.
The example notebook still runs though.

This is the content of

> ls /Users/ff/.cmdstan/cmdstan-2.34.1/bin/

linux-stanc   mac-stanc     stanc         windows-stanc

@WardBrian
Copy link
Member

Very odd that those files are now missing - it sounds similar to some sporadic issues we've heard with code signing: https://discourse.mc-stan.org/t/cmdstanpy-reduce-sum-doesnt-produce-executable/33637/14

This seems to be an OS issue for the newer macs where sometimes they think an executable is invalid and delete it.

@filippoferrari
Copy link
Author

Thank you, I wasn't aware of this issue. When I get some time I'll see if other installation methods would fix this

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