Skip to main content

Open Graph Benchmark Lite (ogb_lite)

Open Graph Benchmark Lite (ogb_lite) is a subset of the ogb project. It supports library-agnostic loaders and it does not require torch.

99.99% of the code is copied from the OGB project:

  • https://github.com/snap-stanford/ogb <https://github.com/snap-stanford/ogb>_

We only make some small changes such that you can use ogb_lite without installing torch.

Installation

.. code-block:: bash

pip install ogb_lite

Tutorial

ogb_lite only contains three library-agnostic loaders: NodePropPredDataset\ , LinkPropPredDataset\ , and GraphPropPredDataset.

NodePropPredDataset:

.. code-block:: python

coding=utf-8

from ogb_lite.nodeproppred import NodePropPredDataset

dataset = NodePropPredDataset(name="ogbn-proteins")

split_idx = dataset.get_idx_split() train_idx, valid_idx, test_idx = split_idx["train"], split_idx["valid"], split_idx["test"] graph, label = dataset[0] # graph: library-agnostic graph object

print(graph, label) print(train_idx, valid_idx, test_idx)

LinkPropPredDataset:

.. code-block:: python

coding=utf-8

from ogb_lite.linkproppred import LinkPropPredDataset

dataset = LinkPropPredDataset(name="ogbl-ppa")

split_edge = dataset.get_edge_split() train_edge, valid_edge, test_edge = split_edge["train"], split_edge["valid"], split_edge["test"] graph = dataset[0] # graph: library-agnostic graph object

print(graph) print(train_edge, valid_edge, test_edge)

GraphPropPredDataset:

.. code-block:: python

coding=utf-8

from ogb_lite.graphproppred import GraphPropPredDataset

dataset = GraphPropPredDataset(name="ogbg-molhiv")

split_idx = dataset.get_idx_split() train_idx, valid_idx, test_idx = split_idx["train"], split_idx["valid"], split_idx["test"]

graph, label = dataset[0] # graph: library-agnostic graph object print(graph, label) print(train_idx, valid_idx, test_idx)

Citing OGB

If you use OGB datasets in your work, please cite the OGB paper (Bibtex below).

.. code-block:: HTML

@article{hu2020ogb, title={Open Graph Benchmark: Datasets for Machine Learning on Graphs}, author={Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, Jure Leskovec}, journal={arXiv preprint arXiv:2005.00687}, year={2020} }

Metadata

Release files for ogb-lite 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ogb-lite 0.0.3
File Size Uploaded Provenance Actions
ogb_lite-0.0.3.tar.gz 25.4 kB Without provenance Details for ogb_lite-0.0.3.tar.gz

Release files / ogb_lite-0.0.3.tar.gz

Download URL ogb_lite-0.0.3.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ef59643d4315011d80b4bd716034a8008b229cb64755387ca3ac91e1e2cb8f41
BLAKE2b-256 checksum
How to use checksums
befc8c5c16ee4d0398afbac15fdded1feaaa25a9844794ad035d24bc5cebdd38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

Security for ogb-lite 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page