简体   繁体   English

我的Jupyter笔记本电脑的数据保存在哪里

[英]Where are saved the data of my Jupyter notebooks

I am using Jupyter notebooks to code in Python and was wondering where was stored the "temporary" data I generate during the execution. 我正在使用Jupyter笔记本用Python编写代码,想知道我在执行过程中生成的“临时”数据存储在哪里。 Indeed, it's huge amount of data and seems to alter the efficiency of my laptop. 实际上,它的数据量很大,并且似乎在改变我的笔记本电脑的效率。 Moereover my browser (GoogleChrome) seems to suffer from a lack of memory. 移动浏览器(GoogleChrome)似乎内存不足。

Another question I was asking is how to save a Jupyter Notebook session for quite a long time. 我问的另一个问题是如何保存Jupyter Notebook会话很长时间。 I saw this post but the accepted answer got quite few votes so I was wondering how reliable it was. 我看到了这篇文章,但被接受的答案获得了很少的选票,所以我想知道它的可靠性。 Again, what about the memory this operation needs and where are the data stored during that time? 同样,此操作所需的内存又如何?在这段时间内数据存储在哪里?

Jupyter notebook stores the temporary results in your Laptops RAM. Jupyter笔记本将临时结果存储在笔记本计算机的RAM中。 If the memory is full, usually the system starts to write a swap file (or starts to fill swap partition on Linux). 如果内存已满,通常系统会开始写入交换文件(或在Linux上开始填充交换分区)。 This greatly influences the performance of the system since certain system parts are swaped to the much slower SSD/HDD and are read back into the RAM when you start using them again. 这会极大地影响系统的性能,因为某些系统部件已交换到速度较慢的SSD / HDD,并在您再次开始使用它们时又读回到RAM中。

I don't think it is possible to store the whole notebook state. 我认为不可能存储整个笔记本状态。 You can try to pickle everything thats picklable and read it back as a workaround (as suggested in the post you mention). 您可以尝试腌制所有可腌制的东西,然后将其读回作为解决方法(如您提到的帖子中所建议)。 When you save a notebook, all plots and outputs are stored by default but you will have to rerun the notebook if you want to change something. 保存笔记本时,默认情况下会存储所有图和输出,但是如果要更改某些内容,则必须重新运行笔记本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM