Models cannot be compiled from within a jupyter lab notebook

Open
#885 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter, python

Research direction

Reproduce the failure in a JupyterLab notebook using the reported Ubuntu, Python, orbit, and cmdstanpy versions. Trace the model compilation entry point and inspect the path passed to make in notebook execution versus regular Python execution. Done means the notebook passes the actual Stan model path and compilation succeeds.

Written by the indexing model from the issue text.

Description

bug

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
Dominant language
Python
Stars
2.1k
Forks
147
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uber/orbit

All issues in uber/orbit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.