business-science / modeltime.gluonts

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

Error when trying to use GPU #15

Closed vidarsumo closed 3 years ago

vidarsumo commented 3 years ago

When creating new Python environment

py_install(
    packages = c(
        "mxnet-cu92",
        "gluonts==0.6.3",
        "numpy==1.16.6",
        "pandas==1.0.5",
        "scikit-learn==0.23.2",
        "matplotlib==3.3.2",
        "seaborn==0.11.0",
        "pathlib==1.0.1"
    ),
    envname = "gluonts_gpu_new",
    method = "conda",
    python_version = "3.6",
    pip     = TRUE
)

Everything works fine beside some warnings

image

Then I run into an error when I run this code

library(tidyverse)
env_path <- reticulate::conda_list() %>%
    filter(name == "gluonts_gpu_new") %>%
    pull(python)
Sys.setenv(GLUONTS_PYTHON = env_path)
library(modeltime.gluonts)

image

mdancho84 commented 3 years ago

Will look at this for 0.2.0 release. Trying for this weekend. We'll see.

mdancho84 commented 3 years ago

I've added a vignette that covers using GPUs with modeltime.gluonts. https://business-science.github.io/modeltime.gluonts/articles/using-gpus.html

@vidarsumo Please verify this works for you. Thanks!

flrs commented 3 years ago

@mdancho84 @vidarsumo I have tested this and it works for me.

mdancho84 commented 3 years ago

Adding in Florian's awesome CPU tutorial. https://gist.github.com/flrs/e80e7cd819cbaef74f0457abb687fbfa

vidarsumo commented 3 years ago

Sorry I simply forgott, but yes this works for me too.