ModelScope训练完后报的消息,是不是召回率参数有问题?
UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use zero_division
parameter to control this behavior.
_warn_prf(average, modifier, msg_start, len(result))
2023-08-30 15:06:55,459 - modelscope - INFO - Saving checkpoint at 1 epoch
2023-08-30 15:07:11,261 - modelscope - INFO - epoch(eval) [1][1] evaluation/precision: 0.0000, evaluation/recall: 0.0000, evaluation/f1: 0.0000, evaluation/accuracy: 0.4556
2023-08-30 15:07:11,267 - modelscope - INFO - Train finished. Uploading models, waiting...
2023-08-30 15:07:14,403 - modelscope - INFO - PyTorch version 2.0.1 Found.
2023-08-30 15:07:14,405 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2023-08-30 15:07:14,494 - modelscope - INFO - Loading done! Current index file version is 1.8.1, with md5 9de70e9581669e08723136e29e58bb94 and a total number of 893 components indexed
2023-08-30 15:07:18,623 - modelscope - INFO - PyTorch version 2.0.1 Found.
2023-08-30 15:07:18,624 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2023-08-30 15:07:18,716 - modelscope - INFO - Loading done! Current index file version is 1.8.1, with md5 9de70e9581669e08723136e29e58bb94 and a total number of 893 components indexed
2023-08-30 15:07:19,811 - modelscope - INFO - {'done': True}
"我这边对应的log:evaluation/precision: 0.8679, evaluation/recall: 0.9040, evaluation/f1: 0.8856, evaluation/accuracy: 0.9258
参数设置{'output': [{'type': 'prov', 'start': 0, 'end': 3, 'span': '安徽省'}, {'type': 'city', 'start': 3, 'end': 6, 'span': '合肥市'}, {'type': 'district', 'start': 6, 'end': 9, 'span': '蜀山区'}, {'type': 'road', 'start': 9, 'end': 13, 'span': '望江西路'}, {'type': 'roadno', 'start': 13, 'end': 17, 'span': '900号'}, {'type': 'poi', 'start': 17, 'end': 21, 'span': '中安创谷'}]}
此回答整理自“魔搭ModelScope开发者联盟群 ①”。"