meta-pytorch / meta-pytorch/data

Router for same functional API

Open
#54 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🚀 Feature

We could support different DataPipe with same functionality using a same functional API with a router datapipe.
Like open, we can support:

  • URL
  • IoPath
  • Local File

Option 1:
Based on the input (type), we could route it to corresponding DataPipe with extra argument to functional_datapipe

register_funtional_api("open", router_fn=...)


@functional_datapipe("open", route_class=...)
 class HTTPReader(IterDataPipe):
    ...

Option 2:
Implement a dispatcher toward functional_API. This may be more suitable but needed to be designed carefully.

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.

Research direction

Start by examining the functional_datapipe registration path and the DataPipe routing entry point described in the issue. Compare the router_fn and dispatcher options for routing open inputs such as URLs, IoPaths, and local files. Done requires an agreed design and implementation plan, with the supported input routes and registration behavior clearly specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.