Skip to content

Commit

Permalink
support ipyevents / ipycanvas import error with just a warning, fix (#…
Browse files Browse the repository at this point in the history
…723)

issue with comm version

Signed-off-by: Clement Fuji Tsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed May 15, 2023
1 parent d9a4d61 commit 75ca02c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ci/gitlab_jenkins_templates/ubuntu_test_CI.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
try {
stage("Pytest") {
sh '''
export KAOLIN_TEST_NVIDIFFRAST=1
export KAOLIN_TEST_NVDIFFRAST=1
export KAOLIN_TEST_SHAPENETV1_PATH=/mnt/data/ci_shapenetv1
export KAOLIN_TEST_SHAPENETV2_PATH=/mnt/data/ci_shapenetv2
export KAOLIN_TEST_MODELNET_PATH=/mnt/data/ModelNet
Expand All @@ -100,7 +100,7 @@ spec:
}
try {
stage("Dash3D") {
'''
sh '''
pytest -s --cov=/kaolin/kaolin /kaolin/tests/integration/
'''
}
Expand Down
17 changes: 11 additions & 6 deletions kaolin/visualize/ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@
# limitations under the License.

from abc import abstractmethod
from io import BytesIO
import math
import traceback
import warnings

from PIL import Image as PILImage
import torch

from ipyevents import Event
from ipywidgets import Output
from ipywidgets import Image as ImageWidget
from ipycanvas import Canvas
try:
from ipyevents import Event
from ipywidgets import Output
from ipywidgets import Image as ImageWidget
from ipycanvas import Canvas
except Exception as e:
warnings.warn('Error importing kaolin.visualize.ipython:\n' + traceback.format_exc())

from io import BytesIO
from PIL import Image as PILImage

from ..render.camera import CameraExtrinsics

Expand Down
1 change: 1 addition & 0 deletions tools/viz_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ jupyter_client<8
pyzmq<25
flask
tornado
comm>=0.1.3

0 comments on commit 75ca02c

Please sign in to comment.