def __next__(self):
if self.edge_dataloader.collator.negative_sampler is None:
// input_nodes, pair_graph, [items], blocks
result = next(self.iter_)
_restore_subgraph_storage(result[1], self.edge_dataloader.collator.g)
_restore_blocks_storage(result[-1], self.edge_dataloader.collator.g_sampling)
return result
else:
After Change
_restore_subgraph_storage(result_[1], self.edge_dataloader.collator.g)
_restore_blocks_storage(result_[-1], self.edge_dataloader.collator.g_sampling)
result = []for data in result_:
result.append(_to_device(data, self.device))
return result
class NodeDataLoader:
PyTorch dataloader for batch-iterating over a set of nodes, generating the list