有没有办法在笔记本中将 jupyter 笔记本的 CPU 优先级设置得较低?例如。在计算服务器上运行为期一天的参数搜索时,在该笔记本中设置优先级,使其落后于其他人实时处理的笔记本。
最佳答案
也许设置您的 python
进程的优先级对您来说就足够了? startet 进程尽可能继承优先级。
如果是,以下代码对我有帮助:
import psutil
psutil.Process().nice(19)# if on *ux
psutil.Process().nice(psutil.IDLE_PRIORITY_CLASS)# if on win
关于python - 在 jupyter/ipython notebook 中设置优先级/niceness,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47600569/