From f31e3a2beaeef72009fe5b9215183f6af9c09e7a Mon Sep 17 00:00:00 2001 From: tlk1997 <56509305+tlk1997@users.noreply.github.com> Date: Mon, 1 Nov 2021 16:42:24 +0800 Subject: [PATCH] Update run.py --- example/ner/few-shot/run.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/ner/few-shot/run.py b/example/ner/few-shot/run.py index 68b0bde..f7f4799 100644 --- a/example/ner/few-shot/run.py +++ b/example/ner/few-shot/run.py @@ -99,11 +99,12 @@ def main(cfg): metrics = Seq2SeqSpanMetric(eos_token_id=1, num_labels=len(label_ids), target_type='word') loss = get_loss - trainer = Trainer(train_data=train_dataloader, dev_data=dev_dataloader, test_data=None, model=model, args=cfg, logger=logger, loss=loss, metrics=metrics, writer=writer) + trainer = Trainer(train_data=train_dataloader, dev_data=dev_dataloader, test_data=None, model=model, args=cfg, logger=logger, loss=loss, + metrics=metrics, writer=writer) trainer.train() writer.close() if __name__ == "__main__": - main() \ No newline at end of file + main()