From 012bb1fee25ad1231ca350cd1159cdb8b8044da0 Mon Sep 17 00:00:00 2001 From: Simon Alexander Wittner <108267997+SimonWittner@users.noreply.github.com> Date: Mon, 18 Sep 2023 07:56:38 -0700 Subject: [PATCH] [fix] Tutorials on Colab Crash (#1418) * uninstall packages * documentation --- .../application-examples/energy_hospital_load.ipynb | 2 ++ .../application-examples/energy_solar_pv.ipynb | 2 ++ .../feature-guides/Live_plot_during_training.ipynb | 2 ++ .../feature-guides/collect_predictions.ipynb | 2 ++ .../conditional_seasonality_peyton.ipynb | 2 ++ .../feature-guides/global_local_modeling.ipynb | 2 ++ .../season_multiplicative_air_travel.ipynb | 2 ++ .../sparse_autoregression_yosemite_temps.ipynb | 2 ++ .../feature-guides/sub_daily_data_yosemite_temps.ipynb | 2 ++ .../feature-guides/test_and_crossvalidate.ipynb | 2 ++ .../feature-guides/uncertainty_quantification.ipynb | 2 ++ docs/source/quickstart.ipynb | 10 +++++++++- 12 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb b/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb index 56f5ae200..1c1c3a048 100644 --- a/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb +++ b/docs/source/how-to-guides/application-examples/energy_hospital_load.ipynb @@ -36,6 +36,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/application-examples/energy_solar_pv.ipynb b/docs/source/how-to-guides/application-examples/energy_solar_pv.ipynb index 886f3e840..4b7b824ae 100644 --- a/docs/source/how-to-guides/application-examples/energy_solar_pv.ipynb +++ b/docs/source/how-to-guides/application-examples/energy_solar_pv.ipynb @@ -32,6 +32,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/Live_plot_during_training.ipynb b/docs/source/how-to-guides/feature-guides/Live_plot_during_training.ipynb index c922fcb00..48bfff7e2 100644 --- a/docs/source/how-to-guides/feature-guides/Live_plot_during_training.ipynb +++ b/docs/source/how-to-guides/feature-guides/Live_plot_during_training.ipynb @@ -24,6 +24,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git['live'] # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/collect_predictions.ipynb b/docs/source/how-to-guides/feature-guides/collect_predictions.ipynb index 9edfa7426..c2c84cdad 100644 --- a/docs/source/how-to-guides/feature-guides/collect_predictions.ipynb +++ b/docs/source/how-to-guides/feature-guides/collect_predictions.ipynb @@ -33,6 +33,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/conditional_seasonality_peyton.ipynb b/docs/source/how-to-guides/feature-guides/conditional_seasonality_peyton.ipynb index 19ff12a3b..1a43e605f 100644 --- a/docs/source/how-to-guides/feature-guides/conditional_seasonality_peyton.ipynb +++ b/docs/source/how-to-guides/feature-guides/conditional_seasonality_peyton.ipynb @@ -32,6 +32,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git@examples_cond_seas # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/global_local_modeling.ipynb b/docs/source/how-to-guides/feature-guides/global_local_modeling.ipynb index 61a77234f..c72f97803 100644 --- a/docs/source/how-to-guides/feature-guides/global_local_modeling.ipynb +++ b/docs/source/how-to-guides/feature-guides/global_local_modeling.ipynb @@ -41,6 +41,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/season_multiplicative_air_travel.ipynb b/docs/source/how-to-guides/feature-guides/season_multiplicative_air_travel.ipynb index 0f9d4d4d1..9586aca40 100644 --- a/docs/source/how-to-guides/feature-guides/season_multiplicative_air_travel.ipynb +++ b/docs/source/how-to-guides/feature-guides/season_multiplicative_air_travel.ipynb @@ -22,6 +22,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/sparse_autoregression_yosemite_temps.ipynb b/docs/source/how-to-guides/feature-guides/sparse_autoregression_yosemite_temps.ipynb index 6912c4ddb..d2695395b 100644 --- a/docs/source/how-to-guides/feature-guides/sparse_autoregression_yosemite_temps.ipynb +++ b/docs/source/how-to-guides/feature-guides/sparse_autoregression_yosemite_temps.ipynb @@ -23,6 +23,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/sub_daily_data_yosemite_temps.ipynb b/docs/source/how-to-guides/feature-guides/sub_daily_data_yosemite_temps.ipynb index 9ee082bb7..c10fd1739 100644 --- a/docs/source/how-to-guides/feature-guides/sub_daily_data_yosemite_temps.ipynb +++ b/docs/source/how-to-guides/feature-guides/sub_daily_data_yosemite_temps.ipynb @@ -24,6 +24,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/test_and_crossvalidate.ipynb b/docs/source/how-to-guides/feature-guides/test_and_crossvalidate.ipynb index bc8ce2f0c..11be7b428 100644 --- a/docs/source/how-to-guides/feature-guides/test_and_crossvalidate.ipynb +++ b/docs/source/how-to-guides/feature-guides/test_and_crossvalidate.ipynb @@ -24,6 +24,8 @@ "outputs": [], "source": [ "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " #!pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while\n", " !pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes\n", "\n", diff --git a/docs/source/how-to-guides/feature-guides/uncertainty_quantification.ipynb b/docs/source/how-to-guides/feature-guides/uncertainty_quantification.ipynb index 373cf3ff9..f5826a066 100644 --- a/docs/source/how-to-guides/feature-guides/uncertainty_quantification.ipynb +++ b/docs/source/how-to-guides/feature-guides/uncertainty_quantification.ipynb @@ -36,6 +36,8 @@ "# pip install neuralprophet\n", "\n", "if \"google.colab\" in str(get_ipython()):\n", + " # uninstall preinstalled packages from Colab to avoid conflicts\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision \n", " !pip install git+https://github.com/ourownstory/neural_prophet.git # may take a while" ] }, diff --git a/docs/source/quickstart.ipynb b/docs/source/quickstart.ipynb index 09417eaed..00dd06375 100644 --- a/docs/source/quickstart.ipynb +++ b/docs/source/quickstart.ipynb @@ -13,7 +13,7 @@ "\n", " $ pip install neuralprophet\n", "\n", - "If you plan to use the package in a Jupyter notebook, we recommend to install the 'live' version. This will allow you to enable `progress='plot'` in the train function to get a live plot of train (and validation) loss.\n", + "If you plan to use the package in a Jupyter notebook, we recommend to install the 'live' version. This will allow you to enable `progress='plot'` in the train function to get a live plot of train (and validation) loss:\n", "\n", " $ pip install neuralprophet[live]\n", "\n", @@ -23,6 +23,14 @@ " $ cd neural_prophet\n", " $ pip install .\n", "\n", + "If you plan to use NeuralProphet in Google Colab, please use the following commands to avoid conflicts with pre-installed packages in Colab:\n", + "\n", + " !pip uninstall -y torch notebook notebook_shim tensorflow tensorflow-datasets prophet torchaudio torchdata torchtext torchvision\n", + " \n", + " !pip install neuralprophet\n", + " or\n", + " !pip install git+https://github.com/ourownstory/neural_prophet.git\n", + " \n", "### Import\n", "Now you can use NeuralProphet in your code:" ]