Jupyter Notebook time profiling

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 15:25:24

问题


So I installed jupyter notebook through anaconda and I am working on python 3 kernel.

I am trying to do Time profiling using %time magic command as show here The problem is that it only prints the Wall Time not the CPU Time

using %time or %%time does not help

  • %time prints the wall time for the first line only
  • %%time prints the wall time for the whole cell

I am not sure if there any specif config to print the CPU time

EDIT

To clarify using %%time should print two metrics for the whole cell

  • Metric 1: CPU Times
  • Metric 2: wall time

my problem is that I only get wall time not CPU time.

You may check this link on what is the expected output for %%time


回答1:


So it seems that my issue was in the environment itself.

Switching from Windows to Ubuntu actually helped me print the CPU times.



来源:https://stackoverflow.com/questions/43089465/jupyter-notebook-time-profiling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!