ymcui / cmrc2018

A Span-Extraction Dataset for Chinese Machine Reading Comprehension (CMRC 2018)
https://ymcui.github.io/cmrc2018/
Creative Commons Attribution Share Alike 4.0 International
415 stars 87 forks source link

ValueError: Unknown hparam output_dir #24

Open lloydjie1 opened 1 year ago

lloydjie1 commented 1 year ago

In running the program, I put in

python run_finetuning.py --data-dir=/home/pc/work/Chinese-ELECTRA-master/data-dir --model-name ELECTRA-180g-small, Chinese --hparams params_cmrc2018.json

File "/home/pc/work/Chinese-ELECTRA-master/configure_finetuning.py", line 175, in update raise ValueError("Unknown hparam " + k) ValueError: Unknown hparam output_dir

the params_cmrc2018.json is as follows

{ "model_name_or_path": "ELECTRA-180g-small, Chinese ", "output_dir": "./output", "train_file": "cmrc2018_train.json", "predict_file": "cmrc2018_dev.json", "max_seq_length": 512, "doc_stride": 128, "max_query_length": 64, "per_gpu_train_batch_size": 8, "per_gpu_eval_batch_size": 8, "learning_rate": 2e-5, "num_train_epochs": 3, "logging_steps": 100, "save_steps": 1000, "warmup_steps": 1000, "weight_decay": 0.01, "adam_epsilon": 1e-6, "max_grad_norm": 1.0, "gradient_accumulation_steps": 1, "n_best_size": 20, "max_answer_length": 30, "do_train": true, "do_eval": true, "evaluate_during_training": true, "overwrite_output_dir": true, "seed": 42 }

I wonder if anyone can help me solve the problem of ValueError, thanks a lot!