BERT模型的run_classifier文件调用了subprocess,但是并没有import
Created by: wwjjy
BERT模型的run_classifier文件调用了subprocess,但是并没有import。所以在运行时会报错,如下: Traceback (most recent call last): File "run_classifier.py", line 443, in main(args) File "run_classifier.py", line 133, in main dev_count = get_device_num() File "run_classifier.py", line 124, in get_device_num device_num = subprocess.check_output(['nvidia-smi','-L']).decode().count('\n') NameError: name 'subprocess' is not defined