Convert online stream of data into graph data(

I have an online stream of data that is coming in, I need to process them and from each data point in my batch, create a torch_geometric style data point. So if my batch has 128 points, I need to convert it into a batch of 128 graphs and pass it to my GNN.

I need to perform this without causing many hindrances in the training loop, so looping over each sample is the last thing one wants to do. I have tried functorch vmap, but since it is s returning non-tensor data type I’m getting an error.

Any help or ideas is much appreciated.

Could you please clarify your problem?

Are you asking about converting stream of data to batches, or vmap over a batch Tensor?