Pytorch implementation of 'Commonsense Knowledge Aware Conversation Generation with Graph Attention'
-
Download data from here and unzip at 'data' folder
-
Change file extension of {train, valid, test}.txt to .jsonl
-
Divide jsonl files into smaller files under '{train, valid, test}set_pieces' folder
e.g.
split -l 10000 trainset.jsonl trainset_pieces/piece_
, and set: args.init_chunk_size = 10000 -
Replace 'glove.840B.300d.txt' under the 'data' folder with the real file holding pretrained weights
-
pip install -r requirements.txt
-
Install and build Redis and RedisGraph
-
Open redis-server and load RedisGraph module:
redis-server --loadmodule /path/to/module/src/redisgraph.so
-
python graph.py
will store triples on your RAM -
After all triples are stored,
redis-cli bgsave
-
[Making AOF] For safety, make a backup of your latest dump.rdb file and transfer this backup to a safe place; then
redis-cli config set appendonly yes; redis-cli config set save ""