rstudio / vetiver-python

Version, share, deploy, and monitor models.
https://rstudio.github.io/vetiver-python/stable/
MIT License
60 stars 17 forks source link

Refactor metadata #126

Closed isabelizimm closed 1 year ago

isabelizimm commented 1 year ago
machow commented 1 year ago

One last high-level thought: I just realized you could stash the model inside a dictionary (like R vetiver does). joblib should be able to serialize / deserialize a dictionary where one field is a model. (But also this way of handling the metadata seems totally reasonable!).

isabelizimm commented 1 year ago

One last high-level thought: I just realized you could stash the model inside a dictionary (like R vetiver does). joblib should be able to serialize / deserialize a dictionary where one field is a model. (But also this way of handling the metadata seems totally reasonable!).

This would make sense if I wanted to mimic R and move ptype and required_pkgs into the dictionary as well (effectively removing the need for vetiver_meta inside a pin). Although, I could pin just a dictionary with just the model, nothing else (unclear what value that would add?). Downfalls of this is that you would have to load the entire joblib file to be able to see the ptype and required_pkgs, which might be useful to be able to see without loading this file.

https://github.com/rstudio/vetiver-r/pull/116 is related to this.

machow commented 1 year ago

Thanks -- that's helpful context around why you have done it this way!