alistairewj / bert-deid

deidentify patient notes using pre-trained BERT
12 stars 2 forks source link

Missing --do predict text file #14

Closed knightperfectionist closed 3 years ago

knightperfectionist commented 3 years ago

I am executing the following script

!python /content/bert-deid/scripts/train_transformer.py --data_dir /content/bert-deid/data/deid-gs/i2b2_2014 --data_type i2b2_2014 --model_type bert --model_name_or_path bert-base-uncased --do_lower_case --do_predict --output_dir /data/models/bert-model-i2b2-2014 --do_train --overwrite_output_dir

As I am using --do_predict flag, it says it requires a test.txt file in the data directory.

File "/content/bert-deid/scripts/train_transformer.py", line 1156, in main with open(os.path.join(args.data_dir, "test.txt"), "r") as f:

FileNotFoundError: [Errno 2] No such file or directory: '/content/bert-deid/data/deid-gs/i2b2_2014/test.txt'

My data directory contains test/train files both text and annotated.

I want to know what the test.txt file is and where can I find it? Is there any script to generate this file??

@alistairewj @tompollard