[EXPLAINED] Code taking too long to execute

If your code is taking too long to execute, or your kernel is getting disconnected often, here are a few things you need to know:

  1. This is not an issue with the server, there are codes like when you are doing hyperparameter tuning with too many parameters, which are intensive processes and they take a long time to execute.

  2. If your code is taking too long to execute, or if your Jupyter notebook is idle for some time, our bots will kill them as a part of our fair usage policy. Would request you to go through the same from the below link:

    CloudxLab FUP

  3. If our bots kill the process, you might see a kernel disconnect error on your Jupyter notebook. In this case you need to restart the server, and check which part of the code is causing this issue.

  4. If for example, you are hyperparameter tuning with a number of parameters, then you need to break it down into smaller separate steps, and use less number of parameters whenever possible.

  5. If as a part of a topic, you have more than 4 steps to perform, then you can break down each step in a single cell and then execute them instead of executing all of them in a single cell in the Jupyter notebook at one go.


[UPDATE] We have introduced a new feature in Jupyter notebooks using which you would be able to view the amount of RAM consumed by that Jupyter notebook.

If you are unable to view this, please click on View -> Toggle Toolbar. This will help you in case your kernel is frequently getting disconnected by understanding if your Jupyter notebook is using more memory than the limit set in our FUP. For more details, please read the original post above.