import torch
from torch_geometric.data import Data

def bump(g):
    return Data.from_dict(g.__dict__)


f1 = 'data/chameleon/processed'
f2 = '../../datasets/new/chameleon/geom_gcn/processed'
#data, slices = torch.load(f'{f1}/data.pt')
#print(data)
#print(slices)
#data_dict = data.to_dict()
#torch.save((data_dict, slices), f'{f1}/data_dict.pt')

# In PyG 2.*
data_dict, slices = torch.load(f'{f1}/data_dict.pt')
data = Data.from_dict(data_dict)
torch.save((data, slices), f'{f2}/data.pt')