business-science / modeltime.gluonts

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

Errors for setting dials for certain parameters (hyperparameter tuning) #17

Closed flrs closed 3 years ago

flrs commented 3 years ago

I am trying to set up modeltime.gluonts for hyperparameter tuning. I am running the following code snippet:

library(modeltime.gluonts)

model_spec_tune <- deep_ar(
  id = "id",
  freq = "5min",
  prediction_length = 10,
  num_layers = tune(),
  #num_cells = tune(), # same error here
  #scale = tune() # same error here
) %>%
  set_engine("gluonts_deepar")

parameters(model_spec_tune)

When executing the last line (parameters(model_spec_tune)), I get the following error:

Error (buggy.R#14): Problem with `mutate()` input `object`.
✖ Error when calling num_layers(): Error : 'num_layers' is not an exported object from 'namespace:modeltime.gluonts'

ℹ Input `object` is `purrr::map(call_info, eval_call_info)`.

A similar error pops up for the num_cells and scale parameters. Other parameters (e.g. dropout, epochs) work fine.

Am I missing something or is this a bug?

tonyk7440 commented 3 years ago

I think the reason for this is that those parameters don't have tuning functions created yet, see https://github.com/business-science/modeltime.gluonts/issues/14

mdancho84 commented 3 years ago

Yes, that is correct. I haven't yet created all of the potential tuning parameters.

flrs commented 3 years ago

Thanks @tonyk7440 and @mdancho84. Let's continue the discussion in #14.