Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on "Adding merge function as an optional input for KeyZipper"
Fixes #44 by adding merge function as an optional input for `KeyZipper`. It allows user to specify how the items yielded from the DataPipes will be combined before they are yielded. This PR changes the default behavior when `keep_key=True` and that may be BC breaking. Previously, when `keep_key=True`, the output will be `(key, item1, item2)`, now it will default to `(key, (item1, item2)`. It is possible to leave the default behavior unchanged. Note that `KeyZipper` may be renamed to `IterZipper` in #50 to provide users with better clarity. Differential Revision: [D31820203](https://our.internmc.facebook.com/intern/diff/D31820203) [ghstack-poisoned]
- Loading branch information
Showing
2 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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