business-science / modeltime.gluonts

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

TypeError: fit() got an unexpected keyword argument 'train_dataloader' #43

Closed jfergus73 closed 2 years ago

jfergus73 commented 2 years ago

Hello Matt, i’ve been having this issue running “torch” in lab 60, Screen Shot 2022-05-04 at 12 12 45 PM I don't know what to do, I've uninstall gluonts, and reinstalled and still the error.

MacVoil commented 2 years ago

Hello Matt, I'm getting the same error on windows

image

mdancho84 commented 2 years ago

I'll have to take a look when I have some free time.

mdancho84 commented 2 years ago

Here is a solution from another student in the course:

Hello @Matt Dancho and @Juan Fergusson

I was having the same error but, I was able to run deepar with torch by creating a custom env like this

reticulate::py_install(
    envname  = "my_gluonts_torch_env",
    python_version = "3.7",
    packages = c(
        "mxnet~=1.7",
        "gluonts==0.8.0",
        "pandas==1.0.5",
        "numpy",
        "ujson==4.0.2"
    ),
    method = "conda",
    pip = TRUE
)

torch_pkgs <- c(
    "torch~=1.6",
    "pytorch-lightning==1.5.0"
)

reticulate::py_install(
    packages       = torch_pkgs,
    envname        = "my_gluonts_torch_env",
    method         = "conda",
    pip            = TRUE
)

For me the problem was the default version of pytorch-lightning that install_gluonts() installs in my pc (pytorch-lightning 1.6.3) when I created the custom env with "pytorch-lightning==1.5.0" I was able to run the model.

I hope this works for you @Juan Fergusson

jfergus73 commented 2 years ago

Hey Camilo muchas gracias, excelente!! Hey Matt, did what Camilo suggested and works just fine, thanks a lot …

mdancho84 commented 2 years ago

Excellent!!