Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer error when using permutations() resampling #895

Closed
hfrick opened this issue May 20, 2024 · 1 comment · Fixed by #896
Closed

Nicer error when using permutations() resampling #895

hfrick opened this issue May 20, 2024 · 1 comment · Fixed by #896

Comments

@hfrick
Copy link
Member

hfrick commented May 20, 2024

The current error is not bad but there is a lot going on in the output. We do have check_rset() which errors on loo and nested resamples so that would be a good place to also stop tuning with permutation samples.

library(tidymodels)

rs <- permutations(mtcars, hp, times = 2)

workflow(mpg ~ ., linear_reg(penalty = tune(), engine = "glmnet")) %>% 
  tune_grid(rs, grid = 5)
#> → A | error:   There is no assessment data set for an `rsplit` object with class `perm_split`.
#> There were issues with some computations   A: x1
#> There were issues with some computations   A: x2
#> 
#> Warning: All models failed. Run `show_notes(.Last.tune.result)` for more
#> information.
#> # Tuning results
#> # Permutation sampling 
#> # A tibble: 2 × 4
#>   splits         id            .metrics .notes          
#>   <list>         <chr>         <list>   <list>          
#> 1 <split [32/0]> Permutations1 <NULL>   <tibble [1 × 4]>
#> 2 <split [32/0]> Permutations2 <NULL>   <tibble [1 × 4]>
#> 
#> There were issues with some computations:
#> 
#>   - Error(s) x2: There is no assessment data set for an `rsplit` object with class...
#> 
#> Run `show_notes(.Last.tune.result)` for more information.

Created on 2024-05-20 with reprex v2.1.0

Copy link

github-actions bot commented Jun 6, 2024

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant