rstudio / rstudio/vetiver-python
Include custom model class with deployment
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace how vetiver.write_app() builds deployment bundles and how prepare_docker and deploy_rsconnect consume them, then inspect the pin_read failure described for custom model classes. Define how source files and imports should be included so a custom model can be recreated without manual setup, and verify the behavior across the affected deployment paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100