Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Distributed Graph Flow

PyPI Python License Documentation

Graph Flow (DGF) is an open-source Python library to train, evaluate, and deploy Graph Neural Networks (GNNs) on tabular, relational, and temporal data. It is developed by the Google GNN team, the team behind TensorFlow GNN, and is its successor.

Graph Flow has two APIs:

  • The Simple API is as easy to use as scikit-learn: one function call trains a GNN model from a graph and a target column, and the resulting model can be evaluated, used for predictions, and saved.
  • The Advanced API is a set of composable building blocks (graph IO, samplers, feature normalizers, and JAX/Flax GNN layers). Like Lego bricks, you pick the ones you need and assemble them with your own code, including PyTorch Geometric models.

📖 Documentation: https://dgf.readthedocs.io/

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

📦 Installation

To install DGF from PyPI, run:

pip install dgf -U

Graph Flow is available for Python 3.11–3.13 on Linux x86-64.

For the latest features, install the nightly build instead (dgf-nightly, built daily from main):

pip install dgf-nightly -U

🔥 Why Graph Flow?

  • Simple API: Train, evaluate, and save a GNN model in about 10 lines of Python, without prior GNN experience.
  • Temporal graphs: Dynamic graphs and time-series features are supported. Time-aware sampling ensures that a model only sees information available before the prediction time.
  • Scale: Train in memory on graphs with up to 1B edges on a single machine. For larger graphs, the distributed sampler (Apache Beam on Google Cloud Dataflow) scales to trillions of edges.
  • Advanced API: Message-passing layers (MPNN, GAT, Graph Transformer), samplers, and normalizers are independent JAX/Flax building blocks for custom models.
  • Interoperability: Convert graphs to PyTorch Geometric, TensorFlow, TF-GNN, and NetworkX.
  • Deployment: Run inference in-process in Python, or export models to TensorFlow SavedModel (e.g., for Vertex AI).

😎 Minimal usage example

import dgf

# Download an example graph
graph, schema = dgf.io.fetch_ogb_graph("arxiv")

# Train a GNN model to predict the "labels" feature on the "nodes" nodeset
model = dgf.learning.train_node_model(
    graph=graph,
    schema=schema,
    target_column="labels",
    target_nodeset="nodes",
)

# Inspect training statistics, architecture, and schema
model.describe()

# Evaluate quality metrics
model.evaluate()

# Make low-latency predictions in-process
model.predict(graph, seed_node_idxs=[0, 1, 2])

# Save the model (architecture, weights, sampling config, training logs, etc.)
model.save("/tmp/model")
Output of model.describe() Model description
Output of model.evaluate() Model evaluation

See the Getting Started tutorial for the complete walkthrough.

🤗 Need help?

Metadata

Release files for dgf-nightly 0.1.1.dev20261016

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

Built distributions (wheels)

Table of built distributions (wheels) for dgf-nightly 0.1.1.dev20261016
File Interpreter ABI Platform
dgf_nightly-0.1.1.dev20261016-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
dgf_nightly-0.1.1.dev20261016-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
dgf_nightly-0.1.1.dev20261016-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 13.8 MB

Release files / dgf_nightly-0.1.1.dev20261016-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL dgf_nightly-0.1.1.dev20261016-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ce288e966515157f41e1368cf24acb1b8a1da68ee9fe91d73b414d240b873bb
BLAKE2b-256 checksum
How to use checksums
6bdacd7d774e758eb7576c9c3579be9c62ec8fd9a09cba52237d57a96b8b9471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / dgf_nightly-0.1.1.dev20261016-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL dgf_nightly-0.1.1.dev20261016-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d267b27bcda661c8e0e707fe94083ebf46c438562ca73819ad2191de38784155
BLAKE2b-256 checksum
How to use checksums
e2107714183d6e0ebc1ddb6bd8abbf881cd8fe8ceaf2f195cf6d59651b9d9c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / dgf_nightly-0.1.1.dev20261016-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL dgf_nightly-0.1.1.dev20261016-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d8fda2fa32452264daafd8db210aa136a456ccb571ba9c94e50e7078a6c80080
BLAKE2b-256 checksum
How to use checksums
11b4c572bc354e42c04562b6d3b1f68bcdd0aa600c6b131e7889a518d390411b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for dgf-nightly 0.1.1.dev20261016

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.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for dgf_nightly-0.1.1.dev20261016-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

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.

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