Repository navigation
fix(dedup): accept single-element input_keys in deduplicate filters - #553
Merged
SunnyHaze merged 1 commit intoOct 13, 2026
Merged
Conversation
rikkurea-boop
added a commit
to rikkurea-boop/DataFlow
that referenced
this pull request
Oct 13, 2026
…on current main
rikkurea-boop
added a commit
to rikkurea-boop/DataFlow
that referenced
this pull request
Oct 13, 2026
… storage PR Preserve existing OpenDCAI#550 commits and test coverage while integrating upstream OpenDCAI#551 batched output cache invalidation.
rikkurea-boop
added a commit
to rikkurea-boop/DataFlow
that referenced
this pull request
Oct 13, 2026
Bring OpenDCAI#536, OpenDCAI#553 and OpenDCAI#551 upstream changes into the existing PR branch without rebasing away the previously reviewed Text2Model commits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The deduplicate filters accept either
input_keyorinput_keys. Wheninput_keysis a list with a single column (for exampleinput_keys=["text"]),run()takes the single-column branch, but that branch readssample[self.input_key].self.input_keyisNonein that case, so the operator crashes withKeyError: Noneon the first row.The same line exists in six operators:
HashDeduplicateFilterMinHashDeduplicateFilterNgramHashDeduplicateFilterSimHashDeduplicateFilterSemDeduplicateFilterCCNetDeduplicateFilterFix
When
input_keysis given, the single-column branch now readsinput_keys[0]. This makesinput_keys=["text"]behave the same asinput_key="text". Passinginput_keyor a list of several keys works exactly as it did before.Tests
I added
test/cpu_only/test_dedup_single_input_keys.py. For each CPU-only dedup filter, it checks thatinput_keys=["text"]gives the same filtered dataframe asinput_key="text".KeyError: None)test/cpu_only/test_minhash_short_texts.pyalso still passes.SemDeduplicateFiltergets the same one-line change. The new test doesn't cover it because it needs torch/transformers and a BERT model.Fixes #552