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

Handling input and files in tensorflow-drake.Rmd #4

Closed
wlandau opened this issue Mar 19, 2019 · 2 comments
Closed

Handling input and files in tensorflow-drake.Rmd #4

wlandau opened this issue Mar 19, 2019 · 2 comments

Comments

@wlandau
Copy link
Contributor

wlandau commented Mar 19, 2019

Functions file_in(), file_out() and knitr_in() tell drake about file dependencies so make() can respond to changes. I suggest we use them in commands that deal with files.

plan <- drake_plan(
  customer_data = read_csv(file_in("customer_churn.csv")),
  save_rec_obj = save(rec_obj, file = file_out("rec_obj.RData")),
  # ...
)

I would also like to discuss the storage of rec_object and model_keras.

  • What is the rationale behind creating rec_obj.RData? We can already readd(rec_obj), and in general, I do not think we should create special files too often. But then again, it is sometimes convenient to store certain results separately. In fact, in my day job, I just did this for a dashboard in order to avoid having to upload the entire .drake/ cache.
  • If we want to allow other workflows to make use of the models we train, we might want to track the newmodel/ files using file_out(). Unfortunately, however, drake cannot hash/track entire directories. Is it possible to pick a subset of files that (1) have stable paths and (2) fully represent the important parts of the exported model?
@wlandau
Copy link
Contributor Author

wlandau commented Mar 22, 2019

I take back what I said about newmodel above. Today, I enhanced drake so that file_out() and file_in() can handle entire directories (ref: ropensci/drake#795). In development drake, we can simply write drake_plan(save_model = keras:::export_savedmodel.keras.engine.training.Model(model_keras, file_out("newmodel"))). I plan to release this functionality to CRAN with drake version 7.1.0 on April 10.

@edgararuiz-zz
Copy link

Fixed by 7e0a686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants