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

Integration with sparklyr is failing, starting with parsnip 2.0 #671

Closed
edgararuiz opened this issue Mar 9, 2022 · 2 comments · Fixed by #677
Closed

Integration with sparklyr is failing, starting with parsnip 2.0 #671

edgararuiz opened this issue Mar 9, 2022 · 2 comments · Fixed by #677
Labels
bug an unexpected problem or unintended behavior next release 🚀

Comments

@edgararuiz
Copy link

Recent sparklyr GHA R checks are failing on parsnip tests. These tests are new, and dev-version package testing is not yet working in GHA for sparklyr, so we didn't catch it until now.

reprex:

library(sparklyr)
library(parsnip)

sc <- spark_connect("local")
iris_tbl <- sdf_copy_to(sc, iris)

decision_tree(engine = "spark") %>%
  set_mode("classification") %>%
  fit(Species ~ Sepal_Length + Petal_Length, iris_tbl)
#> Error in eval_tidy(env$formula[[2]], env$data): object 'Species' not found

spark_disconnect(sc)

It looks like this is the check in which it happens:

check_outcome(eval_tidy(env$formula[[2]], env$data), object)

Also confirmed here: https://github.com/sparklyr/sparklyr/runs/5483357141?check_suite_focus=true#step:19:1469

@topepo
Copy link
Member

topepo commented Mar 10, 2022

I think that this would be fixed if we wrapped it in a

if (!inherits(env$data, "tbl_spark")) {
  check_outcome(eval_tidy(env$formula[[2]], env$data), object) 
}

@juliasilge juliasilge added bug an unexpected problem or unintended behavior next release 🚀 labels Mar 10, 2022
@github-actions
Copy link

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 Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior next release 🚀
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants