fastnlp / fastNLP

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

[fix]修复fitlocallback 在DistTrainer的使用中无法添加dev_data的问题 #347

Closed ROGERDJQ closed 3 years ago

ROGERDJQ commented 3 years ago

Description:fitlocallback 在DistTrainer的使用中无法添加dev_data,主要原因在于fitlogcallback验证self.trainer.dev_data时,也即DIstanbulTrainer没有dev_data属性导致调用失败报错

Main reason: 修复fitlocallback 在DistTrainer的使用中无法添加dev_data的问题

Checklist 检查下面各项是否完成

Please feel free to remove inapplicable items for your PR.

Changes: 修复fitlocallback 在DistTrainer的使用中无法添加dev_data的问题

Mention: 找人review你的PR

@修改过这个文件的人 @核心开发人员

xuyige commented 3 years ago

不要修改.gitignore里面的内容~~

ROGERDJQ commented 3 years ago

已经修改 \//

yhcc commented 3 years ago

从files changed来看似乎还是修改了.gitignore? 另外fitlogcallback无法添加dev_data是什么意思,就是fitlogcallback在distTrainer有dev_data的情况下也不evaluate吗?

ROGERDJQ commented 3 years ago

好的 重新把gitignore恢复了 确实之前还是操作有问题 因为本来的fitlogcallback可以额外传入dev_data,就是fitlogcallback(dev_data=...),但是我发现在是在使用disttrainer的时候,使用的fitlogcallback如果传入了dev_data就有后续的报错,不传入的话就没有什么问题。

ROGERDJQ commented 3 years ago

全部修改业已完成