Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THPrompt

We provide the code (in PyTorch) for our paper "Efficient Prompt Tuning for Spatial-Temporal Graphs under Topology and History Shift".

Usage

1. Download Data

From JODIE dataset website, download the required data files (e.g., wikipedia.csv, reddit.csv). Place the downloaded files into the processed/ directory.

2. Process Data

Run the following scripts to preprocess the raw data.

# The --data argument can be changed to 'reddit' or other datasets
python utils/preprocess_data.py --data wikipedia --bipartite
python utils/downstream_process.py

The pre-training part of the code references the paper "Node-Time Conditional Prompt Learning in Dynamic Graphs".

3. Pre-train the Model

Execute the following command to pre-train the model.

python pre-training.py --use_memory

4. Run Downstream Task

Use the pre-trained model to perform the downstream task.

python downstream_task.py --use_memory

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages