Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/fuxiAIlab/RL4RS into main
Browse files Browse the repository at this point in the history
  • Loading branch information
asdqsczser committed Sep 2, 2022
2 parents 7f21a78 + 380cc9b commit 8720840
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions reproductions/run_modelfree_rl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,38 @@ algo=$1
cd ${script_dir}

# experiment in a_all env, train in a_all sample and test in a_all sample
python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log
python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log
python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log &&
python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_all_${algo}.log &&


# experiment in a_all env, train in a_train sample and test in a_test sample
#python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_train_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log
#python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log
#python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_train_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log &&
#python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_dien/model','trial_name':'a_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_train_${algo}.log &&


# experiment train in a_sl env and test in a_rl env
#python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_sl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_sl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log
#python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_rl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_rl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log
#python -u modelfree_train.py $algo "train" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_sl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_sl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log &&
#python -u modelfree_train.py $algo "eval" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_rl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_a_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_a_rl_dien/model','trial_name':'a_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_a_sl_${algo}.log &&


# experiment in b_all env, train in b_all sample and test in b_all sample
python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log
python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log
python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log &&
python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_all','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_all_${algo}.log &&


# experiment in b_all env, train in b_train sample and test in b_test sample
#python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_train_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log
#python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log
#python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_train_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log &&
#python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_test_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_dien/model','trial_name':'b_train','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_train_${algo}.log &&


# experiment train in b_sl env and test in b_rl env
#python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_sl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_sl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log
#python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_rl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_rl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log
#python -u modelfree_train.py $algo "train" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_sl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_sl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log &&
#python -u modelfree_train.py $algo "eval" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_rl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log &&
#python -u modelfree_train.py $algo "ope" "{'env':'SeqSlateRecEnv-v0','iteminfo_file':'${rl4rs_dataset_dir}/item_info.csv','sample_file':'${rl4rs_dataset_dir}/rl4rs_dataset_b3_rl_shuf.csv','model_file':'${rl4rs_output_dir}/simulator_b2_rl_dien/model','trial_name':'b_sl','remote_base':'http://127.0.0.1:5000'}" >> ${rl4rs_output_dir}/modelfree_b_sl_${algo}.log &&

echo "1"

0 comments on commit 8720840

Please sign in to comment.