• Hong Xu's avatar
    In the run_ner.py example, give the optional label arg a default value (#5326) · 501040fd
    Hong Xu authored
    Otherwise, if label is not specified, the following error occurs:
    
    	Traceback (most recent call last):
    	  File "run_ner.py", line 303, in <module>
    	    main()
    	  File "run_ner.py", line 101, in main
    	    model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
    	  File "/home/user/anaconda3/envs/bert/lib/python3.7/site-packages/transformers/hf_argparser.py", line 159, in parse_json_file
    	    obj = dtype(**inputs)
    	TypeError: __init__() missing 1 required positional argument: 'labels'
    501040fd
run_ner.py 10.9 KB