Skip to content

Commit cdcfa3c

Browse files
authored
Merge branch 'main' into ajr-add-predict-types-issue-1281
2 parents 871fbce + 5c197ab commit cdcfa3c

File tree

272 files changed

+8547
-3746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+8547
-3746
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ derby.log
2222
^vignettes/articles$
2323
^[\.]?air\.toml$
2424
^\.vscode$
25+
^[.]?air[.]toml$

.github/workflows/R-CMD-check.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,19 @@ jobs:
5959
extra-packages: any::rcmdcheck
6060
needs: check
6161

62-
- name: Install reticulate
63-
run: pak::pkg_install('reticulate')
62+
- name: Install dev reticulate
63+
run: pak::pkg_install('rstudio/reticulate')
6464
shell: Rscript {0}
6565

66-
- name: Install Miniconda
67-
# conda can fail at downgrading python, so we specify python version in advance
68-
env:
69-
RETICULATE_MINICONDA_PYTHON_VERSION: "3.8"
70-
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
71-
shell: Rscript {0}
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: 3.11
7269

7370
- name: Install TensorFlow
7471
run: |
75-
tensorflow::install_tensorflow(version='2.13', conda_python_version = NULL)
72+
reticulate::virtualenv_create('r-reticulate', python='3.11')
73+
reticulate::use_virtualenv('r-reticulate')
74+
tensorflow::install_tensorflow(version='2.16')
7675
shell: Rscript {0}
7776

7877
- uses: r-lib/actions/check-r-package@v2

.github/workflows/test-coverage.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ jobs:
3232
shell: Rscript {0}
3333

3434
- name: Install Miniconda
35-
# conda can fail at downgrading python, so we specify python version in advance
36-
env:
37-
RETICULATE_MINICONDA_PYTHON_VERSION: "3.8"
38-
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
35+
run: |
36+
reticulate::install_miniconda()
3937
shell: Rscript {0}
40-
38+
4139
- name: Install TensorFlow
4240
run: |
43-
tensorflow::install_tensorflow(version='2.13', conda_python_version = NULL)
41+
reticulate::conda_create('r-reticulate', packages = c('python==3.11'))
42+
tensorflow::install_tensorflow(version='2.16')
4443
shell: Rscript {0}
4544

4645
- name: Test coverage

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"[r]": {
33
"editor.formatOnSave": true,
44
"editor.defaultFormatter": "Posit.air-vscode"
5+
},
6+
"[quarto]": {
7+
"editor.formatOnSave": true,
8+
"editor.defaultFormatter": "quarto.quarto"
59
}
610
}

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: parsnip
22
Title: A Common API to Modeling and Analysis Functions
3-
Version: 1.3.3.9000
3+
Version: 1.3.3.9001
44
Authors@R: c(
55
person("Max", "Kuhn", , "[email protected]", role = c("aut", "cre")),
66
person("Davis", "Vaughan", , "[email protected]", role = "aut"),
@@ -71,7 +71,7 @@ Suggests:
7171
VignetteBuilder:
7272
knitr
7373
ByteCompile: true
74-
Config/Needs/website: brulee, C50, dbarts, earth, glmnet, keras, kernlab,
74+
Config/Needs/website: brulee, C50, dbarts, earth, glmnet, grf, keras, kernlab,
7575
kknn, LiblineaR, mgcv, nnet, parsnip, quantreg, randomForest, ranger,
7676
rpart, rstanarm, tidymodels/tidymodels, tidyverse/tidytemplate,
7777
rstudio/reticulate, xgboost, rmarkdown
@@ -80,4 +80,4 @@ Config/testthat/edition: 3
8080
Encoding: UTF-8
8181
LazyData: true
8282
Roxygen: list(markdown = TRUE)
83-
RoxygenNote: 7.3.2
83+
RoxygenNote: 7.3.3

NEWS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# parsnip (development version)
22

3+
* Fixes issue with running predictions for Decision Trees in Spark (#1309)
4+
5+
* Updates to some boosting tuning parameter information: (#1306)
6+
- lightgbm and catboost have smaller default ranges for the learning rate: -3 to -1 / 2 in log10 units.
7+
- lightgbm, xgboost, catboost, and C5.0 have smaller default ranges for the sampling proportion: 0.5 to 1.0.
8+
- catboost engine arguments were added for `max_leaves` and `l2_leaf_reg`.
9+
10+
* Enable generalized random forest (`grf`) models for classification, regression, and quantile regression modes. (#1288)
11+
12+
* `surv_reg()` is now defunct and will error if called. Please use `survival_reg()` instead (#1206).
13+
14+
* Enable parsnip to work with xgboost version > 2.0.0.0. (#1227)
15+
316
# parsnip 1.3.3
417

518
* Bug fix in how tunable parameters were configured for brulee neural networks.

R/aaa-import-standalone-obj-type.R

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ obj_type_friendly <- function(x, value = TRUE) {
8989
typeof(x),
9090
logical = "`NA`",
9191
integer = "an integer `NA`",
92-
double =
93-
if (is.nan(x)) {
94-
"`NaN`"
95-
} else {
96-
"a numeric `NA`"
97-
},
92+
double = if (is.nan(x)) {
93+
"`NaN`"
94+
} else {
95+
"a numeric `NA`"
96+
},
9897
complex = "a complex `NA`",
9998
character = "a character `NA`",
10099
.rlang_stop_unexpected_typeof(x)
@@ -296,14 +295,16 @@ obj_type_oo <- function(x) {
296295
#' @param ... Arguments passed to [abort()].
297296
#' @inheritParams args_error_context
298297
#' @noRd
299-
stop_input_type <- function(x,
300-
what,
301-
...,
302-
allow_na = FALSE,
303-
allow_null = FALSE,
304-
show_value = TRUE,
305-
arg = caller_arg(x),
306-
call = caller_env()) {
298+
stop_input_type <- function(
299+
x,
300+
what,
301+
...,
302+
allow_na = FALSE,
303+
allow_null = FALSE,
304+
show_value = TRUE,
305+
arg = caller_arg(x),
306+
call = caller_env()
307+
) {
307308
# From standalone-cli.R
308309
cli <- env_get_list(
309310
nms = c("format_arg", "format_code"),

0 commit comments

Comments
 (0)