Skip to content

Models cannot be compiled from within a jupyter lab notebook #885

@johann-petrak

Description

@johann-petrak

I tried to use orbit models from within a jupyter lab notebook and I get the following error:

ValueError: Failed to compile Stan model '[/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt.stan](http://localhost:8888/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt.stan)'. Console:
make: *** No rule to make target '[/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt](http://localhost:8888/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt)'. Stop.

Command ['make', 'STANCFLAGS+=--filename-in-msg=lgt.stan', '[/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt](http://localhost:8888/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/stan/lgt)']
	error during processing No such file or directory

It seems that when running in a notebook, orbit uses a markdown link instead of the actual file path in the make command for compiling the model. Since this is a situation that should be easy to detect, it should also be easy to fix and avoid.

  • OS: Ubuntu 24.04
  • Python Version: 3.11.13
  • orbit 1.1.4.9
  • cmdstanpy 1.2.5
  • jupyter 1.1.1
  • jupyterlab 4.4.3
  • jupyter_server 2.16.0
  • jupyterlab_server 2.27.3
  • notebook 7.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions