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

Include custom model class with deployment #187

Open
isabelizimm opened this issue Aug 11, 2023 · 0 comments
Open

Include custom model class with deployment #187

isabelizimm opened this issue Aug 11, 2023 · 0 comments
Labels

Comments

@isabelizimm
Copy link
Contributor

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).

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

No branches or pull requests

1 participant