Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Include custom model class with deployment

未关闭
#187 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

跟踪 vetiver.write_app() 如何构建部署 bundle,以及 prepare_docker 和 deploy_rsconnect 如何使用这些 bundle,然后检查所描述的自定义模型类的 pin_read 失败问题。定义应如何包含源文件和导入,以便无需手动设置即可重新创建自定义模型,并验证其在受影响的部署路径中的行为。

由索引模型根据 Issue 内容生成。

描述

deploy

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

主要语言
Python
星标
71
派生
20
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rstudio/vetiver-python 的其他 Issue

查看 rstudio/vetiver-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。