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

traverse is different from PyTorch core and broken #435

Closed
pmeier opened this issue May 23, 2022 · 1 comment
Closed

traverse is different from PyTorch core and broken #435

pmeier opened this issue May 23, 2022 · 1 comment

Comments

@pmeier
Copy link
Contributor

pmeier commented May 23, 2022

Amongst other things, 0501f56 added the torchdata/dataloader2/_graph_utils.py module that implements traverse:

def traverse(datapipe: IterDataPipe, only_datapipe: bool = False) -> DataPipeGraph:

Unfortunately, this differs from the one in PyTorch core. It is at least missing the patches that resolved #237. Trying to lint a datapipe that has circular references through the attributes (not a circular graph) fails again: https://github.com/pytorch/vision/runs/6551564325

Instead of re-implementing, could we maybe simply from torch.utils.data.graph import traverse to have a single source of truth?

@ejguan
Copy link
Contributor

ejguan commented May 23, 2022

Confirmed. We should send a PR to fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants