Open aephidayatuloh opened 10 months ago
Ah, what is happening here is that vetiver_write_plumber()
is trying to automatically generate a plumber file for you, but the Google Drive pins board doesn't support that kind of automated code generation because we don't have a method for it in pins.
The main reason we haven't added that is that Google Drive is S L O W for reading big objects like models (even for small files, too, in my experience) and I don't expect it to be useful for realistic use cases. If you use Google Drive to store your model, it will take a really long time for your vetiver API to be up and ready to go. In the framing of my recent MLOps talk, it will have really terrible performance in the software sense (not statistical sense).
Is it possible for you to use another pins backend to store your model? One more suited to serving predictions via an API? Or can you share a little more about why you are wanting to use Google Drive?
Thank you @juliasilge for your explanation.
First, I'm new to vetiver but I found it is very useful. I'm just trying to use Google Drive as my board because my company uses Google Drive as cloud storage services. So Ithink "why not I use it to store my model?". FYI, I've successfully deploy vetiver model using pins board_folder()
.
If I still want to use Google Drive as my board, can I just use board_folder()
to generate model file, plumber.R, dockerfile and vetiver_renv.lock and then upload all the files to my gdrive manually So I still can use gdrive as my board? And how about the computational performance after my API ready?
I am afraid that Google Drive will be just super duper slow no matter how you use it, but certainly your constraints might be different than what I am picturing.
Would you be willing to try this out:
board_folder()
board_gdrive()
instead of board_folder()
, i.e. replace the pins code with board <- board_gdrive("folder-for-your-model")
If this works OK for your constraints, then certainly I could add the board_deparse
method to pins so this will work more as you expected it to.
Hi,
I use google drive as a board and get error when write plumber.
Anyone can help me to understand and solve this problem? Thank you.