When running pyflamegpu from a notebook, jitify compile errors are not shown to the user
I.e. all that is seen is:
FLAMEGPURuntimeException: (InvalidAgentFunc) /__w/FLAMEGPU2/FLAMEGPU2/src/flamegpu/util/detail/JitifyCache.cu(342): Error compiling runtime agent function (or function condition) ('grass_growth'): function had compilation errors (see std::cout), in JitifyCache::buildProgram().
This is not the case for running python outside of a notebook
This appears to be resolved by running a more recent version of ipython/jupyter, but a workaround is still required for collab where we cannot update this.
Todo
Notes
Locally, jupyter lab and jupyter notebook both show stdout on Ubuntu 21.04, python 3.9 with the following jupyter packages:
ipykernel 6.3.1
ipython 7.27.0
ipython-genutils 0.2.0
nbclassic 0.3.1
nbclient 0.5.4
nbconvert 6.1.0
jupyter-client 7.0.2
jupyter-core 4.7.1
jupyter-server 1.10.2
jupyterlab 3.1.10
jupyterlab-pygments 0.1.2
jupyterlab-server 2.8.0
And from About juptyer notebook:
The version of the notebook server is: 6.4.3-86f11a1
Python 3.9.5 (default, May 11 2021, 08:20:37)
[GCC 10.3.0]
Python 3.9.5 (default, May 11 2021, 08:20:37)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help.
The Innstance hub jupyter notebook is running:
ipykernel 5.5.5
ipython 7.16.1
ipython-genutils 0.2.0
ipywidgets 7.6.3
nbclient 0.5.3
nbconvert 6.0.7
nbformat 5.1.3
jupyter 1.0.0
jupyter-client 6.1.12
jupyter-console 6.4.0
jupyter-core 4.7.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.0
The version of the notebook server is: 6.4.0
The server is running on this version of Python:
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
Current Kernel Information:
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
Installing the exact versions as found on the intancehub hosted copy, the stdout being consumed can be reproduced:
python3 -m pip install ipykernel==5.5.5 ipython==7.16.1 ipython-genutils==0.2.0 ipywidgets==7.6.3 nbclient==0.5.3 nbconvert==6.0.7 nbformat==5.1.3 jupyter==1.0.0 jupyter-client==6.1.12 jupyter-console==6.4.0 jupyter-core==4.7.1 jupyterlab-pygments==0.1.2 jupyterlab-widgets==1.0.0
Colab is running the following:
ipython 5.5.0
ipython-genutils 0.2.0
ipython-sql 0.3.9
jupyter 1.0.0
jupyter-client 5.3.5
jupyter-console 5.2.0
jupyter-core 4.7.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.0
nbclient 0.5.4
nbconvert 5.6.1
nbformat 5.1.3
Installing differnt versions of ipykernel has identified 6.0.0a5 (Released: Apr 26, 2021) as the first pypi release version which fixes this issue / introduces the change. This may help find a workaround.
The closed issues for milestone 6.0 for the ipykernel project may provide some insight.
The diff between 6.0.0a4 and 6.0.0a5 can also be found: ipython/ipykernel@6.0.0a4...6.0.0a5
ipython/ipykernel#630 is the relevant PR.
When running pyflamegpu from a notebook, jitify compile errors are not shown to the user
I.e. all that is seen is:
This is not the case for running python outside of a notebook
This appears to be resolved by running a more recent version of ipython/jupyter, but a workaround is still required for collab where we cannot update this.
Todo
ipykernel >= 6.0.0a5outputs the stdout when an exception is thrownNotes
Locally,
jupyter labandjupyter notebookboth show stdout on Ubuntu 21.04, python 3.9 with the following jupyter packages:And from About juptyer notebook:
The Innstance hub jupyter notebook is running:
Installing the exact versions as found on the intancehub hosted copy, the
stdoutbeing consumed can be reproduced:Colab is running the following:
Installing differnt versions of
ipykernelhas identified6.0.0a5(Released: Apr 26, 2021) as the first pypi release version which fixes this issue / introduces the change. This may help find a workaround.The closed issues for milestone 6.0 for the ipykernel project may provide some insight.
The diff between 6.0.0a4 and 6.0.0a5 can also be found: ipython/ipykernel@6.0.0a4...6.0.0a5
ipython/ipykernel#630 is the relevant PR.