Skip to content

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

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

Co-authored-by: Sam Edwardes <edwardes.s@gmail.com>
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