fastnlp / fastNLP

fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.
https://gitee.com/fastnlp/fastNLP
Apache License 2.0
3.06k stars 450 forks source link

建议在训练过程中打印所指定的多个指标的值 #288

Closed onebula closed 4 years ago

onebula commented 4 years ago

trainer中支持通过列表传入多个metric,训练时以第一个metric为准。但是实际运行中仅打印了第一个metric,剩下的metric没有打印。希望能够同时打印所有的metric。 我在做多任务学习的过程中遇到了这个问题,每个任务有一个指标。由于需要调整多任务的超参数配置及权重,因此需要通过观察各个任务的metric判断各个任务的收敛速度。

yhcc commented 4 years ago

按道理,是都会打印的。建议尝试通过pip install git+https://github.com/fastnlp/fastNLP安装github上的版本试一下

onebula commented 4 years ago

有更新pypi源的版本的计划么?

yhcc commented 4 years ago

月底应该就会更新

onebula commented 4 years ago

按道理,是都会打印的。建议尝试通过pip install git+https://github.com/fastnlp/fastNLP安装github上的版本试一下。

我找到问题了,我使用了多个acc,但是没有通过set_metric_name设置为不同的名字,而评估返回的结果是字典,这些acc的值全部填入了同一个键“acc”中,由于只有一个键,最终只打印了这个键的值。 希望能够在文档里做一些提示,或者代码里能自动检查重名的metric,并修改名字为“acc_1”,”acc_2“这样的(keras有类似功能)