Skip to content

Commit 92349c6

Browse files
committed
remove quarto profiling, not needed
1 parent a6b83aa commit 92349c6

8 files changed

Lines changed: 101 additions & 53 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,26 @@ jobs:
2525
uses: quarto-dev/quarto-actions/setup@v2
2626
- name: build docs
2727
run: |
28-
make docs-latest
28+
make docs
2929
- name: save docs
3030
uses: actions/upload-artifact@v3
3131
with:
3232
name: docs-html
33-
path: docs/_site/
34-
- name: publish dev docs
35-
if: github.ref_name == 'main' && github.ref_type == 'branch'
36-
run: |
37-
make docs-
33+
path: docs/_site
3834
- name: publish dev docs
3935
if: github.ref_name == 'main' && github.ref_type == 'branch'
4036
uses: peaceiris/actions-gh-pages@v3
4137
with:
4238
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: docs/latest/*
39+
publish_dir: docs/_site/*
4440
publish_branch: gh-pages
4541
destination_dir: main
4642
- name: publish stable docs
4743
if: github.ref_type == 'tag' && startswith(github.ref, 'refs/tags/v')
4844
uses: peaceiris/actions-gh-pages@v3
4945
with:
5046
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
publish_dir: docs/stable/*
47+
publish_dir: docs/_site/*
5248
publish_branch: gh-pages
5349
destination_dir: ${{ github.ref_name }}
5450
- name: create symlink stable to new version

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ coverage:
6060
coverage html
6161
$(BROWSER) htmlcov/index.html
6262

63-
docs doc documentation: docs-latest docs-stable
64-
65-
docs-latest:
66-
$(MAKE) -C docs latest
67-
68-
docs-stable:
69-
$(MAKE) -C docs stable
63+
docs doc documentation:
64+
$(MAKE) -C docs docs
7065

7166
release: dist
7267
twine upload dist/*

docs/Makefile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# Minimal makefile for quartodoc documentation
22

3-
.PHONY: help Makefile stable latest
3+
.PHONY: help Makefile
44

55
# Catch-all target:
66
%: Makefile
7-
8-
9-
latest:
10-
python version_config.py
11-
python -m quartodoc build
12-
python -m quartodoc interlinks
13-
quarto render --profile latest
14-
15-
stable:
167
python version_config.py
178
python -m quartodoc build
189
python -m quartodoc interlinks
19-
quarto render
10+
quarto preview

docs/_environment

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
LATEST=0.2.0.post10+g578f644.d20230213
2-
STABLE=0.2.0
1+
VERSION=0.2.0.post11+ga6b83aa.d20230214

docs/_quarto-latest.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/_quarto-stable.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/_quarto.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
project:
22
type: website
3-
pre-render: prepare.py
3+
pre-render: version_config.py
4+
output-dir: _site
45

56
website:
67
title: "Vetiver {{< env VERSION >}}"
@@ -21,22 +22,25 @@ website:
2122
href: https://github.com/rstudio/vetiver-python
2223
aria-label: Vetiver python GitHub
2324
navbar:
24-
logo: figures/logo.svg
25-
search: true
26-
left:
27-
- text: "Reference"
28-
file: reference/index.qmd
29-
- text: "Advanced Usage"
30-
menu:
31-
- custom_handler.md
32-
- text: "Changelog"
33-
file: changelog.md
34-
- text: "Vetiver main site"
35-
href: https://vetiver.rstudio.com
25+
logo: figures/logo.svg
26+
search: true
27+
left:
28+
- href: index.qmd
29+
text: Home
30+
- text: "Reference"
31+
file: reference/index.qmd
32+
- text: "Advanced Usage"
33+
menu:
34+
- custom_handler.md
35+
- text: "Changelog"
36+
file: changelog.md
37+
- text: "Vetiver main site"
38+
href: https://vetiver.rstudio.com
3639

3740
quartodoc:
3841
style: pkgdown
3942
package: vetiver
43+
display_name: full
4044
sidebar: "_sidebar.yml"
4145
sections:
4246
- title: Version

docs/index.qmd

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,77 @@
1-
# Vetiver
1+
# vetiver <a href='https://rstudio.github.io/vetiver-python/'><img src='figures/logo.png' align="right" height="139" /></a>
22

3-
The goal of vetiver is to provide fluent tooling to version, share, deploy, and monitor a trained model. Functions handle both recording and checking the model’s input data prototype, and predicting from a remote API endpoint. You can use vetiver with:
3+
<!-- badges: start -->
44

5-
- [scikit-learn](https://scikit-learn.org/stable/)
6-
- [pytorch](https://pytorch.org/)
7-
- [statsmodels](https://www.statsmodels.org/)
8-
- [xgboost](https://xgboost.readthedocs.io/)
5+
[![Lifecycle:
6+
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![codecov](https://codecov.io/gh/isabelizimm/vetiver-python/branch/main/graph/badge.svg?token=CW6JHVS6ZX)](https://codecov.io/gh/isabelizimm/vetiver-python)
7+
8+
<!-- badges: end -->
9+
10+
_Vetiver, the oil of tranquility, is used as a stabilizing ingredient in perfumery to preserve more volatile fragrances._
11+
12+
The goal of vetiver is to provide fluent tooling to version, share, deploy, and monitor a trained model. Functions handle both recording and checking the model's input data prototype, and predicting from a remote API endpoint. The vetiver package is extensible, with generics that can support many kinds of models, and available for both Python and R. To learn more about vetiver, see:
13+
14+
- the documentation at <https://vetiver.rstudio.com/>
15+
- the R package at <https://rstudio.github.io/vetiver-r/>
16+
17+
You can use vetiver with:
18+
19+
- [scikit-learn](https://scikit-learn.org/)
20+
- [torch](https://pytorch.org/)
21+
- [statsmodels](https://www.statsmodels.org/stable/index.html)
22+
- [xgboost](https://xgboost.readthedocs.io/en/stable/)
23+
- or utilize [custom handlers](https://rstudio.github.io/vetiver-python/stable/advancedusage/custom_handler.html) to support your own models!
24+
25+
## Installation
26+
27+
You can install the released version of vetiver from [PyPI](https://pypi.org/project/vetiver/):
28+
29+
```python
30+
python -m pip install vetiver
31+
```
32+
33+
And the development version from [GitHub](https://github.com/rstudio/vetiver-python) with:
34+
35+
```python
36+
python -m pip install git+https://github.com/rstudio/vetiver-python
37+
```
38+
39+
## Example
40+
41+
A `VetiverModel()` object collects the information needed to store, version, and deploy a trained model.
42+
43+
```python
44+
from vetiver import mock, VetiverModel
45+
46+
X, y = mock.get_mock_data()
47+
model = mock.get_mock_model().fit(X, y)
48+
49+
v = VetiverModel(model, model_name='mock_model', prototype_data=X)
50+
```
51+
52+
You can **version** and **share** your `VetiverModel()` by choosing a [pins](https://rstudio.github.io/pins-python/) "board" for it, including a local folder, RStudio Connect, Amazon S3, and more.
53+
54+
```python
55+
from pins import board_temp
56+
from vetiver import vetiver_pin_write
57+
58+
model_board = board_temp(versioned = True, allow_pickle_read = True)
59+
vetiver_pin_write(model_board, v)
60+
```
61+
62+
You can **deploy** your pinned `VetiverModel()` using `VetiverAPI()`, an extension of [FastAPI](https://fastapi.tiangolo.com/).
63+
64+
```python
65+
from vetiver import VetiverAPI
66+
app = VetiverAPI(v, check_prototype = True)
67+
```
68+
69+
To start a server using this object, use `app.run(port = 8080)` or your port of choice.
70+
71+
## Contributing
72+
73+
This project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
74+
75+
- For questions and discussions about deploying models, statistical modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=vetiver,question).
76+
77+
- If you think you have encountered a bug, please [submit an issue](https://github.com/rstudio/vetiver-python/issues).

0 commit comments

Comments
 (0)