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

keep_key in MapKeyZipper #1042

Closed
wants to merge 3 commits into from

Conversation

SvenDS9
Copy link
Contributor

@SvenDS9 SvenDS9 commented Feb 23, 2023

As mentioned in #256 it would be useful to have this in all dp that use a key_fn.

Changes

  • Add keep_key option to MapKeyZipper
  • Test for the new option
  • Improve example in documentation by using sphinx doctest

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 23, 2023
Copy link
Contributor

@NivekT NivekT left a comment

Choose a reason for hiding this comment

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

Seems reasonable to add to me. Only one nit comment. Thanks!

torchdata/datapipes/iter/util/combining.py Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@NivekT has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@NivekT merged this pull request in 42e34ff.

NivekT pushed a commit that referenced this pull request Feb 28, 2023
Summary:
As mentioned in #256 it would be useful to have this in all dp that use a `key_fn`.

### Changes

- Add keep_key option to `MapKeyZipper`
- Test for the new option
- Improve example in documentation by using sphinx doctest

Pull Request resolved: #1042

Reviewed By: ejguan

Differential Revision: D43550124

Pulled By: NivekT

fbshipit-source-id: 453418560dd586ebb9ce42dd27eb1bc86eb734d0
ejguan pushed a commit that referenced this pull request Feb 28, 2023
Summary:
As mentioned in #256 it would be useful to have this in all dp that use a `key_fn`.

### Changes

- Add keep_key option to `MapKeyZipper`
- Test for the new option
- Improve example in documentation by using sphinx doctest

Pull Request resolved: #1042

Reviewed By: ejguan

Differential Revision: D43550124

Pulled By: NivekT

fbshipit-source-id: 453418560dd586ebb9ce42dd27eb1bc86eb734d0
@SvenDS9 SvenDS9 deleted the keep_key_in_zip_with_map branch March 21, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants