Skip to content

This project is a fork of (https://github.com/AllminerLab/GraphLoRA), which has added uv support to enhance the reproducibility of the project and improved the CPU support of the original project

Notifications You must be signed in to change notification settings

Ardenet/GraphLoRA

Repository files navigation

This is the official project's fork. Added uv support for easier code replication.

GraphLoRA

This is an official implementation of KDD 25 paper GraphLoRA: Structure-Aware Contrastive Low-Rank Adaptation for Cross-Graph Transfer Learning.

Requirements

python==3.11.5
torch==2.1.0
numpy==1.26.0
torch_geometric==2.4.0
pyyaml==6.0.1
setuptools>=68.0.0
packaging>=23.2

If use GPU, please install cuda12.1.

Using pip and conda

pip install -r requirements.txt -f 'https://mirrors.aliyun.com/pytorch-wheels/cu121/'

# If you use conda, it is highly recommended to create a Python empty environment and use the above pip command to install dependencies 
conda env create -n <env_name> "python==3.11.5"

Using uv

# If you just want to synchronous enironment, you can try command below
uv sync

# But you should run this command when you just directly run code.
# Don't worry environment's problems, uv will take care of everything for you
uv run python main.py ...

How to Run

You can easily run our code by

# Pre-training
python main.py --is_pretrain True

# Fine-tuning
python main.py --is_transfer True

Please refer to the main.py file for other options

About

This project is a fork of (https://github.com/AllminerLab/GraphLoRA), which has added uv support to enhance the reproducibility of the project and improved the CPU support of the original project

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages