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

Filter #243

Merged
merged 5 commits into from
Jun 12, 2024
Merged

Filter #243

merged 5 commits into from
Jun 12, 2024

Conversation

Oxid15
Copy link
Owner

@Oxid15 Oxid15 commented Jun 12, 2024

This PR adds Filter and IteratorFilter datasets into cascade.data.
Filters accept functions that return bool values when receiving dataset items and then use their output to filter values.

For regular datasets with __len__ defined the Filter is Sampler meaning that it changes the length of a dataset
For datasets that are built around iterables Filter is Modifier

If Filter makes the length of a regular dataset 0 then Sampler will raise an AssertionError on creation

@Oxid15 Oxid15 self-assigned this Jun 12, 2024
@Oxid15 Oxid15 merged commit a7f18e1 into 0.14.0 Jun 12, 2024
@Oxid15 Oxid15 deleted the filter branch June 12, 2024 11:33
@Oxid15 Oxid15 mentioned this pull request Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant