-
Notifications
You must be signed in to change notification settings - Fork 1
/
env_setup.sh
48 lines (43 loc) · 1.84 KB
/
env_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# author Arjun Albert
# email aalbert@mit.edu
echo "Starting setup."
mkdir ~/Desktop/ad_kge
cd ~/Desktop/ad_kge
read "Ctrl + C if you don't want to download py2kg env. Press [Enter] if you would like to continue."
conda create --name pykg2vec python=3.6
conda activate pykg2vec
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
conda install pytorch torchvision cpuonly -c pytorch
git clone https://github.com/Sujit-O/pykg2vec.git
read "Ctrl + C if you don't want to create dirs. Press [Enter] if you would like to continue."
cd pykg2vec
mkdir scene_data_1
mkdir scene_data_2
mkdir scene_data_3
touch scene_data_1/ad_scene_relationships-test.txt
touch scene_data_1/ad_scene_relationships-train.txt
touch scene_data_1/ad_scene_relationships-valid.txt
touch scene_data_2/ad_scene_relationships-test.txt
touch scene_data_2/ad_scene_relationships-train.txt
touch scene_data_2/ad_scene_relationships-valid.txt
touch scene_data_3/ad_scene_relationships-test.txt
touch scene_data_3/ad_scene_relationships-train.txt
touch scene_data_3/ad_scene_relationships-valid.txt
python setup.py install
echo "test install using: train TransE using benchmark dataset fb15k"
echo "Download the 3 datasets from: https://visualgenome.org/api/v0/api_home.html"
echo "Place them in a folder called: scenes"
echo "Remember: x for 1, 2, 3"
echo "Rename them: relationships_x.json"
echo "Structure should be as follows:
/ad_kge/
/pykg2vec/
/scene_data_x/
/ad_scene_relationships-test.txt
/ad_scene_relationships-train.txt
/ad_scene_relationships-valid.txt
/scenes/
/relationships_x.json"
read "Press [Enter] if you would like to continue."
echo "Then cd to ad_kge and run run_all_models.sh"
echo "This will build all the scene data and train four different knowledge graph embedding models on two sets of autonomous driving data."