CLI tool for GPGIN, built with pytorch-geometric
Project description
Installation
We recommend installing PyTorch and PyTorch Geometric before gpgin-cli to avoid compatibility issues related to CUDA versions and hardware acceleration.
Note: we recommend using pip rather than conda, as some PyTorch Geometric dependencies are not available via conda.
Refer to:
The versions that we used, targeting CUDA-11.8:
torch==2.2.2
torch-geometric==2.5.2
rdkit-pypi==2022.09.5
Install script
This may be useful on a blank python 3.10 virtual environment
#!/bin/bash
set -e
# === CONFIGURABLE VARIABLES ===
CUDA_VERSION="cu118"
PYTORCH_VERSION="2.2.2"
TORCHVISION_VERSION="0.17.2"
TORCHAUDIO_VERSION="2.2.2"
TORCH_GEOMETRIC_VERSION="2.5.2"
RDKIT_PYPI_VERSION="2022.09.5"
# === 1. Install PyTorch ===
echo "[1/4] Installing PyTorch with CUDA $CUDA_VERSION..."
pip install torch=="$PYTORCH_VERSION" \
torchvision=="$TORCHVISION_VERSION" \
torchaudio=="$TORCHAUDIO_VERSION" \
--index-url https://download.pytorch.org/whl/$CUDA_VERSION
# === 2. Install PyTorch Geometric core ===
echo "[2/4] Installing PyTorch Geometric $TORCH_GEOMETRIC_VERSION..."
pip install torch_geometric=="$TORCH_GEOMETRIC_VERSION"
# === 3. Install PyTorch Geometric Optional Dependencies ===
echo "[3/4] Installing PyG optional dependencies for CUDA $CUDA_VERSION..."
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv \
-f https://data.pyg.org/whl/torch-${PYTORCH_VERSION}+${CUDA_VERSION}.html
# === 4. Install RDKit ===
echo "[4/4] Installing RDKit..."
pip install rdkit-pypi==$RDKIT_PYPI_VERSION
# === Final Step: Install Your CLI Package ===
echo "[✓] Installing your CLI package (gpgin-cli)..."
pip install gpgin-cli
Examples:
Our API expects an SDF file for the X field and a line-separated values file for the y and out field
Training:
gpgin train \
-X ./data/gdb9.sdf \
-y ./data/gdb9_u0.txt \
--name my_model \
--batch_size 100 \
--n_epochs 100 \
--dataset_name QM9 \
--target_name u0
# Notes:
# - Models are saved in ~/.gpgin/models
# - Processed datasets are saved in ~/.gpgin/processed
Inference:
gpgin run \
-X ./data/gdb9.sdf \
--out ./results/gdb9_u0.txt \
--name my_model \
--batch_size 64
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpgin_cli-0.1.0.tar.gz.
File metadata
- Download URL: gpgin_cli-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b4fb78113508fe1f000f6a0658bcf830011885654911edda96f8c4a7e718f7d
|
|
| MD5 |
c43946d96f0e7a49334a147c47a75b23
|
|
| BLAKE2b-256 |
4db2ec907f4bf76a4db09f06bcbea49ace926c67d1008f595e220d25cff40feb
|
File details
Details for the file gpgin_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gpgin_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0733969c424b68c2a14c84f74eba5f7f251ff5d341e26cbf449852013bcd1a1
|
|
| MD5 |
94054d8dfc785e173cbd8a97ff4250f1
|
|
| BLAKE2b-256 |
eb7cfc5c185e1463a9dda90b365b0b8e17de3b9cb47be27df880a34f0c0412a4
|