meta-pytorch / meta-pytorch/data

Modify `IterKeyZipper` to accept any number (2+) of `IterDataPipe`

Open
#334 1 comment 0 reactions 1 assignee View on GitHub

@pmeier is already working on this.

Since Mar 28, 2022.

good first issue
Dominant language
Python
Stars
1.3k
Forks
179
Avg merge
6d 1h
Merged PRs (30d)
2

Description

🚀 The feature

Currently, IterKeyZipper can only zip two DataPipes together.

https://github.com/pytorch/data/blob/198cffe7e65a633509ca36ad744f7c3059ad1190/torchdata/datapipes/iter/util/combining.py#L13

The proposal is to modify its API to allow users to pass in any number (two or more) IterDataPipe, rather than just strictly two. We will have to think carefully about how the key_fn and ref_key_fn will change.

Motivation, pitch

There are situations where users may want to zip multiple DataPipes together.

Alternatives

Users will have to write their own custom DataPipes.

Additional context

There are similar DataPipes and we should keep in mind that their APIs should be as consistent as possible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.