Skip to content

test that sparse matrices work with fit()#258

Merged
EmilHvitfeldt merged 7 commits into
mainfrom
fit-sparse-matrix
Sep 24, 2024
Merged

test that sparse matrices work with fit()#258
EmilHvitfeldt merged 7 commits into
mainfrom
fit-sparse-matrix

Conversation

@EmilHvitfeldt

Copy link
Copy Markdown
Member

ref: #239

early in fit.workflow(), turn data into sparse tibble if data is sparse matrix.

Comment on lines +81 to +82
# We expect 1 materialization - the outcome
expect_snapshot(wf_fit <- fit(wf_spec, hotel_data))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we can't avoid materialization completely. Because the outcome is sparse. So instead we throw a message when materialization happens. And we just manually have to check that it only shows up once

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is embedded in the snapshot

@simonpcouch simonpcouch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

Comment thread tests/testthat/test-sparsevctrs.R Outdated
Comment thread tests/testthat/test-sparsevctrs.R Outdated
Comment thread tests/testthat/test-sparsevctrs.R Outdated
EmilHvitfeldt and others added 3 commits September 24, 2024 10:48
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
@EmilHvitfeldt EmilHvitfeldt merged commit 602f37e into main Sep 24, 2024
@EmilHvitfeldt EmilHvitfeldt deleted the fit-sparse-matrix branch September 24, 2024 18:08
@github-actions

github-actions Bot commented Oct 9, 2024

Copy link
Copy Markdown

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 Oct 9, 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 this pull request may close these issues.

2 participants