问题描述
在jupyter 笔记本中,我可以使用 nbextensions ,结果是这样的:
In jupyter notebook, I can configure an automatic cell timing with nbextensions, the result is like so:
如何在jupyter 实验室中执行此操作?我没有发现做类似事情的扩展.
How can i do this in jupyter lab? I didn't found any extensions that did a similar thing.
糟糕:我知道使用%%time
魔术可以达到类似的结果,但是我希望它是自动的,因此我不必将魔术功能放在每个单元格的开头
Obs.: I know that a similar result can be achieved with %%time
magic, but i want it to be automatic, so I don't have to place the magic function at the begining of each cell
推荐答案
要求
让我们一步一步地前进
首先启用扩展程序管理器
first enable extension Manager
启用后,您会在扩展管理器"末尾的侧边任务栏中看到新按钮
after enable you see new button in side task bar at the end "extension Manager"
您还可以通过以下步骤启用它:
You can also enable it with the following steps:
- 进入高级设置编辑器.
- 打开扩展管理器部分.
- 添加条目已启用":true.
- 保存设置.如果提示您确定,请阅读警告,如果仍然确定,请单击启用".启用后,您应该会在左侧栏中看到一个新标签
- Go into advanced settings editor.
- Open the Extension Manager section.
- Add the entry "enabled": true.
- Save the settings.If prompted whether you are sure, read the warning, and click "Enable" if you are still sure.Once enabled, you should see a new tab appear in the left sidebar
默认情况下,不确认免责声明.
By default, the disclaimer is not acknowledged.
由于未确认免责声明,因此您可以搜索扩展名,但不能安装它(没有安装按钮可用).
As the disclaimer is not acknowledged, you can search for an extension, but can not install it (no install button is available).
要安装extensino,您首先必须明确确认免责声明.完成后,这将保留在所有会话中,用户无需再次检查.
To install an extensino, you first have to explicitly acknowledge the disclaimer. Once done, this will remain across sessions and the user does not have to check it again.
搜索jupyterlab执行时间
search jupyterlab-execute-time
启用后,您必须对其进行重建:在其上打开一个小的弹出窗口,单击Rebulid;
After enable you have to Rebuild it: A small popup window open on it click on Rebulid;
然后您必须重新启动内核
then you have to restart kernel
仍然发现您将无法看到想要的内容:
Still you find you will not able to see what you want :
注意:要显示任何内容,您需要在笔记本中通过设置"->高级设置编辑器"->笔记本"启用电池计时:{"recordTiming":true}
Note: for this to show anything, you need to enable cell timing in the notebook via Settings->Advanced Settings Editor->Notebook: {"recordTiming": true}
最终"recordTiming" = true
finally "recordTiming"=true
并保存在右端!
这篇关于Jupyter实验室中的自动单元执行定时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!