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

different type_sum results between CRAN and GH versions #240

Closed
topepo opened this issue Jan 28, 2021 · 2 comments
Closed

different type_sum results between CRAN and GH versions #240

topepo opened this issue Jan 28, 2021 · 2 comments

Comments

@topepo
Copy link
Member

topepo commented Jan 28, 2021

rsample has

> rsample:::type_sum.rsplit
function (x, ...) 
{
    out_char <- if (all(is.na(x$out_id))) 
        format_n(length(complement(x)))
    else format_n(length(x$out_id))
    paste0("split [", format_n(length(x$in_id)), "/", out_char, 
        "]")
}

With the CRAN version of everything, we have a test that has output:

> library(rsample)
> packageVersion("rsample")
[1] ‘0.0.8> packageVersion("pillar")
[1] ‘1.4.7> packageVersion("tibble")
[1] ‘3.0.5> 
> warpbreaks2 <- tibble::as_tibble(warpbreaks)
> 
> print(group_vfold_cv(warpbreaks, "tension"))
# Group 3-fold cross-validation 
# A tibble: 3 x 2
  splits          id       
  <list>          <chr>    
1 <split [36/18]> Resample1
2 <split [36/18]> Resample2
3 <split [36/18]> Resample3

With dev pillar:

> # remotes::install_dev("pillar")
> library(rsample)
> packageVersion("rsample")
[1] ‘0.0.8> packageVersion("pillar")
[1] ‘1.4.99.9006> packageVersion("tibble")
[1] ‘3.0.5> 
> warpbreaks2 <- tibble::as_tibble(warpbreaks)
> 
> print(group_vfold_cv(warpbreaks, "tension"))
# Group 3-fold cross-validation 
# A tibble: 3 x 2
  splits           id       
  <list>           <chr>    
1 <rsplit [36/18]> Resample1
2 <rsplit [36/18]> Resample2
3 <rsplit [36/18]> Resample3
topepo added a commit to tidymodels/rsample that referenced this issue Jan 28, 2021
@krlmlr
Copy link
Member

krlmlr commented Jan 29, 2021

This has been introduced in #237. Please tweak rsample:::obj_sum.rsplit(), this is still using "rsplit" but has never been called in this context before.

@topepo topepo closed this as completed Jan 29, 2021
topepo added a commit to tidymodels/rsample that referenced this issue Feb 1, 2021
topepo added a commit to tidymodels/rsample that referenced this issue Feb 2, 2021
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

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

No branches or pull requests

2 participants