From fe4f7c29a6d35f0cdb26d4bae2cb4e3939d0247d Mon Sep 17 00:00:00 2001 From: apoyiatzis Date: Sun, 10 Mar 2019 19:31:47 +0200 Subject: [PATCH] fix hardcoded output dir --- BERT_NER.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BERT_NER.py b/BERT_NER.py index 223cd32..0fdcf03 100644 --- a/BERT_NER.py +++ b/BERT_NER.py @@ -210,7 +210,7 @@ def convert_single_example(ex_index, example, label_list, max_seq_length, tokeni label_map = {} for (i, label) in enumerate(label_list,1): label_map[label] = i - with open('./output/label2id.pkl','wb') as w: + with open(os.path.join(FLAGS.output_dir, 'label2id.pkl'),'wb') as w: pickle.dump(label_map,w) textlist = example.text.split(' ') labellist = example.label.split(' ')