Skip to content

Commit

Permalink
Release candidate 0.1.2 (#69)
Browse files Browse the repository at this point in the history
* Release candidate 0.1.2

* Update roxygen, `.Rbuildignore`
  • Loading branch information
juliasilge authored Nov 12, 2024
1 parent 51fbfb4 commit e62849a
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 34 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
^docs$
^pkgdown$
^CRAN-SUBMISSION$
^\.python-version$
^revdep$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# bundle (development version)

* Added bundle method for objects from `dbarts::bart()` and, by extension,
`parsnip::bart(engine = "dbarts")` (#64).
* Added bundle method for objects from `dbarts::bart()` and, by extension, `parsnip::bart(engine = "dbarts")` (#64).

* Bundling xgboost objects now takes extra steps to preserve `nfeatures` and `feature_names` (#67).

Expand Down
12 changes: 6 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ output: github_document
<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
should_eval <-
rlang::is_installed("xgboost") &&
should_eval <-
rlang::is_installed("xgboost") &&
rlang::is_installed("parsnip") &&
rlang::is_installed("callr")
Expand Down Expand Up @@ -55,7 +55,7 @@ We need some way to preserve access to those references. The bundle package prov
knitr::include_graphics("man/figures/diagram_04.png")
```

For more on this diagram, see the [main bundle vignette](https://rstudio.github.io/bundle/articles/bundle.html).
For more on this diagram, see the [main bundle vignette](https://rstudio.github.io/bundle/articles/bundle.html).

When you're ready to save your model, `bundle()` it first. Once you've loaded it in a new setting, `unbundle()` it!

Expand Down Expand Up @@ -115,8 +115,8 @@ r(
func = function(bundled_mod) {
library(bundle)
library(parsnip)
unbundled_mod <-
unbundled_mod <-
unbundle(bundled_mod)
predict(unbundled_mod, new_data = mtcars[26:32,])
Expand All @@ -133,7 +133,7 @@ For a more in-depth demonstration of the package, see the [main vignette](https:

This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

- For questions and discussions about our packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=question).
- For questions and discussions about our packages, modeling, and machine learning, please [post on RStudio Community](https://forum.posit.co/new-topic?category_id=15&tags=question).

- If you think you have encountered a bug, please [submit an issue](https://github.com/rstudio/bundle/issues).

Expand Down
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ mod
#> niter: 5
#> nfeatures : 10
#> evaluation_log:
#> iter training_rmse
#> 1 14.640496
#> 2 10.927976
#> 3 8.217181
#> 4 6.262192
#> 5 4.796391
#> iter training_rmse
#> <num> <num>
#> 1 14.631798
#> 2 10.896629
#> 3 8.188981
#> 4 6.173644
#> 5 4.707690
```

Note that simply saving and loading the model results in changes to the
Expand All @@ -129,7 +130,7 @@ saveRDS(mod, temp_file)
mod2 <- readRDS(temp_file)

compare(mod, mod2, ignore_formula_env = TRUE)
#> `old$fit$handle` is <pointer: 0x12fa5adc0>
#> `old$fit$handle` is <pointer: 0x11c1707c0>
#> `new$fit$handle` is <pointer: 0x0>
#>
#> `old$fit$handle` is attr(,"class")
Expand Down Expand Up @@ -163,8 +164,8 @@ r(
func = function(bundled_mod) {
library(bundle)
library(parsnip)
unbundled_mod <-

unbundled_mod <-
unbundle(bundled_mod)

predict(unbundled_mod, new_data = mtcars[26:32,])
Expand All @@ -176,13 +177,13 @@ r(
#> # A tibble: 7 × 1
#> .pred
#> <dbl>
#> 1 22.2
#> 2 20.9
#> 3 19.1
#> 4 13.3
#> 5 16.6
#> 6 13.3
#> 7 17.2
#> 1 22.3
#> 2 22.3
#> 3 20.4
#> 4 14.5
#> 5 14.5
#> 6 12.1
#> 7 17.0
```

For a more in-depth demonstration of the package, see the [main
Expand All @@ -195,14 +196,14 @@ This project is released with a [Contributor Code of
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.

- For questions and discussions about our packages, modeling, and
machine learning, please [post on RStudio
Community](https://community.rstudio.com/new-topic?category_id=15&tags=question).
- For questions and discussions about our packages, modeling, and
machine learning, please [post on RStudio
Community](https://forum.posit.co/new-topic?category_id=15&tags=question).

- If you think you have encountered a bug, please [submit an
issue](https://github.com/rstudio/bundle/issues).
- If you think you have encountered a bug, please [submit an
issue](https://github.com/rstudio/bundle/issues).

- Either way, learn how to create and share a
[reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html)
(a minimal, reproducible example), to clearly communicate about your
code.
- Either way, learn how to create and share a
[reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html)
(a minimal, reproducible example), to clearly communicate about your
code.
7 changes: 7 additions & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
checks
library
checks.noindex
library.noindex
cloud.noindex
data.sqlite
*.html
23 changes: 23 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Platform

|field |value |
|:--------|:------------------------------|
|version |R version 4.4.0 (2024-04-24) |
|os |macOS 15.0.1 |
|system |aarch64, darwin20 |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Denver |
|date |2024-11-11 |
|pandoc |3.5 @ /opt/homebrew/bin/pandoc |

# Dependencies

|package |old |new |Δ |
|:-------|:-----|:----------|:--|
|bundle |0.1.1 |0.1.1.9000 |* |

# Revdeps

7 changes: 7 additions & 0 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

1 change: 1 addition & 0 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions tests/testthat/test_bundle_h2o.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("bundling + unbundling h2o fits (regression)", {
skip_on_cran()
skip_if(!interactive())
skip_if_not_installed("h2o")
skip_if_not_installed("butcher")
Expand Down

0 comments on commit e62849a

Please sign in to comment.