开发者社区 > ModelScope模型即服务 > 自然语言处理 > 正文

GPT-3模型在评估时报错

Traceback (most recent call last):
  File "train_k.py", line 46, in <module>
    trainer.train()
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/trainer.py", line 496, in train
    self.train_loop(self.train_dataloader)
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/trainer.py", line 909, in train_loop
    self.invoke_hook(TrainerStages.after_train_epoch)
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/trainer.py", line 1061, in invoke_hook
    getattr(hook, fn_name)(self)
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/hooks/evaluation_hook.py", line 33, in after_train_epoch
    self.do_evaluate(trainer)
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/hooks/evaluation_hook.py", line 45, in do_evaluate
    eval_res = trainer.evaluate()
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/trainer.py", line 518, in evaluate
    metric_values = self.evaluation_loop(self.eval_dataloader,
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/trainer.py", line 954, in evaluation_loop
    results, data_list = single_gpu_test(
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/utils/inference.py", line 51, in single_gpu_test
    result = trainer.evaluation_step(data)
  File "/usr/local/lib/python3.8/dist-packages/modelscope/trainers/nlp/text_generation_trainer.py", line 34, in evaluation_step
    assert len(result['preds']) == len(data['tgts'])
AssertionError

展开
收起
1451997693938447 2022-12-20 22:28:32 1287 0
1 条回答
写回答
取消 提交回答
  • 您好,目前上线的 GPT-3 模型为续写训练形式,无法进行 evaluation,后续上线 pair 对训练形式后可以进行评估,请您等待下个版本

    2022-12-22 13:45:48
    赞同 展开评论 打赏

包含命名实体识别、文本分类、分词、关系抽取、问答、推理、文本摘要、情感分析、机器翻译等多个领域

热门讨论

热门文章

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多