Practical overview
When it fits
Use PyGcl when building graph contrastive learning experiments in a Python/PyTorch environment and when reusable augmentation, objective, pairing and negative-mining components are useful.
Who it is for
- Researchers prototyping graph representation learning methods.
- Developers implementing or adapting graph contrastive learning algorithms in Python and PyTorch.
Documented uses
- Construct augmented graph views for a contrastive-learning workflow.
- Form positive and negative pairs from node or graph embeddings and compute contrastive objectives.
- Apply negative-sample mining strategies.
- Explore examples of published methods for node- and graph-level learning tasks.
- Train, evaluate and manage graph-learning experiments.
Requirements & limits
The repository identifies PyGcl as open source under the Apache-2.0 license. The README documents installation through PyPI.
- Requires a Python/PyTorch stack plus PyTorch-Geometric, DGL, scikit-learn, NumPy, tqdm and NetworkX.
- DGL CPU and CUDA packages are separate; users must select and install the appropriate package themselves.
- The library includes examples spanning several named methods, but the README does not specify results or dataset-specific performance.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install PyGcl from PyPI
Install the library into a Python environment that has its stated dependencies.
Before you start
- Python 3.8 or newer
- PyTorch 1.9 or newer
- PyTorch-Geometric 1.7
- DGL 0.7 or newer
- scikit-learn 0.24 or newer
Steps
Install the listed prerequisites in the environment.
Choose and install the appropriate DGL package for the intended CPU or CUDA setup.
Run the command below.
pip install PyGCLImport
GCLfrom the environment.
Expected outcome
PyGcl is installed and its GCL module can be imported from the environment.
Guide limitations
- The README does not provide a single DGL package choice for all environments; DGL must be installed separately because PyGcl does not check its version in setup.
- Installation guidance does not establish that a particular environment or configuration has been tested.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- PyGCL/PyGCL · Official homepage title · retained in its source language

