Skip to content

ZhP-Li197/THPrompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THPrompt

We provide the code (in PyTorch) for our paper "Dual-Prompt Tuning for Spatial-Temporal Graphs".

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages