THUDM / CogDL

CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2023)

Home Page:https://cogdl.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to convert PyG HeteroData object to CogDL dataset

xiachenrui opened this issue · comments

❓ Questions & Help

Hi all,
I want to convert a PyG HeteroData object to cogdl.data.Graph. Can I use from_pyg_data function ? I am not sure if it support HeteroData object.

Bests !
Chen-Rui

Hi @xiachenrui ,

The current from_pyg_data API does not support PyG's HeteroData. Which dataset do you want to use?

Thanks for your reply!

I create the PyG HeteroData object with my own data. In detail, my dataset contains one node type and multiple edge types. Could you please tell me how to use my data to create a Codgl Graph object, I do not find a tutorial for hetero graph buliding in Codgl yet.

I found the bulid-in hetero dataset such as gtn-acm seems use a list to represent adjacent matrix of every edge type respectively. But I am still not clear how node types are involved.