Skip to content

Commit 3a55ea5

Browse files
committed
fix dependency issues
- jupyter_client>=8 requires to use AsyncKernelManager to support timeout, but nbconvert uses KernelManager. fix restores previous behavior - dash 2.9 breaks backward compatibility due to pages folder required by default
1 parent 1f68b40 commit 3a55ea5

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

omegaml/notebook/jobs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import yaml
77
from croniter import croniter
88
from io import StringIO, BytesIO
9+
10+
from jupyter_client import AsyncKernelManager
911
from nbconvert.preprocessors import ClearOutputPreprocessor
1012
from nbconvert.preprocessors.execute import ExecutePreprocessor
1113
from nbformat import read as nbread, write as nbwrite, v4 as nbv4
@@ -346,6 +348,9 @@ def run_notebook(self, name, event=None, timeout=None):
346348
# -- e.g. python3, ir
347349
# -- see https://stackoverflow.com/a/47053020/890242
348350
'kernel_name': '',
351+
# always use the async kernel manager
352+
# -- see https://github.com/jupyter/nbconvert/issues/1964
353+
'kernel_manager_class': AsyncKernelManager,
349354
}
350355
# overrides from metadata
351356
ep_kwargs.update(meta_job.kind_meta.get('ep_kwargs', {}))

setup.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# extras
1111
tables = ['tables>=3.7']
1212
graph_deps = ['matplotlib~=3.5', 'seaborn~=0.11', 'imageio~=2.6', 'plotext~=1.0']
13-
dashserve_deps = ['dashserve']
13+
dashserve_deps = ['dashserve', 'dash<2.9'] # dash 2.9 breaks dashserve due to required pages folder
1414
sql_deps = ['sqlalchemy', 'ipython-sql']
1515
snowflake_deps = ['snowflake-sqlalchemy==1.2.3']
1616
iotools_deps = ['boto>=2.49.0']
@@ -28,7 +28,7 @@
2828
tf_deps = ['tensorflow=={}'.format(tf_version)]
2929
tf_deps = tf_deps + ['tensorflow-gpu==1.15.0', 'h5py==2.10.0']
3030
keras_deps = ['keras==2.2.4']
31-
elif (3, 8) <= sys.version_info[:2] < (3, 9) :
31+
elif (3, 8) <= sys.version_info[:2] < (3, 9):
3232
major, minor, *_ = (int(v) for v in tf_version.split('.'))
3333
assert (major, minor) >= (2, 2), "Python version 3.8 only supported by TF >= 2.2"
3434
tf_deps = ['tensorflow{}{}'.format(tf_match, tf_version)]
@@ -80,7 +80,7 @@
8080
],
8181
install_requires=[
8282
'celery>5,<6.0',
83-
'importlib-metadata<5.0', # due to https://github.com/celery/kombu/pull/1601
83+
'importlib-metadata<5.0', # due to https://github.com/celery/kombu/pull/1601
8484
'joblib>=0.9.4',
8585
'jupyter-client>=4.1.1',
8686
'mongoengine~=0.24.1',
@@ -91,13 +91,13 @@
9191
'scikit-learn>=0.21',
9292
'PyYAML>=3.12',
9393
'flask-restx>=0.4.0',
94-
'werkzeug<2.1.0', # due to flask-restx, https://github.com/python-restx/flask-restx/issues/422
95-
'markupsafe==2.0.1', # due to flask/markupsafe, https://github.com/pallets/markupsafe/issues/284
94+
'werkzeug<2.1.0', # due to flask-restx, https://github.com/python-restx/flask-restx/issues/422
95+
'markupsafe==2.0.1', # due to flask/markupsafe, https://github.com/pallets/markupsafe/issues/284
9696
'croniter>=0.3.30',
9797
'nbformat>=4.0.1',
9898
'nbconvert>=6.4.0',
99-
'pygments>=2.7.4', # via nbconvert, due to snyk report https://github.com/omegaml/omegaml/pull/299
100-
'dill>=0.3.2,<0.3.6', # due to dill, https://github.com/uqfoundation/dill/issues/332
99+
'pygments>=2.7.4', # via nbconvert, due to snyk report https://github.com/omegaml/omegaml/pull/299
100+
'dill>=0.3.2,<0.3.6', # due to dill, https://github.com/uqfoundation/dill/issues/332
101101
'callable-pip>=1.0.0',
102102
'appdirs>=1.4.3',
103103
'cron-descriptor>=1.2.31',
@@ -109,12 +109,12 @@
109109
'tqdm>=4.32.2',
110110
'honcho>=1.0.1', # not strictly required, but used in docker compose
111111
'tabulate>=0.8.2', # required in cli
112-
'smart_open', # required in cli
113-
'imageio>=2.3.0', # require to store images
114-
'psutil>=5.8', # required for profiling tracker
115-
'cachetools>=5.0.0', # required for session caching
116-
'apispec>=5.2.2', # required for openapi generation
117-
'marshmallow>=3.17.0', # required for openapi generation
112+
'smart_open', # required in cli
113+
'imageio>=2.3.0', # require to store images
114+
'psutil>=5.8', # required for profiling tracker
115+
'cachetools>=5.0.0', # required for session caching
116+
'apispec>=5.2.2', # required for openapi generation
117+
'marshmallow>=3.17.0', # required for openapi generation
118118
],
119119
extras_require={
120120
'graph': graph_deps,
@@ -137,4 +137,3 @@
137137
'console_scripts': ['om=omegaml.client.cli:climain'],
138138
}
139139
)
140-

0 commit comments

Comments
 (0)