Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
extra-packages: any::rcmdcheck, any::yaml
needs: check

- name: Install reticulate
Expand Down
6 changes: 2 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bundle
Title: Serialize Model Objects with a Consistent Interface
Version: 0.1.2.9000
Version: 0.1.3
Authors@R: c(
person("Julia", "Silge", , "julia.silge@posit.co", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-3671-836X")),
Expand Down Expand Up @@ -30,7 +30,7 @@ Imports:
withr
Suggests:
bonsai,
butcher (>= 0.3.6.9000),
butcher (>= 0.4.0),
callr,
caret,
covr,
Expand Down Expand Up @@ -58,8 +58,6 @@ Suggests:
xgboost (>= 1.6.0.1)
VignetteBuilder:
knitr
Remotes:
tidymodels/butcher
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Config/usethis/last-upkeep: 2025-12-08
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bundle (development version)
# bundle 0.1.3

* Make to work with new versions of xgboost models (#75).
* Updated to support new versions of xgboost models (#75).

# bundle 0.1.2

Expand Down
13 changes: 6 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
[![R-CMD-check](https://github.com/rstudio/bundle/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/bundle/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/bundle)](https://CRAN.R-project.org/package=bundle)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test coverage](https://codecov.io/gh/rstudio/bundle/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/bundle?branch=main)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Codecov test coverage](https://codecov.io/gh/rstudio/bundle/graph/badge.svg)](https://app.codecov.io/gh/rstudio/bundle)
<!-- badges: end -->

Expand Down Expand Up @@ -78,10 +77,10 @@ Fit the boosted tree model:
```{r}
# fit an boosted tree with xgboost via parsnip
mod <-
boost_tree(trees = 5, mtry = 3) |>
set_mode("regression") |>
set_engine("xgboost") |>
fit(mpg ~ ., data = mtcars[1:25,])
boost_tree(trees = 5, mtry = 3) |>
set_mode("regression") |>
set_engine("xgboost") |>
fit(mpg ~ ., data = mtcars[1:25, ])

mod
```
Expand Down Expand Up @@ -120,7 +119,7 @@ r(
unbundled_mod <-
unbundle(bundled_mod)

predict(unbundled_mod, new_data = mtcars[26:32,])
predict(unbundled_mod, new_data = mtcars[26:32, ])
},
args = list(
bundled_mod = bundled_mod
Expand Down
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
[![CRAN
status](https://www.r-pkg.org/badges/version/bundle)](https://CRAN.R-project.org/package=bundle)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Codecov test
coverage](https://codecov.io/gh/rstudio/bundle/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/bundle?branch=main)
[![Codecov test
coverage](https://codecov.io/gh/rstudio/bundle/graph/badge.svg)](https://app.codecov.io/gh/rstudio/bundle)
<!-- badges: end -->

Typically, models in R exist in memory and can be saved as `.rds` files.
Expand Down Expand Up @@ -89,10 +87,10 @@ Fit the boosted tree model:
``` r
# fit an boosted tree with xgboost via parsnip
mod <-
boost_tree(trees = 5, mtry = 3) |>
set_mode("regression") |>
set_engine("xgboost") |>
fit(mpg ~ ., data = mtcars[1:25,])
boost_tree(trees = 5, mtry = 3) |>
set_mode("regression") |>
set_engine("xgboost") |>
fit(mpg ~ ., data = mtcars[1:25, ])

mod
#> parsnip model object
Expand All @@ -110,11 +108,11 @@ mod
#> evaluation_log:
#> iter training_rmse
#> <int> <num>
#> 1 4.618358
#> 2 3.627921
#> 3 2.891176
#> 4 2.300624
#> 5 1.852596
#> 1 4.655552
#> 2 3.648086
#> 3 2.877980
#> 4 2.302021
#> 5 1.850090
```

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

compare(mod, mod2, ignore_formula_env = TRUE)
#> `old$fit$ptr` is <pointer: 0x10b535700>
#> `new$fit$ptr` is <pointer: 0x10b56be40>
#> `old$fit$ptr` is <pointer: 0x11a0cf990>
#> `new$fit$ptr` is <pointer: 0x10bed38a0>
```

Saving and reloading `mod2` didn’t preserve XGBoost’s reference to its
Expand Down Expand Up @@ -158,7 +156,7 @@ r(
unbundled_mod <-
unbundle(bundled_mod)

predict(unbundled_mod, new_data = mtcars[26:32,])
predict(unbundled_mod, new_data = mtcars[26:32, ])
},
args = list(
bundled_mod = bundled_mod
Expand All @@ -167,13 +165,13 @@ r(
#> # A tibble: 7 × 1
#> .pred
#> <dbl>
#> 1 28.7
#> 2 25.0
#> 3 23.7
#> 4 18.0
#> 5 20.3
#> 6 14.9
#> 7 22.2
#> 1 28.6
#> 2 25.8
#> 3 25.8
#> 4 16.7
#> 5 20.2
#> 6 15.3
#> 7 21.2
```

For a more in-depth demonstration of the package, see the [main
Expand Down
10 changes: 8 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## revdepcheck results

We checked 1 reverse dependency, comparing R CMD check results across CRAN and dev versions of this package.
We checked 3 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
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### Failed to check

* ldmppr (NA)
33 changes: 20 additions & 13 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# 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 |
|field |value |
|:--------|:------------------------------------------|
|version |R version 4.5.2 (2025-10-31) |
|os |macOS Tahoe 26.1 |
|system |aarch64, darwin20 |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Denver |
|date |2025-12-09 |
|pandoc |3.8.3 @ /opt/homebrew/bin/ (via rmarkdown) |
|quarto |1.9.3 @ /usr/local/bin/quarto |

# Dependencies

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

# Revdeps

## Failed to check (1)

|package |version |error |warning |note |
|:-------|:-------|:-----|:-------|:----|
|ldmppr |1.0.4 |1 | | |

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

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 3 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
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### Failed to check

* ldmppr (NA)
73 changes: 72 additions & 1 deletion revdep/failures.md
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
*Wow, no problems at all. :)*
# ldmppr

<details>

* Version: 1.0.4
* GitHub: https://github.com/lanedrew/ldmppr
* Source code: https://github.com/cran/ldmppr
* Date/Publication: 2025-02-24 21:00:02 UTC
* Number of recursive dependencies: 128

Run `revdepcheck::revdep_details(, "ldmppr")` for more info

</details>

## In both

* checking whether package ‘ldmppr’ can be installed ... ERROR
```
Installation failed.
See ‘/Users/juliasilge/Work/posit/bundle/revdep/checks.noindex/ldmppr/new/ldmppr.Rcheck/00install.out’ for details.
```

## Installation

### Devel

```
* installing *source* package ‘ldmppr’ ...
** this is package ‘ldmppr’ version ‘1.0.4’
** package ‘ldmppr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.4.4.1)’
using C++17
using SDK: ‘MacOSX26.1.sdk’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/Rcpp/include' -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/Rcpp/include' -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c self_correcting_model.cpp -o self_correcting_model.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o ldmppr.so RcppExports.o self_correcting_model.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R
ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found
ld: warning: search path '/opt/gfortran/lib' not found
ld: library 'emutls_w' not found
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ldmppr.so] Error 1
ERROR: compilation failed for package ‘ldmppr’
* removing ‘/Users/juliasilge/Work/posit/bundle/revdep/checks.noindex/ldmppr/new/ldmppr.Rcheck/ldmppr’


```
### CRAN

```
* installing *source* package ‘ldmppr’ ...
** this is package ‘ldmppr’ version ‘1.0.4’
** package ‘ldmppr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.4.4.1)’
using C++17
using SDK: ‘MacOSX26.1.sdk’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/Rcpp/include' -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/Rcpp/include' -I'/Users/juliasilge/Work/posit/bundle/revdep/library.noindex/ldmppr/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c self_correcting_model.cpp -o self_correcting_model.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o ldmppr.so RcppExports.o self_correcting_model.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R
ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found
ld: warning: search path '/opt/gfortran/lib' not found
ld: library 'emutls_w' not found
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ldmppr.so] Error 1
ERROR: compilation failed for package ‘ldmppr’
* removing ‘/Users/juliasilge/Work/posit/bundle/revdep/checks.noindex/ldmppr/old/ldmppr.Rcheck/ldmppr’


```