jupyter 实验室中的自动单元格执行计时 [英] Automatic cell execution timing in jupyter lab

查看:84
本文介绍了jupyter 实验室中的自动单元格执行计时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 jupyter notebook 中,我可以使用

我们一步一步来

jupyter 实验室中可用的扩展是

<块引用><块引用>

jupyterlab-执行时间

首先启用扩展管理器

启用后,您会在扩展管理器"末尾的侧边任务栏中看到新按钮

您也可以通过以下步骤启用它:

  1. 进入高级设置编辑器.
  2. 打开扩展管理器部分.
  3. 添加条目已启用":true.
  4. 保存设置.如果提示您是否确定,请阅读警告,如果您仍然确定,请单击启用".启用后,您应该会在左侧边栏中看到一个新选项卡

默认情况下,不承认免责声明.

由于未确认免责声明,您可以搜索扩展,但无法安装它(没有安装按钮可用).

要安装扩展程序,您首先必须明确承认免责声明.完成后,这将跨会话保留,用户无需再次检查.

寻找扩展

搜索 jupyterlab-execute-time

<块引用>

安装启用

启用后,您必须重建它:在其上打开一个小弹出窗口,单击 Rebulid;

然后你必须重新启动内核

你仍然发现你看不到你想要的东西:

最后一件事

注意:为了显示任何内容,您需要通过设置->高级设置编辑器->笔记本在笔记本中启用单元计时:{recordTiming":true}

高级设置编辑器

最后recordTiming"=true

并保存在右端!

In jupyter notebook, I can configure an automatic cell timing with nbextensions, the result is like so:

How can I do this in jupyter lab? I didn't find any extensions that do a similar thing.

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 beginning of each cell.

解决方案

Requirement

JupyterLab >= 2.0.2

Let's move step by step

Extension availabel in jupyter lab is

jupyterlab-execute-time

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:

  1. Go into advanced settings editor.
  2. Open the Extension Manager section.
  3. Add the entry "enabled": true.
  4. 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).

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.

Finding Extension

search jupyterlab-execute-time

Install Enable

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 :

Last thing

Note: for this to show anything, you need to enable cell timing in the notebook via Settings->Advanced Settings Editor->Notebook: {"recordTiming": true}

advance setting editor

finally "recordTiming"=true

and save it at right end!

这篇关于jupyter 实验室中的自动单元格执行计时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆