Skip to content

Commit

Permalink
Merge pull request #196 from tidymodels/parsnip-update-2025
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt authored Jan 27, 2025
2 parents 8881f14 + f7a771c commit a928d70
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Depends:
R (>= 3.6)
Imports:
cli (>= 3.0.0),
dials (>= 1.1.0),
dials (>= 1.3.0),
dplyr (>= 1.0.9),
flexclust (>= 1.3-6),
foreach,
Expand Down
2 changes: 1 addition & 1 deletion R/arguments.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ set_args.cluster_spec <- function(object, ...) {
#' @inheritParams parsnip::set_mode
#' @return An updated [`cluster_spec`] object.
#' @export
set_mode.cluster_spec <- function(object, mode) {
set_mode.cluster_spec <- function(object, mode, ...) {
cls <- class(object)[1]
if (rlang::is_missing(mode)) {
spec_modes <- rlang::env_get(
Expand Down
2 changes: 1 addition & 1 deletion R/tune_cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ check_grid <- function(grid, workflow, pset = NULL) {
}
check_workflow(workflow, pset = pset, check_dials = TRUE)

grid <- dials::grid_latin_hypercube(pset, size = grid)
grid <- dials::grid_space_filling(pset, size = grid)
grid <- dplyr::distinct(grid)
}

Expand Down
2 changes: 1 addition & 1 deletion man/set_args.cluster_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/set_engine.cluster_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/set_mode.cluster_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions tests/testthat/_snaps/tune_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,14 @@
Condition
Warning:
The `...` are not used in this function but one or more objects were passed: 'something'
Warning:
`grid_latin_hypercube()` was deprecated in dials 1.3.0.
i Please use `grid_space_filling()` instead.
Output
# Tuning results
# 2-fold cross-validation
# A tibble: 2 x 4
splits id .metrics .notes
<list> <chr> <list> <list>
1 <split [16/16]> Fold1 <tibble [4 x 5]> <tibble [0 x 3]>
2 <split [16/16]> Fold2 <tibble [4 x 5]> <tibble [0 x 3]>
1 <split [16/16]> Fold1 <tibble [6 x 5]> <tibble [0 x 3]>
2 <split [16/16]> Fold2 <tibble [6 x 5]> <tibble [0 x 3]>

# select_best() and show_best() works

Expand Down
1 change: 1 addition & 0 deletions tidyclust.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 7aa6e982-3f23-4734-8da7-2ab97b3d66a5

RestoreWorkspace: No
SaveWorkspace: No
Expand Down

0 comments on commit a928d70

Please sign in to comment.