Shortcuts

traverse_dps

torchdata.dataloader2.graph.traverse_dps(datapipe: Union[IterDataPipe, MapDataPipe]) Dict[int, Tuple[Union[IterDataPipe, MapDataPipe], Dict[int, Tuple[Union[IterDataPipe, MapDataPipe], DataPipeGraph]]]]

Traverse the DataPipes and their attributes to extract the DataPipe graph.

This only looks into the attribute from each DataPipe that is either a DataPipe and a Python collection object such as list, tuple, set and dict.

Parameters:

datapipe – the end DataPipe of the graph

Returns:

A graph represented as a nested dictionary, where keys are ids of DataPipe instances and values are tuples of DataPipe instance and the sub-graph

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources