From cadbc56e813acaed5068d1ad8b21f1229637720c Mon Sep 17 00:00:00 2001 From: louishsu Date: Sun, 12 Sep 2021 22:26:45 +0800 Subject: [PATCH] =?UTF-8?q?2021/09/12=20bert-rdrop0.1-fgm1.0=5Fp74.04=5Fr8?= =?UTF-8?q?9.62=5Ff81.09=20=E6=B7=BB=E5=8A=A0=E6=9C=AC=E5=9C=B0=E5=A4=9A?= =?UTF-8?q?=E6=8A=98=E6=8A=98=E9=A2=84=E6=B5=8B=E5=90=88=E5=B9=B6=E5=88=86?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run_span.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run_span.py b/run_span.py index c931d27..119a675 100644 --- a/run_span.py +++ b/run_span.py @@ -954,8 +954,8 @@ def evaluate(args, model, processor, tokenizer, prefix=""): return results def predict_decode_batch(example, batch, id2label, post_process=True): - if example["id"].split("-")[-1] == "0004d0b59e19461ff126e3a08a814c33": - print() + # if example["id"].split("-")[-1] == "033522d9bdf796d13c4b594cbdf03184": + # print() is_intersect = lambda a, b: min(a[1], b[1]) - max(a[0], b[0]) > 0 is_a_included_by_b = lambda a, b: min(a[1], b[1]) - max(a[0], b[0]) == a[1] - a[0] is_contain_special_char = lambda x: any([c in text[x[0]: x[1]] for c in [",", ",", "、"]]) @@ -1140,7 +1140,7 @@ def load_dataset(args, processor, tokenizer, data_type='train'): args = parser.parse_args_from_json(json_file=os.path.abspath(sys.argv[1])) else: args = parser.build_arguments().parse_args() - # args = parser.parse_args_from_json(json_file="output/ner-cail_ner-bert_span-aug_ctx1.0-fold0-42/training_args.json") + # args = parser.parse_args_from_json(json_file="output/ner-cail_ner-bert_span-rdrop0.1-fgm1.0-fold3-42/training_args.json") # Set seed before initializing model. seed_everything(args.seed)