read_gli_graph
- gli.graph.read_gli_graph(metadata_path: PathLike, device='cpu', verbose=True)
Read a local metadata.json file and return a (or a list of) graph(s).
gli.graph.read_gli_graph()
reads a graph or a list of graphs according to the metadata.json file.- Parameters:
metadata_path (
os.PathLike
) – path to the metadata.json file.device (str, optional) – device name, defaults to “cpu”.
verbose (bool, optional) – verbose level, defaults to False.
- Return type:
dgl.DGLGraph
or a list ofdgl.DGLGraph
Important
The file format of a metadata.json is documented in GLI Data and Task File Formats.
Notes
This function is used to read a GLI task file locally. It is not used to fetch a task configuration from a remote server. If you want to download any task configuration provided by GLI, use
gli.dataloading.get_gli_task()
instead.Additionally, this function is useful when you want to test loading a new task configuration file locally.