Python HoloViews超过IOPub消息速率
我正在尝试使用Python HoloViews超过IOPub消息速率,python,jupyter-notebook,holoviews,pyviz,Python,Jupyter Notebook,Holoviews,Pyviz,我正在尝试使用DynamicMap上的periodic函数设置路径动画,但我的Jupyter笔记本开始出现以下错误消息: IOPub message rate exceeded. The notebook server will temporarily stop sending output to the client in order to avoid crashing it. To change this limit, set the config variable `--NotebookA
DynamicMap
上的periodic
函数设置路径动画,但我的Jupyter笔记本开始出现以下错误消息:
IOPub message rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_msg_rate_limit`.
Current values:
NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)
NotebookApp.rate_limit_window=3.0 (secs)
这是我的代码:
def paths3():
N = 50
x = np.linspace(0,10,N)
y = (2 * x + 3)
f = 0.0
g = 0.5
while True:
i = np.clip(int((N-1)*f),0,N-1)
j = np.clip(int((N-1)*(f-g)),0,N-1)
if j < 0:
j = 0
alpha_max = 1 if f <= 1 else ((1.0-(f-g))*N) / N
alpha = np.concatenate((np.zeros(j),np.linspace(0.1,alpha_max,(i-j+1)),np.zeros(N-(i+1))))
data = pd.DataFrame({'x':x,'y':y,'alpha':alpha})
yield hv.Path(data, vdims='alpha').opts(alpha='alpha')
if f > 2:
f = 0
else:
f += 0.01
我发现人们也有类似的问题,但那是在2017年,Jupyter笔记本的旧版本
这是我的Jupyter笔记本中的“关于”部分:
Server Information:
You are using Jupyter notebook.
The version of the notebook server is: 6.0.1
The server is running on this version of Python:
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Current Kernel Information:
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
(启动jupyter笔记本时)将消息速率设置为10000或100000是否有帮助,如下所示:
jupyter笔记本--NotebookApp.iopub\u msg\u rate\u limit=10000
这个问题是指一个类似的问题:这似乎确实有帮助,但动画速度惊人地慢!这是一个非常小的例子,点很少,所以我希望这个动画非常快速和平滑。
dmap.periodic(0.1, 100)
Server Information:
You are using Jupyter notebook.
The version of the notebook server is: 6.0.1
The server is running on this version of Python:
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Current Kernel Information:
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.