Skip to content

Conversation

@jyuu
Copy link

@jyuu jyuu commented Jul 5, 2019

type argument passed in from mode = "classification" is not needed for sparklyr::ml_decision_tree_classifier

library(parsnip)
#> Warning: package 'parsnip' was built under R version 3.5.2
library(sparklyr)
#> Warning: package 'sparklyr' was built under R version 3.5.2

sc <- spark_connect(master = "local")

iris_tbls <- sdf_copy_to(sc, iris, overwrite = TRUE) %>%
  sdf_random_split(train = 2/3, validation = 2/3, seed = 2018)
train <- iris_tbls$train
validation <- iris_tbls$validation

spark_model <- decision_tree(mode = "classification") %>%
  set_engine("spark")

spark_fit <- spark_model %>%
  fit(Species ~ ., data = train)
#> 1 components of `...` were not used.
#> 
#> We detected these problematic arguments:
#> * `type`
#> 
#> Did you misspecify an argument?

rlang::last_error()
#> <error>
#> message: 1 components of `...` were not used.
#> 
#> We detected these problematic arguments:
#> * `type`
#> 
#> Did you misspecify an argument?
#> class:   `rlib_error_dots_unnused`
#> backtrace:
#>   1. generics::fit(., Species ~ ., data = train)
#>  14. ellipsis:::stop_dots(...)
#>  16. generics::fit(., Species ~ ., data = train)
#> Call `rlang::last_trace()` to see the full backtrace

rlang::last_trace()
#>      █
#>   1. ├─spark_model %>% fit(Species ~ ., data = train)
#>   2. │ ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
#>   3. │ └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
#>   4. │   └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
#>   5. │     └─`_fseq`(`_lhs`)
#>   6. │       └─magrittr::freduce(value, `_function_list`)
#>   7. │         ├─base::withVisible(function_list[[k]](value))
#>   8. │         └─function_list[[k]](value)
#>   9. │           ├─generics::fit(., Species ~ ., data = train)
#>  10. │           └─parsnip::fit.model_spec(., Species ~ ., data = train)
#>  11. │             └─parsnip:::form_form(object = object, control = control, env = eval_env)
#>  12. │               └─parsnip:::eval_mod(...)
#>  13. │                 └─rlang::eval_tidy(e, ...)
#>  14. └─sparklyr::ml_decision_tree_classifier(...)
#>  15.   └─(function (env = parent.frame()) ...
#>  16.     └─ellipsis:::stop_dots(...)

@codecov-io
Copy link

Codecov Report

Merging #188 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
+ Coverage   75.73%   75.75%   +0.02%     
==========================================
  Files          37       37              
  Lines        3041     3040       -1     
==========================================
  Hits         2303     2303              
+ Misses        738      737       -1
Impacted Files Coverage Δ
R/decision_tree.R 47.87% <ø> (+0.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9ac7e6...73f3e2f. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented Jul 5, 2019

Codecov Report

Merging #188 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
+ Coverage   75.73%   75.75%   +0.02%     
==========================================
  Files          37       37              
  Lines        3041     3040       -1     
==========================================
  Hits         2303     2303              
+ Misses        738      737       -1
Impacted Files Coverage Δ
R/decision_tree.R 47.87% <ø> (+0.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9ac7e6...73f3e2f. Read the comment docs.

@topepo topepo merged commit 90a2a3b into tidymodels:master Jul 10, 2019
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2021

This pull request 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 Mar 8, 2021
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 this pull request may close these issues.

3 participants