Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robyn_refresh fails to plot refreshed results when plot_folder is specified #506

Closed
openerror opened this issue Oct 4, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@openerror
Copy link

Project Robyn

Describe issue

I am trying to refresh a Robyn model persisted to JSON. The (re)training went fine, but R displays an error when trying to save refreshed plots and CSVs to file. Here is the code I ran.

data("dt_prophet_holidays")

df <- read_csv("data/DesignHome_ANDROID.csv") %>%
    mutate(INSTALL_DATE = as.Date(INSTALL_DATE, format="%Y-%m-%d"))

RobynRefresh <- robyn_refresh(
    json_file = json_file,
    dt_input = df,
    dt_holidays = dt_prophet_holidays,
    plot_folder = "robyn_results/refresh_attempt",
    refresh_steps = 7,
    refresh_iters = 700, # 1k is an estimation
    refresh_trials = 5
)

And here is a screenshot of the error.
Screen Shot 2022-10-04 at 2 20 50 PM

Most output is generated and present, except the files prefixed report_*. There are no report_decomposition.png and report_actual_fitted.png; the associated CSVs are absent, too.

This problem disappears if I do not specify a plot_folder when calling robyn_refresh.

Provide reproducible example

Here is the obfuscated CSV containing refreshed data, along with a JSON file of the model I intend to refresh. (Extension .json changed to .txt, so that GitHub would allow the upload.)

RobynModel-1_433_1.txt

bug_report.csv

Environment & Robyn version

Robyn 3.7.2, R 4.2.1

@laresbernardo laresbernardo self-assigned this Oct 4, 2022
@laresbernardo laresbernardo added the bug Something isn't working label Oct 4, 2022
@laresbernardo
Copy link
Collaborator

Thanks for reporting this issue and special thanks for sharing a reproducible example; without it would have been pretty hard to debug. That said, I've deployed a fix into the master branch that should take care of this case. Can you please update Robyn to the latest dev version, retry, and let me know if it ran OK?

@openerror
Copy link
Author

openerror commented Oct 5, 2022

Robyn is now producing all expected output files. Thanks for the quick fix!

@openerror openerror reopened this Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants