lonePatient / BERT-NER-Pytorch

Chinese NER(Named Entity Recognition) using BERT(Softmax, CRF, Span)
MIT License
2.05k stars 425 forks source link

终端输入运行指令后提示[Errno 22] Invalid argument:…………,似乎是日志处file地址的问题,请问如何解决? #98

Closed Violettttee closed 8 months ago

Violettttee commented 8 months ago

输入下列指令后报了上面的错误:python run_ner_softmax.py --task_name=cnerfirst --data_dir=datasets/cner --model_type=bert --model_name_or_path=prev_trained_model/bert-base-chinese --output_dir=outputsbert/ --do_trai ,看报错处是344行init_logger(log_file=args.output_dir + f'/{args.model_type}-{args.taskname}-{time}.log') 这里,但是我看这行上面代码里没有创建添加了时间字符串的文件夹,我是需要将time删除吗? image 另外当我将time删除后运行代码,又提示我ValueError: Output directory (outputsbert/bert) already exists and is not empty. Use --overwrite_output_dir to overcome.于是我增加了--overwrite参数,但是之后便是提示Task not found等问题,请问具体该如何解决?

Violettttee commented 8 months ago

已经解决上述问题,把time删去后也添加了overwrite参数……