Skip to content

Commit

Permalink
update box/beta/vec scripts for the three small datset
Browse files Browse the repository at this point in the history
  • Loading branch information
hyren committed Feb 14, 2022
1 parent f7c5619 commit be4d1a6
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 25 deletions.
7 changes: 4 additions & 3 deletions smore/training/beta_scripts/train_15k.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ eval_path=$data_folder/eval-betae
export CUDA_VISIBLE_DEVICES=0,1,2,3

#beta
python ../main_train.py --do_test --gpus '0.1.2.3' \
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 400 -g 60 \
-a 0.5 -adv \
-lr 0.0001 --max_steps 450001 --geo beta --valid_steps 15000 \
-betam "(1600,2)" --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
-betam '(1600,2,fisher,0.055,layer,True)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 150000 \
--share_negative \
--logit_impl custom \
--lr_schedule none \
--sampler_type naive \
--filter_test \
--share_optim_stats \
--port 29501 \
--port 29511 \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(20,20,20,10,10)' --print_on_screen \
$@
9 changes: 5 additions & 4 deletions smore/training/beta_scripts/train_237.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

data_name=FB15k-237-betae
data_name=FB15k-237
data_folder=$HOME/data/knowledge_graphs/$data_name
eval_path=$data_folder/eval-original
eval_path=$data_folder/eval-betae

export CUDA_VISIBLE_DEVICES=0,1,2,3

Expand All @@ -26,14 +26,15 @@ python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
-n 1024 -b 512 -d 400 -g 60 \
-a 0.5 -adv \
-lr 0.0001 --max_steps 450001 --geo beta --valid_steps 15000 \
-betam "(1600,2)" --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
-betam '(1600,2,fisher,0.055,layer,True)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 150000 \
--share_negative \
--lr_schedule none \
--logit_impl custom \
--sampler_type naive \
--filter_test \
--share_optim_stats \
--port 29500 \
--port 29510 \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(20,20,20,10,10)' --print_on_screen \
$@
5 changes: 3 additions & 2 deletions smore/training/beta_scripts/train_nell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
-n 1024 -b 512 -d 400 -g 60 \
-a 0.5 -adv \
-lr 0.0001 --max_steps 450001 --geo beta --valid_steps 15000 \
-betam "(1600,2)" --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
-betam '(1600,2,fisher,0.055,layer,True)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 150000 \
--share_negative \
--lr_schedule none \
--logit_impl custom \
--sampler_type naive \
--filter_test \
--share_optim_stats \
--port 29500 \
--port 29512 \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(20,20,20,10,10)' --print_on_screen \
$@
3 changes: 2 additions & 1 deletion smore/training/box_scripts/train_15k.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 400 -g 24 \
-lr 0.0001 --max_steps 1000001 --geo box --valid_steps 20000 \
-lr 0.0001 --max_steps 1500001 --geo box --valid_steps 20000 \
-boxm '(none,0.02)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 50000 \
--sampler_type naive \
--logit_impl custom \
--lr_schedule none \
--port 29500 \
--share_negative \
Expand Down
9 changes: 5 additions & 4 deletions smore/training/box_scripts/train_237.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

data_name=FB15k-237-betae
data_name=FB15k-237
data_folder=$HOME/data/knowledge_graphs/$data_name
eval_path=$data_folder/eval-original
eval_path=$data_folder/eval-betae

export CUDA_VISIBLE_DEVICES=0,1,2,3

#box
python ../main_train.py --do_test --gpus '0.1.2.3' \
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 400 -g 24 \
-lr 0.0001 --max_steps 450001 --geo box --valid_steps 15000 \
-boxm '(none,0.02)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 30000 \
--logit_impl custom \
--share_negative \
--filter_test \
--share_optim_stats \
--port 29500 \
--port 29502 \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(2,2,2,1,1)' --print_on_screen \
$@
3 changes: 2 additions & 1 deletion smore/training/box_scripts/train_nell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export CUDA_VISIBLE_DEVICES=4,5,6,7
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 400 -g 24 \
-lr 0.0001 --max_steps 450001 --geo box --valid_steps 15000 \
-lr 0.0001 --max_steps 600001 --geo box --valid_steps 15000 \
-boxm '(none,0.02)' --tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 30000 \
--sampler_type naive \
--logit_impl custom \
--port 29501 \
--share_negative \
--filter_test \
Expand Down
5 changes: 3 additions & 2 deletions smore/training/vec_scripts/train_15k.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 800 -g 24 \
-lr 0.0001 --max_steps 450001 --geo vec --valid_steps 15000 \
-lr 0.0001 --max_steps 2000001 --geo vec --valid_steps 15000 \
--tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 30000 \
--sampler_type naive \
--logit_impl custom \
--share_negative \
--filter_test \
--port 29500 \
--port 29503 \
--share_optim_stats \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(2,2,2,1,1)' --print_on_screen \
Expand Down
11 changes: 6 additions & 5 deletions smore/training/vec_scripts/train_237.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.

data_name=FB15k-237-betae
data_name=FB15k-237
data_folder=$HOME/data/knowledge_graphs/$data_name
eval_path=$data_folder/eval-original
eval_path=$data_folder/eval-betae

export CUDA_VISIBLE_DEVICES=0,1,2,3

#vec
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 800 -g 24 \
-lr 0.0001 --max_steps 750001 --geo vec --valid_steps 15000 \
-lr 0.0001 --max_steps 1500001 --geo vec --valid_steps 15000 \
--tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 30000 \
--lr_schedule none \
--sampler_type sqrt \
--sampler_type naive \
--logit_impl custom \
--share_negative \
--filter_test \
--port 29500 \
--port 29505 \
--share_optim_stats \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(2,2,2,1,1)' --print_on_screen \
Expand Down
7 changes: 4 additions & 3 deletions smore/training/vec_scripts/train_nell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python ../main_train.py --do_train --do_test --gpus '0.1.2.3' \
--data_path $data_folder --eval_path $eval_path \
-n 1024 -b 512 -d 800 -g 24 \
-lr 0.0001 --max_steps 800001 --geo vec --valid_steps 20000 \
-lr 0.0001 --max_steps 2000001 --geo vec --valid_steps 20000 \
--tasks '1p.2p.3p.2i.3i.ip.pi.2u.up' --training_tasks '1p.2p.3p.2i.3i' \
--save_checkpoint_steps 40000 \
--lr_schedule step \
--lr_schedule none \
--sampler_type naive \
--logit_impl custom \
--share_negative \
--filter_test \
--port 29500 \
--port 29504 \
--share_optim_stats \
--online_sample --prefix '../logs' --online_sample_mode '(500,0,w,wstruct,120)' \
--train_online_mode '(single,3000,e,True,before)' --optim_mode '(aggr,adam,cpu,False,5)' --online_weighted_structure_prob '(2,2,2,1,1)' --print_on_screen \
Expand Down

0 comments on commit be4d1a6

Please sign in to comment.