business-science / modeltime.gluonts

GluonTS Deep Learning with Modeltime
https://business-science.github.io/modeltime.gluonts/
Other
39 stars 9 forks source link

install_gluonts not working anymore - with workaround #54

Open multiduplikator opened 1 year ago

multiduplikator commented 1 year ago

At the date of writing this, miniconda on win11 22H2 always runs into openssl related errors when running install_gluonts. Creating the conda environment manually as per instructions ends in conflicts and unsuccesful solves (with or without conda-forge. The usual suspects mxnet, numpy and so on are causing the issue.

Some how, this installation mechanism needs some overhaul on windows.

For what its worth, I found an alternative way to create an environment that works. Maybe it helps others:

  1. open cmd as admin
  2. winget install Python.Python.3.7 (also possible to download installer and install "normally" from python.org)
  3. close cmd
  4. open cmd as admin
  5. python.exe -m pip install --upgrade pip
  6. pip install wheel
  7. pip install --no-deps -r requirements.txt

Then in RStudio

Sys.setenv(GLUONTS_PYTHON = "C:\\Users\\<your.username.here>\\AppData\\Local\\Programs\\Python\\Python37\\python.exe")
library(modeltime.gluonts)

requirements.txt

multiduplikator commented 1 year ago

Well, there seems to be no possible constellation with miniconda, miniforge, mambaforge, etc. So, python for windows it must be. - 3.7.x and nothing else.

That being given, there is no possible constellation that gets torch to work in deepar. Hence, we can do this a bit more compact.

cmd/powershell (admin) winget install Python.Python.3.7 reopen cmd/powershell (admin)

python -m pip install --upgrade pip
pip install wheel
pip install "gluonts[mxnet,pro]<0.11" pathlib ujson brotlipy

Mind the "pro", quick benchmarking seems to make it/s about 18% faster in my environment (1.99 avg vs 2.36) on all the engines currently available and working.

requirements_pro.txt