akgold / do4ds

A book on DevOps for Data Scientists with CRC Press.
https://do4ds.com
Other
121 stars 26 forks source link

Lab Order - DuckDB used in Lab2 but created in Lab3 #251

Open gmtanner-cord opened 2 months ago

gmtanner-cord commented 2 months ago

I am reading through the book and working through the labs. I am considering using the early chapters of the book as a text for course that I am teaching in the fall.

I am running into some issues with Lab2 (model-vetiver.qmd). The file uses a duckdb for the palmerpenquins but the duckdb database isn't created until the next lab. I modified the file to be more similar to the first lab and that worked for that portion of the lab. [Still trying to get the pins storage to work].

durraniu commented 2 months ago

I've added 2 lines for adding penguins dataframe to duckdb in this issue.

What issue are you encountering with pins storage? In my case, this code cell works even if I do not create /data/model directory:

from pins import board_folder
from vetiver import vetiver_pin_write

model_board = board_folder("/data/model", allow_pickle_read = True)
vetiver_pin_write(model_board, v)

Running this code also does not create /data/model. And when I try to get the model back from pins, it works without any errors: VetiverModel.from_pin(model_board, 'penguin_model')