AttributeError: 'ModelArguments' object has no attribute 'add_entity'
YiLing28 opened this issue · 1 comments
YiLing28 commented
Steps to reproduce:
- run python covert_weight_from_bert_to_sarg.py,save the model to ./resources/model/Roberta-WWM-Init
- export CUDA_VISIBLE_DEVICES=0,1
python -m torch.distributed.launch --nproc_per_node 2 --master_port 29500 run_train.py
--output_dir sarg-ailab-no-cov
--do_train
--do_eval
--output_best_dir sarg-ailab-no-cov-best
--learning_rate 5e-5
--max_steps 2000
--save_total_limit 3
--save_steps 200
--per_gpu_train_batch_size 64
--per_gpu_eval_batch_size 64
--seed 42
--tokenizer_name BertTokenizer
--logging_steps 200
--mode ailab
--evaluate_during_training True
--model_name_or_path ./resources/model/Roberta-WWM-Init
--train_data_file Restoration_200k_data/train.txt
--eval_data_file Restoration_200k_data/valid.txt
--alpha 3
--change_weight 1.5
report an error:the code:
logger.info(f"Set the add_entity to {bool(model_args.add_entity) or bool(bool(model_args.add_cut))}")
AttributeError: 'ModelArguments' object has no attribute 'add_entity'
hmzo commented
Hello ,YiLing
These two arguments, "add_entity" and "add_cut", are both experimental used in our ablation study. So you can easily delete them or extend the class "ModelArguments" as below:
`
add_entity: int = field(default=0, metadata={"help": "add entity information or not"})
add_cut: int = field(default=0, metadata={"help": "add cut information or not"})
`