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

[DOCS] deploying custom elements #195

Merged
merged 13 commits into from
Oct 27, 2023
Merged

[DOCS] deploying custom elements #195

merged 13 commits into from
Oct 27, 2023

Conversation

isabelizimm
Copy link
Contributor

@isabelizimm isabelizimm commented Oct 13, 2023

closes #192

closes #175

Copy link
Collaborator

@SamEdwardes SamEdwardes left a 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 Show resolved Hide resolved
@@ -0,0 +1,194 @@
# Creating and deploying custom elements
Copy link
Collaborator

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

Copy link
Contributor Author

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?


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.
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@isabelizimm isabelizimm merged commit e7cb91d into main Oct 27, 2023
11 checks passed
@isabelizimm isabelizimm deleted the custom-docs branch October 27, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use vetiver with custom pipelines add diagram of API + endpoints on docs
2 participants