[英]How to change execution time limit in Jupyter Notebook?
我定義了一個python函數(作為.py文件),該函數以迭代的方式適合數十個文件的一些科學數據。 現在,我正在嘗試將此功能導入jupyter筆記本中,以用作另一個腳本的一部分,以處理獲取的數據。 基本上是這樣的:
from python_file import defined_function
filename = 'name of the file'
results = defined_function(filename)
該腳本自然會花幾分鍾才能在我的計算機中結束。 但是,在完成之前,我收到一條與時間限制有關的錯誤消息:
RuntimeError: Execution exceeded time limit, max runtime is 30s
如何在筆記本中更改此時間限制? 如果有幫助,我正在使用ipython版本6.1.0
謝謝
在jupyter_notebook_config.py中覆蓋NotebookApp.iopub_data_rate_limit = 10000000可以解決問題。 請注意,在您甚至看不到名為jupyter_notebook_config.py的文件之前,然后繼續進行此修復,必須首先運行jupyter notebook --generate-config(對於Linux用戶)。
如果在配置文件中覆蓋此選項對您不起作用。 無論您在配置文件中將NotebookApp.iopub_data_rate_limit =設置為什么,都會發生相同的錯誤。 它應該不在正確的位置。 如果不是,請嘗試將'NotebookApp.iopub_data_rate_limit ='放在〜/ .jupyter / jupyter_notebook_config.py。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.