forked from claws-lab/jodie
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathevaluate_all_epochs.sh
executable file
·36 lines (29 loc) · 1.02 KB
/
evaluate_all_epochs.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
#!/bin/bash
: '
This code evaluates the performance of the model for all epochs.
Then it runs the code that find the best validation epoch and uses it to calculate the performance of the model.
To run the code for interaction prediction on the reddit dataset:
$ ./evaluate_all_epochs.sh reddit interaction
To run the code for state change prediction on the reddit dataset:
$ ./evaluate_all_epochs.sh reddit state
'
network=$1
type=$2
gpu=$3
idx=${4-0}
interaction="interaction"
while [ $idx -le 5 ]
do
echo $idx
if [ $type == "$interaction" ]; then
python2.7 evaluate_interaction_prediction.py --network $network --model jodie-ce --epoch ${idx} --device cpu
else
python2.7 evaluate_state_change_prediction.py --network $network --model jodie --epoch ${idx} --gpu ${gpu}
fi
(( idx+=1 ))
done
if [ $type == "$interaction" ]; then
python get_final_performance_numbers.py results/interaction_prediction_${network}.txt
else
python get_final_performance_numbers.py results/state_change_prediction_${network}.txt
fi