business-science / modeltime.gluonts

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

Error in gluonts$distribution$student_t$StudentTOutput(): attempt to apply non-function #6

Closed spsanderson closed 3 years ago

spsanderson commented 3 years ago

Session Info:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.0           stringr_1.4.0           readr_1.4.0             tidyverse_1.3.0        
 [5] yardstick_0.0.7         workflows_0.2.1         tune_0.1.1.9000         tidyr_1.1.2            
 [9] tibble_3.0.4            rsample_0.0.8           recipes_0.1.15          purrr_0.3.4            
[13] parsnip_0.1.4           modeldata_0.1.0         infer_0.5.3             ggplot2_3.3.2          
[17] dplyr_1.0.2             dials_0.0.9             scales_1.1.1            broom_0.7.2            
[21] tidymodels_0.1.1        modeltime.gluonts_0.1.0 modeltime_0.3.1        

loaded via a namespace (and not attached):
 [1] fs_1.5.0             lubridate_1.7.9.2    DiceDesign_1.8-1     httr_1.4.2           tools_4.0.2         
 [6] backports_1.2.0      R6_2.5.0             rpart_4.1-15         DBI_1.1.0            colorspace_2.0-0    
[11] nnet_7.3-14          withr_2.3.0          tidyselect_1.1.0     compiler_4.0.2       cli_2.1.0           
[16] rvest_0.3.6          pacman_0.5.1         xml2_1.3.2           rappdirs_0.3.1       digest_0.6.27       
[21] StanHeaders_2.21.0-6 rmarkdown_2.5        pkgconfig_2.0.3      htmltools_0.5.0      parallelly_1.21.0   
[26] lhs_1.1.1            dbplyr_2.0.0         rlang_0.4.8          readxl_1.3.1         rstudioapi_0.13     
[31] generics_0.1.0       jsonlite_1.7.1       magrittr_1.5         Matrix_1.2-18        Rcpp_1.0.5          
[36] munsell_0.5.0        fansi_0.4.1          GPfit_1.0-8          reticulate_1.18      lifecycle_0.2.0     
[41] furrr_0.2.1          stringi_1.5.3        pROC_1.16.2          yaml_2.2.1           MASS_7.3-51.6       
[46] plyr_1.8.6           grid_4.0.2           parallel_4.0.2       listenv_0.8.0        crayon_1.3.4        
[51] lattice_0.20-41      haven_2.3.1          splines_4.0.2        hms_0.5.3            knitr_1.30          
[56] pillar_1.4.6         codetools_0.2-16     reprex_0.3.0         glue_1.4.2           packrat_0.5.0       
[61] evaluate_0.14        RcppParallel_5.0.2   modelr_0.1.8         vctrs_0.3.4          foreach_1.5.1       
[66] cellranger_1.1.0     gtable_0.3.0         future_1.20.1        assertthat_0.2.1     xfun_0.19           
[71] gower_0.2.2          prodlim_2019.11.13   class_7.3-17         survival_3.1-12      timeDate_3043.102   
[76] iterators_1.0.13     lava_1.6.8.1         globals_0.13.1       ellipsis_0.3.1       ipred_0.9-9   

Running this produces the error:

library(modeltime.gluonts)
library(tidymodels)
library(tidyverse)

# Fit a GluonTS DeepAR Model
model_fit_deepar <- deep_ar(
    id                    = "id",
    freq                  = "M",
    prediction_length     = 24,
    epochs                = 10, 
    num_batches_per_epoch = 50,
    learn_rate            = 0.001,
    num_layers            = 2,
    dropout               = 0.10
) %>%
    set_engine("gluonts") %>%
    fit(value ~ ., training(m750_splits))

Error:

Error in gluonts$distribution$student_t$StudentTOutput() : 
  attempt to apply non-function
Timing stopped at: 0 0 0
flostracke commented 3 years ago

Hey, what was the solution for this issue? I'm having the same problem. Any hints? Thank you very much!

flostracke commented 3 years ago

just found the duplicate issue with the hint ;)

naveenkr12 commented 3 years ago

What's the solution to this problem?

juanmigutierrez commented 2 years ago

This is the same issue solved: https://github.com/business-science/modeltime.gluonts/issues/3