Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问required parameters的list是什么呢? #88

Open
xiaohou1112 opened this issue Jul 27, 2022 · 1 comment
Open

请问required parameters的list是什么呢? #88

xiaohou1112 opened this issue Jul 27, 2022 · 1 comment

Comments

@xiaohou1112
Copy link

xiaohou1112 commented Jul 27, 2022

运行报错
run_ner_crf.py: error: the following arguments are required: --task_name, --data_dir, --model_type, --model_name_or_path, --output_dir

然后看get_argparse():函数里面的内容

parser.add_argument("--task_name,", default=None, type=str, required=True,
                        help="The name of the task to train selected in the list: ")
    parser.add_argument("--data_dir", default=None, type=str, required=True,
                        help="The input data dir. Should contain the training files for the CoNLL-2003 NER task.", )
    parser.add_argument("--model_type", default=None, type=str, required=True,
                        help="Model type selected in the list: ")
    parser.add_argument("--model_name_or_path", default=None, type=str, required=True,
                        help="Path to pre-trained model or shortcut name selected in the list: " )
    parser.add_argument("--output_dir", default=None, type=str, required=True,
                        help="The output directory where the model predictions and checkpoints will be written.", )

help里面 taskname、model type、model name 这里list是什么呢?冒号后面就没写了。
不知道这几个要传什么参数。

@xiaohou1112
Copy link
Author

--task_name"cner" --data_dir"./datasets/cner" --model_type"bert" --model_name_or_path"./prev_trained_model/bert-base-chinese" --output_dir"./outputs/cner_output/bert"

我这样子设置了一番。还是报一样的错误。
设置的时候,脚本路径第一次选择的是run_ner_crf.py,第二次选择的是tools下面的finetuning_argparse.py
两次都是报同样的错。

run_ner_crf.py: error: the following arguments are required: --task_name,, --data_dir, --model_type, --model_name_or_path, --output_dir

报错唯一的不同是,task_name后面多了一个逗号😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant