Skip to content

Commit

Permalink
Move content around, sketch out where we want certain topics
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Aug 13, 2023
1 parent 521a318 commit 1b56040
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 25 deletions.
25 changes: 2 additions & 23 deletions slides/01-introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,6 @@ tr = tree.DecisionTreeRegressor().fit(le.transform(X_train), y_train)
abalone_fit = pipeline.Pipeline([('label_encoder', le), ('decision_tree', tr)])
```

## Bind preprocessors and models together

![](images/good_workflow.png){fig-align="center"}


## What is wrong with this? {.annotation}

![](images/bad_workflow.png){fig-align="center"}


## Your turn 🏺 {transition="slide-in"}
Expand Down Expand Up @@ -496,28 +488,15 @@ board |> vetiver_pin_write(v)

:::

# Make it easy to do the right thing

- Robust and human-friendly checking of new data
- Track and document software dependencies of models
- [Model cards](https://vetiver.rstudio.com/learn-more/model-card.html) for transparent, responsible reporting

# Make it easy to do the right thing

![](images/vetiver-templates.png){fig-align="center"}


## Your turn 🏺 {transition="slide-in"}

*Pin your vetiver model object to a temporary board.*

*Open the Model Card template, and spend a few minutes exploring how you might create a Model Card for this abalone rings model.*

*Discuss something you notice about the Model Card with your neighbor.*
*Retrieve the model metadata with `pin_meta()`.*

```{r}
#| echo: false
countdown(minutes = 7)
countdown(minutes = 5)
```

# Posit Connect
Expand Down
32 changes: 30 additions & 2 deletions slides/02-deploy.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,29 @@ board = board_connect(server_url=rsc_url, api_key=api_key, allow_pickle_read = T
vetiver_pin_write(board, v)
```


# Make it easy to do the right thing

- Robust and human-friendly checking of new data
- Track and document software dependencies of models
- [Model cards](https://vetiver.rstudio.com/learn-more/model-card.html) for transparent, responsible reporting

# Make it easy to do the right thing

![](images/vetiver-templates.png){fig-align="center"}

## Your turn 🏺 {transition="slide-in"}

*Open the Model Card template, and spend a few minutes exploring how you might create a Model Card for this abalone rings model.*

*Discuss something you notice about the Model Card with your neighbor.*

```{r}
#| echo: false
countdown(minutes = 7)
```


## You can deploy your model as a...

. . .
Expand Down Expand Up @@ -278,10 +301,12 @@ predict(endpoint = endpoint, data = ring_test)

*Predict with your endpoint for new data.*

*Optional: call another endpoint from Python or R.*


```{r}
#| echo: false
countdown(minutes = 5)
countdown(minutes = 10)
```

## Your turn 🏺 {transition="slide-in"}
Expand All @@ -290,7 +315,7 @@ countdown(minutes = 5)

*Predict with your endpoint for new data.*

*You get extra credit if your neighbor's model is in a different language than yours.*
*You get extra credit if your neighbor's model is in a different language than yours!*


```{r}
Expand Down Expand Up @@ -342,3 +367,6 @@ h = { 'Authorization': f'Key {api_key}' }
predict(endpoint = endpoint, data = ring_test, headers = h)
```

# Model input prototype

tktk
65 changes: 65 additions & 0 deletions slides/03-deploy.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "3 - Deeper into deployment"
subtitle: "Deploy and maintain models with vetiver"
format:
revealjs:
slide-number: true
footer: <https://posit-conf-2023.github.io/vetiver>
preview-links: auto
incremental: true
theme: [default]
width: 1280
height: 720
knitr:
opts_chunk:
echo: true
collapse: true
comment: "#>"
---

```{r}
#| include: false
#| file: setup.R
```

## Plan for this workshop

::: nonincremental
- *Versioning*
- Managing change in models ✅
- *Deploying*
- Putting models in REST APIs 🎯
- *Monitoring*
- Tracking model performance 👀
:::

# Where does vetiver work?

- Posit's pro products, like [Connect](https://posit.co/products/enterprise/connect/)

- AWS SageMaker (R only, for now)

- A public or private cloud, using Docker

# Docker

tktk

# Deploy preprocessors and models together

tktk more substantive feature engineering (like with learned transformation from training data)

## Deploy preprocessors and models together

![](images/good_workflow.png){fig-align="center"}


## What is wrong with this?

![](images/bad_workflow.png){fig-align="center"}

# Model metrics as metadata

tktk like https://vetiver.rstudio.com/learn-more/metrics-metadata.html

Transition to model monitoring at end
4 changes: 4 additions & 0 deletions slides/04-monitor.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ tktk

tktk

## Connect model metrics to business outcomes

tktk

## Possible model monitoring artifacts

- Adhoc analysis that you post in Slack
Expand Down

0 comments on commit 1b56040

Please sign in to comment.