remove_dp¶
- torchdata.dataloader2.graph.remove_dp(graph: Dict[int, Tuple[IterDataPipe | MapDataPipe, Dict[int, Tuple[IterDataPipe | MapDataPipe, DataPipeGraph]]]], datapipe: IterDataPipe | MapDataPipe) Dict[int, Tuple[IterDataPipe | MapDataPipe, Dict[int, Tuple[IterDataPipe | MapDataPipe, DataPipeGraph]]]] ¶
Given the graph of DataPipe generated by
traverse_dps
function and the DataPipe to be removed, return the new graph of DataPipe.Note
This function can not remove DataPipe that takes multiple DataPipes as the input.