mitchelloharawild / fable.prophet

fable extension for the prophet forecasting procedure
https://pkg.mitchelloharawild.com/fable.prophet
55 stars 8 forks source link

Models are null after a fit #21

Closed mmaldo closed 4 years ago

mmaldo commented 4 years ago

https://snipboard.io/GaPQlf.jpg

see the attached screenshot. My prophet models keep coming out null. This was on Windows and mac. The mac was a fresh R install. This is R 3.6.3.

mitchelloharawild commented 4 years ago

Could you provide a minimally reproducible example? https://www.tidyverse.org/help/

mmaldo commented 4 years ago

I tried to provide a reproducible example but it wasn't working correctly. I don't know if my prophet library got updated or if it was something else. I have used prophet before to make forecasts. However, I ran the prophet tutorial again on the main website and it recompiled the prophet method. After that, fable.prophet stated working.

mitchelloharawild commented 4 years ago

I've been able to reproduce this issue with a fresh install. It seems that prophet does some atypical package installation manipulation on first run.

mmaldo commented 4 years ago

It also is sort of problem if you are trying to deploy to shinyapps.io

mitchelloharawild commented 4 years ago

I've made a pull request which should fix this issue here: https://github.com/facebook/prophet/pull/1435

mitchelloharawild commented 4 years ago

Until that is accepted, and prophet is updated on CRAN, you should be able to fix the issue by attaching prophet onto the search path. Note that there will be a conflict in the name of the model function prophet(), so be careful in the order you load the packages, or be explicit with fable.prophet::prophet() in your model() functions.

library(prophet)
library(fable.prophet)
mmaldo commented 4 years ago

Thank you. I've been looking for the command to add to search path is it .libPaths?

mitchelloharawild commented 4 years ago

You just need to explicitly load it with library(prophet). When you run library(fable.prophet) only, this doesn't happen.