


task_type=$1
rec_model=$2  # MF NeuMF LightGCN SGL SGDL
attack_model=$3 # rating类支持 none, RandomAttack, AverageAttack, LoveHate, AUSH, RevAdv; 

data_name=$4
attacker_num=$5
filler_num=$6
target_num=$7
 
# 1. 修改./configs/antecedent.yaml
config_file="./configs/antecedent.yaml"
cp "./configs/antecedent_template.yaml" $config_file
# 把task_type、rec_model、attack_model 改成想要的
echo "更新配置文件: $config_file"
echo  "task_type: $task_type" >> $config_file
echo "rec_model: $rec_model" >> $config_file
echo "attack_model: $attack_model" >> $config_file

# 把data_name、attacker_num、filler_num、target_num追加到文件后面
# 追加数据参数到配置文件末尾
echo "data_name: $data_name" >> $config_file
echo "attacker_num: $attacker_num" >> $config_file
echo "filler_num: $filler_num" >> $config_file
echo "target_num: $target_num" >> $config_file

# 2. python run.py
# conda activate gcn
python main.py


# 打印参数以调试
echo "task_type: $task_type"
echo "rec_model: $rec_model"
echo "attack_model: $attack_model"
echo "data_name: $data_name"
echo "attacker_num: $attacker_num"
echo "filler_num: $filler_num"
echo "target_num: $target_num"