Closed ujjawalcse closed 1 year ago
Hello @ujjawalcse :wave: Thanks for opening this issue!
It's normal, there is an ignore_labels
argument you can pass to your pipeline to avoid some tokens. By default "0" tokens are ignored.
Check the documentation here.
Got it. Thanks.
Hey @ChainYo , I tried your script with my custom fine-tuned model. But the output is not as expected. It's predicting for each tokens instead. Here are some outputs sample,
[{'entity_group': 'LABEL_6', 'score': 0.14850605, 'word': 'ab', 'start': 0, 'end': 2}, {'entity_group': 'LABEL_0', 'score': 0.12011145, 'word': '##hishe', 'start': 2, 'end': 7}, {'entity_group': 'LABEL_6', 'score': 0.11439563, 'word': '##k kumar', 'start': 7, 'end': 14}, {'entity_group': 'LABEL_13', 'score': 0.11188321, 'word': 'education', 'start': 16, 'end': 25}, {'entity_group': 'LABEL_0', 'score': 0.11445558, 'word': '&', 'start': 26, 'end': 27}, {'entity_group': 'LABEL_13', 'score': 0.10697147, 'word': 'credentials', 'start': 28, 'end': 39}, {'entity_group': 'LABEL_9', 'score': 0.12449409, 'word': 'msc (', 'start': 40, 'end': 45}, {'entity_group': 'LABEL_13', 'score': 0.123251475, 'word': 'information', 'start': 45, 'end': 56}, {'entity_group': 'LABEL_0', 'score': 0.13867705, 'word': 'technology management', 'start': 57, 'end': 78}, {'entity_group': 'LABEL_1', 'score': 0.11498813, 'word': ')', 'start': 78, 'end': 79}, {'entity_group': 'LABEL_8', 'score': 0.12129795, 'word': 'from', 'start': 80, 'end': 84}, {'entity_group': 'LABEL_6', 'score': 0.12780227, 'word': 'university of', 'start': 85, 'end': 98}]
My onnx exporting script is as follows:
Here is the inference script provided by you,
Can you just guide where I'm doing wrong? Thanks.