You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MNT] Complete Test for Sparse Dataset Row ID and Ignore Attributes Inclusion #1644
The test test_get_sparse_dataset_rowid_and_ignore_and_target in test_dataset.py#L382 currently sets ignore_attribute and row_id_attribute on a sparse dataset but calls get_data() with include_row_id=False and include_ignore_attribute=False. This means the test doesn't verify behavior when these attributes are actually included in the output.
Steps:
Add a new test case or extend the existing one to call get_data(target="class", include_row_id=True, include_ignore_attribute=True).
Assert the correct output shape (should exclude the ignored columns and include row IDs if applicable).
Verify that categorical indicators are updated accordingly.
Run the test to ensure it passes with the sparse dataset.
The test should validate that sparse datasets handle row ID and ignore attributes correctly when included, improving test coverage for edge cases.
Assert the correct output shape (should exclude the ignored columns and include row IDs if applicable).
It does this already, the dataset by default has 20k features (target feature excluded) so the assertion tests whether two features are left out. It doesn't check whether or not it actually leaves out the right features though.
Verify that categorical indicators are updated accordingly.
Not sure what you mean with that. I guess it's the same as above, it checks whether the length still is correct but not if the correct features are omitted. That's not possible in this setup. We would need to have a dataset where only two features are categorical (or only 2 are not), and then exclude them.
Hi @geetu040,
I would like to work on this issue. I understand that we need to properly validate the behavior of include_row_id and include_ignore_attribute in the sparse dataset test.
I’m a new contributor to the project and would really appreciate the opportunity to work on this. Could you please assign it to me?
Thank you.
Activity
PGijsbers commentedon Feb 18, 2026
It does this already, the dataset by default has 20k features (target feature excluded) so the assertion tests whether two features are left out. It doesn't check whether or not it actually leaves out the right features though.
Not sure what you mean with that. I guess it's the same as above, it checks whether the length still is correct but not if the correct features are omitted. That's not possible in this setup. We would need to have a dataset where only two features are categorical (or only 2 are not), and then exclude them.
geetu040 commentedon Feb 18, 2026
okay I see, in that case, for this dataset, we can only check for the correct lengths and shapes which should be
20000instead of19998Abhishek9639 commentedon Feb 22, 2026
Hi @geetu040,
I would like to work on this issue. I understand that we need to properly validate the behavior of include_row_id and include_ignore_attribute in the sparse dataset test.
I’m a new contributor to the project and would really appreciate the opportunity to work on this. Could you please assign it to me?
Thank you.
ChiruChirag007 commentedon Sep 17, 2026
I have submitted PR #1740 addressing this issue.
The test now covers row ID and ignore attribute inclusion as requested.