-
Notifications
You must be signed in to change notification settings - Fork 23
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
Make predict()
work with sparse data
#261
Conversation
tests/testthat/test-sparsevctrs.R
Outdated
@@ -120,3 +120,51 @@ test_that("sparse matrices can be passed to `fit() - xy", { | |||
# We expect 1 materialization - the outcome | |||
expect_snapshot(wf_fit <- fit(wf_spec, hotel_data)) | |||
}) | |||
|
|||
test_that("sparse tibble can be passed to `predict()", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only doing 1 test since it should be able to predict regardless of how the workflow was created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right on.🎸
Ran these tests locally and saw failures due to using CRAN recipes rather than dev--could we add a Remotes here?
Also, as of now, these tests are not run on CI because glmnet isn't installed. I'm 50-50 on whether we ought to, and support you adding a glmnet suggests if you think that's the right move to test these well.
Co-authored-by: Simon P. Couch <[email protected]>
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. |
Ref: #239
This PR:
predict()
(same convention as with everything else)