-
Notifications
You must be signed in to change notification settings - Fork 18
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
[DOCS] deploying custom elements #195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Isabel - thank you for drafting this page. I think it will be helpful! I have made a few suggestions and raised a few questions :)
docs/custom_elements.qmd
Outdated
@@ -0,0 +1,194 @@ | |||
# Creating and deploying custom elements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the term "custom elements" a bit unclear. If I was searching for how to do this in Vetiver, I think I would search for something like:
- How to deploy custom models in Vetiver.
- How to deploy unsupported models in Vetiver.
- How to include custom code in Vetiver.
- How to deploy a Vetiver model with a custom pipeline.
Are you committed already to the term "custom elements"? I also notice we use a few different terms in this doc:
- custom element
- custom model
- custom handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Custom elements" was me trying to find single word that worked for unsupported models/custom code/custom models. I'm open to suggestions if you have something else in mind! Would just calling it custom code make more sense? Even though it's sometimes not custom code, but rather an unsupported model?
If I aligned on one word (custom element or otherwise), and then used
CustomHandler
rather than "custom handler"- "unsupported model" rather than "custom model"
would that be a better indication of what I am referring to?
docs/custom_elements.qmd
Outdated
|
||
To create a custom model handler, you should create a subclass of Vetiver's BaseHandler class. This custom handler should include the following: | ||
|
||
- `model_type`: A static method that declares the type of your model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method deserves more explanation. I am confused about what it does and why I need it. Could I just use a string there?
Maybe it would help if the code included a fully executable example that shows defining the custom handler and then using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a great point. Let me update this to include using the custom handler inside a VetiverModel
object.
Co-authored-by: Sam Edwardes <edwardes.s@gmail.com>
closes #192
closes #175