When using a custom model (or piece of model), people must include a way to access the source code to recreate the model on pin_read, otherwise they will encounter issues such as:
Unexpected error while running Python API: Can't get attribute 'XXXXXX' on <module '__main__' from 'path_to_app.py'>
Currently, the most ergonomic fix is to include the file where the model is created in deployment bundle, and add an import statement to get the model's class into the file that is being deployed (usually called app.py).
People can do this by hand, but it would be nice to add in programmatically when people use vetiver.write_app() (and consequentially vetiver.prepare_docker and vetiver.deploy_rsconnect).
When using a custom model (or piece of model), people must include a way to access the source code to recreate the model on
pin_read
, otherwise they will encounter issues such as:Currently, the most ergonomic fix is to include the file where the model is created in deployment bundle, and add an import statement to get the model's class into the file that is being deployed (usually called
app.py
).People can do this by hand, but it would be nice to add in programmatically when people use
vetiver.write_app()
(and consequentiallyvetiver.prepare_docker
andvetiver.deploy_rsconnect
).