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

Allow sparse tibbles in fit() and fit_xy() #1165

Merged
merged 6 commits into from
Sep 4, 2024
Merged

Conversation

EmilHvitfeldt
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt commented Aug 29, 2024

Ref: #1125

This PR is in essence very similar to #1121

fit_xy()

  • model supports sparsity, turn into sparse matrix and use xy interface
  • model doesn't support, turn back to normal tibble with warning

fit()

  • model supports sparsity, turn into sparse matrix and use xy interface
  • model doesn't support, turn back to normal tibble with warning

@EmilHvitfeldt EmilHvitfeldt requested a review from topepo August 29, 2024 23:49
@simonpcouch
Copy link
Contributor

So awesome.

Copy link
Member

@topepo topepo left a comment

Choose a reason for hiding this comment

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

Looks good. Just one question

}

materialize_sparse_tibble <- function(x, object, input) {
if ((!allow_sparse(object)) && is_sparse_tibble(x)) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same case as f2faed9?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it is. i just refactored it out as we need it a couple of places

@EmilHvitfeldt EmilHvitfeldt merged commit f66a8f9 into main Sep 4, 2024
10 checks passed
@EmilHvitfeldt EmilHvitfeldt deleted the sparse-tibbles-fit branch September 4, 2024 16:54
Copy link

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 Sep 19, 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.

3 participants