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

Problem with "scene.preview()" #106

Closed
StrongWeiUMN opened this issue Mar 23, 2023 · 7 comments
Closed

Problem with "scene.preview()" #106

StrongWeiUMN opened this issue Mar 23, 2023 · 7 comments

Comments

@StrongWeiUMN
Copy link

StrongWeiUMN commented Mar 23, 2023

Dear Sionna community,

First of all, thank you for providing this helpful tool.

I am currently running Sionna_Ray_Tracing_Tutorial in the Jupyter Lab environment. I faced some problems:

  1. The Tensorflow installed via pip install sionna cannot detect any GPU, while directly running pip install tensorflow works. So I have to manually re-install the TensorFlow after installing the Sionna.
    my GPU Driver Version: 512.78 CUDA Version: 11.6

  2. scene.preview() will raise error:

[Open Browser Console for more detailed log - Double click to close this message]
Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated
TypeError: Cannot read properties of undefined (reading 'then')
    at http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.75bff6c5b3e16e2f7d65.js?v=75bff6c5b3e16e2f7d65:1:32057
    at async Promise.all (index 20)
    at async f._make_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.267f129ae5fd6a33b390.js?v=267f129ae5fd6a33b390:1:7925)

The following is the jupyter information:

jupyter-client            8.1.0                    pypi_0    pypi
jupyter-core              5.3.0                    pypi_0    pypi
jupyter-events            0.6.3                    pypi_0    pypi
jupyter-server            2.5.0                    pypi_0    pypi
jupyter-server-fileid     0.8.0                    pypi_0    pypi
jupyter-server-terminals  0.4.4                    pypi_0    pypi
jupyter-server-ydoc       0.8.0                    pypi_0    pypi
jupyter-ydoc              0.2.3                    pypi_0    pypi
jupyterlab                3.6.2                    pypi_0    pypi
jupyterlab-pygments       0.2.2                    pypi_0    pypi
jupyterlab-server         2.21.0                   pypi_0    pypi
jupyterlab-widgets        3.0.6                    pypi_0    pypi

Do you have any ideas on how to solve it?

Thanks a lot!

@gmarcusm
Copy link
Collaborator

gmarcusm commented Mar 23, 2023 via email

@StrongWeiUMN
Copy link
Author

StrongWeiUMN commented Mar 24, 2023

Platform: Linux and Windows
Tensorflow via pip install sionna: 2.11 (cannot detect gpu)
Tensorflow via conda install tensorflow-gpu: 2.6 (works for gpu)

The TensorFlow environment after running pip install sionna and conda install tensorflow-gpu:

tensorboard               2.11.2                   pypi_0    pypi
tensorboard-data-server   0.6.1            py39haa95532_0
tensorboard-plugin-wit    1.8.1            py39haa95532_0
tensorflow                2.6.0           gpu_py39he88c5ba_0
tensorflow-base           2.6.0           gpu_py39hb3da07e_0
tensorflow-estimator      2.11.0                   pypi_0    pypi
tensorflow-gpu            2.6.0                h17022bd_0
tensorflow-intel          2.11.1                   pypi_0    pypi
tensorflow-io-gcs-filesystem 0.31.0                   pypi_0    pypi
cudatoolkit               11.3.1               h59b6b97_2
cudnn                     8.2.1                cuda11.3_0

Do you know what is the reason for the "scene.preview()" listed above?

Thank you!

@merlinND
Copy link
Collaborator

merlinND commented Mar 27, 2023

Hello @StrongWeiUMN,

Could you please try upgrading the following modules to the latest versions?

python3 -m pip install --upgrade jupyterlab ipywidgets pythreejs

Make sure to fully restart the Jupyter server (not just the notebook kernel) after the upgrade.

The error that you encounter with scene.preview() was fixed in version 2.4.2 of pythreejs (see jupyter-widgets/pythreejs#389 (comment)).

@StrongWeiUMN
Copy link
Author

StrongWeiUMN commented Mar 27, 2023

Hi @merlinND,

It still does not work. I think it is already the latest version: pythreejs==2.4.2

I created a new environment with JupyterLab installed only and tried to run some examples from pythreejs website. It still raises same error:

Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated

I tried two machines (Win OS and Linux OS), but all failed.

@StrongWeiUMN
Copy link
Author

@merlinND
I think the problem comes from the pythreejs. The default installed package version may mismatch.
Would you mind letting me know your pythreejs, jupyterlab, and jupter labextension version?

@merlinND
Copy link
Collaborator

merlinND commented Apr 3, 2023

Hi @StrongWeiUMN,

I agree that it should be a matter of pythreejs version and compatibility with the other modules. I've listed the versions I'm using (successfully) in a virtual environment with Python 3.10.6 on Ubuntu.

ipydatawidgets                    4.3.3
ipykernel                        6.21.2
ipython                          7.34.0
ipywidgets                        8.0.4
jupyter                           1.0.0
jupyter-core                      5.2.0
jupyterlab                        3.6.1
jupyterlab-widgets                3.0.5
jupyter-contrib-nbextensions      0.7.0
notebook                          6.5.2 
pythreejs                         2.4.2

Hope this helps!

@StrongWeiUMN
Copy link
Author

@merlinND Yes, it works!!!

I run pip install ipydatawidgets==4.3.3 ipykernel==6.21.2 ipython==7.34.0 ipywidgets==8.0.4 jupyter==1.0.0 jupyter-core==5.2.0 jupyterlab==3.6.1 jupyterlab-widgets==3.0.5 jupyter-contrib-nbextensions==0.7.0 notebook==6.5.2 pythreejs==2.4.2.

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

3 participants