Skip to content

Commit 093dd7e

Browse files
authored
Update doccano.py
1 parent 9f78fa5 commit 093dd7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

model_zoo/uie/doccano.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
from decimal import Decimal
2121

2222
import numpy as np
23-
from utils import convert_cls_examples, convert_ext_examples, set_seed, str2bool
23+
from utils import convert_cls_examples, convert_ext_examples, set_seed
2424

25+
from paddlenlp.trainer.argparser import strtobool
2526
from paddlenlp.utils.log import logger
2627

2728

@@ -167,7 +168,7 @@ def _save_examples(save_dir, file_name, examples):
167168
parser.add_argument("--task_type", choices=['ext', 'cls'], default="ext", type=str, help="Select task type, ext for the extraction task and cls for the classification task, defaults to ext.")
168169
parser.add_argument("--options", default=["正向", "负向"], type=str, nargs="+", help="Used only for the classification task, the options for classification")
169170
parser.add_argument("--prompt_prefix", default="情感倾向", type=str, help="Used only for the classification task, the prompt prefix for classification")
170-
parser.add_argument("--is_shuffle", default="True", type=str2bool, help="Whether to shuffle the labeled dataset, defaults to True.")
171+
parser.add_argument("--is_shuffle", default="True", type=strtobool, help="Whether to shuffle the labeled dataset, defaults to True.")
171172
parser.add_argument("--seed", type=int, default=1000, help="Random seed for initialization")
172173
parser.add_argument("--separator", type=str, default='##', help="Used only for entity/aspect-level classification task, separator for entity label and classification label")
173174
parser.add_argument("--schema_lang", choices=["ch", "en"], default="ch", help="Select the language type for schema.")

0 commit comments

Comments
 (0)