-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiment-rs.sh
92 lines (86 loc) · 2.81 KB
/
experiment-rs.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
export PYTHONPATH=`pwd`
echo $PYTHONPATH
source $1
exp=$2
gpu=$3
ARGS=${@:4}
group_examples_by_query_flag=''
if [[ $group_examples_by_query = *"True"* ]]; then
group_examples_by_query_flag="--group_examples_by_query"
fi
relation_only_flag=''
if [[ $relation_only = *"True"* ]]; then
relation_only_flag="--relation_only"
fi
if [[ $time_only = *"True"* ]]; then
time_only_flag="--time_only"
fi
use_action_space_bucketing_flag=''
if [[ $use_action_space_bucketing = *"True"* ]]; then
use_action_space_bucketing_flag='--use_action_space_bucketing'
fi
use_action_selection_flag=''
if [[ $use_action_selection = *"True"* ]]; then
use_action_selection_flag='--use_action_selection'
fi
use_state_prediction_flag=''
if [[ $use_state_prediction = *"True"* ]]; then
use_state_prediction_flag='--use_state_prediction'
fi
mask_sim_relation_flag=''
if [[ $mask_sim_relation = *"True"* ]]; then
mask_sim_relation_flag='--mask_sim_relation'
fi
cmd="python3.6 -m src.experiments \
--data_dir $data_dir \
$exp \
--model $model \
--bandwidth $bandwidth \
--entity_dim $entity_dim \
--relation_dim $relation_dim \
--time_dim $time_dim \
--history_dim $history_dim \
--history_num_layers $history_num_layers \
--num_rollouts $num_rollouts \
--num_rollout_steps $num_rollout_steps \
--bucket_interval $bucket_interval \
--num_epochs $num_epochs \
--num_wait_epochs $num_wait_epochs \
--num_peek_epochs $num_peek_epochs \
--batch_size $batch_size \
--train_batch_size $train_batch_size \
--dev_batch_size $dev_batch_size \
--margin $margin \
--learning_rate $learning_rate \
--baseline $baseline \
--grad_norm $grad_norm \
--emb_dropout_rate $emb_dropout_rate \
--ff_dropout_rate $ff_dropout_rate \
--action_dropout_rate $action_dropout_rate \
--action_dropout_anneal_interval $action_dropout_anneal_interval \
--reward_shaping_threshold $reward_shaping_threshold \
$relation_only_flag \
--beta $beta \
--beam_size $beam_size \
--num_paths_per_entity $num_paths_per_entity \
$group_examples_by_query_flag \
$use_action_space_bucketing_flag \
--distmult_state_dict_path $distmult_state_dict_path \
--complex_state_dict_path $complex_state_dict_path \
--conve_state_dict_path $conve_state_dict_path \
--tucker_state_dict_path $tucker_state_dict_path \
--TransE_state_dict_path $TransE_state_dict_path \
$use_action_selection_flag \
$use_state_prediction_flag \
$mask_sim_relation_flag \
--max_dynamic_action_size $max_dynamic_action_size \
--dynamic_split_bound $dynamic_split_bound \
--avg_entity_per_relation $avg_entity_per_relation \
--strategy $strategy \
--emb_2D_d1 $emb_2D_d1 \
--emb_2D_d2 $emb_2D_d2 \
--gpu $gpu \
$ARGS"
echo "Executing $cmd"
$cmd