Open ptheywood opened 3 years ago
Older ipython versions will also consume any stdout
output from flamegpu, i.e. --timing
or --verbose
output.
Updating ipykernel
on colab does work, but requires a kernel restart. Pip also complains due to package incompatibility but it does work. This seems like a very sketchy solution though.
!python -m pip install ipykernel==6.0.0
Runtime > Restart Runtime
(or ctrl + M .
), then Yes
. Variables are then lost, so most cells wil need re-running.
Decisions:
This issues is still present, with google collab still running ipykernel 5.3.4
import ipykernel
print(ipykernel.__version__)
5.3.4
I opened an issue about this / requesting an update with googlecollab at the time: https://github.com/googlecolab/colabtools/issues/2230
Logs can be viewed by Runtime -> view runtime logs
(https://github.com/FLAMEGPU/FLAMEGPU2/discussions/1020#discussioncomment-4410748). We should probably add this to the text.
We could potentially ammend the error message in python land if running in jupyter too, if detection and ipython version detection is possible?
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.0a5
outputs the stdout when an exception is thrownNotes
Locally,
jupyter lab
andjupyter notebook
both 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
stdout
being consumed can be reproduced:Colab is running the following:
Installing differnt versions of
ipykernel
has 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: https://github.com/ipython/ipykernel/compare/6.0.0a4...6.0.0a5
https://github.com/ipython/ipykernel/pull/630 is the relevant PR.