Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorials on Colab crash #1399

Closed
Soffia-t opened this issue Aug 14, 2023 · 9 comments
Closed

Tutorials on Colab crash #1399

Soffia-t opened this issue Aug 14, 2023 · 9 comments

Comments

@Soffia-t
Copy link

Prerequisites

Describe the bug
When I try to run the tutorials (I tried several), for example (https://colab.research.google.com/github/ourownstory/neural_prophet/blob/main/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb) on Colab, they always crash the session (our of RAM message) when it tries to m.fit. What I have tried:
-Running a high ram Colab, same thing
-Running it on planetary computer, same thing
-Running on Noteable.io, same thing

I did not touch any of the code on the Tutorials.

P.S. It was happening on my notebooks using NeuralProphet, I thought it might be an error in my code, that's why I went to the tutorials and the error was happening there as well.

To Reproduce

Steps to reproduce the behavior:

  1. Open notebook https://colab.research.google.com/github/ourownstory/neural_prophet/blob/main/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb on Colab
  2. Run as is
  3. It will crash the session when it tries to fit
  4. Same thing happens when you use a High RAM machine or a GPU

Expected behavior

A fix to this so that we can run NeuralProphet on Colab

@leoniewgnr
Copy link
Collaborator

Hi @Soffia-t, thanks for raising this? Does it crash because it runs out of memory?

@Soffia-t
Copy link
Author

That is what it says. That it ran out of memory.
But I have run the energy tutorial ( https://colab.research.google.com/github/ourownstory/neural_prophet/blob/main/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb) before ( on a normal Colab instance 4Gb) and it was fine. Now, it crashes even on the Pro+ version, 51 Gb of RAM.

@leoniewgnr
Copy link
Collaborator

I can confirm the problem, I'm currently working on improving the memory performance on NeuralProphet but didn't really find the problem. Do you have an idea where this could be in the fit function?
I suspect it to be in the time_dataset.py, but not super sure.

I already improved the stride function here. I'll merge it later and then we can check if it still runs out of memory, but I think so :(

@leoniewgnr
Copy link
Collaborator

Figure_1
This is the memory consumption of a normal fit, so I think we gradually add memory when loading the data and then for fitting it stays constant, which makes sense. I'll check the dataloading process if we can save memory somewhere.

@leoniewgnr
Copy link
Collaborator

@Soffia-t Do you have insights on how much RAM is used before it crashes?

@Soffia-t
Copy link
Author

OK, So, I screen recorded the crash. I hope this will give you more info.
energy_data_example.ipynb - Colaboratory - Google Chrome 2023-08-16 09-58-16.zip

@leoniewgnr
Copy link
Collaborator

@Soffia-t, I made some improvements to memory issues, but it still crashes...
I honestly don't know why. Maybe someone can help on this?

@SimonWittner
Copy link
Collaborator

Hi,
I think this is an issue with the preinstalled packages from Colab. I tried it and I was able to fit the model after I uninstalled some of the packages before installing NeuralProphet:
!pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision
@leoniewgnr What do you think? Should we include this workaround in the tutorials?

@leoniewgnr
Copy link
Collaborator

resolved with #1418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants