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

the core module reports an error #394

Closed CoderBinGe closed 2 years ago

CoderBinGe commented 2 years ago

My fastnlp = 0.7.1, torch =1.10.0+cu113,I don’t know why the following error was reported, Please help to take a look!

image

yhcc commented 2 years ago

Why did the error say "MyTrainer" object has no attribute, should it be Trainer object? I tried to reproduce the error, but my code work properly, can you try to first uninstall fastNLP pip uninstall fastNLP then install by pip install git+https://github.com/fastnlp/fastNLP@dev.

CoderBinGe commented 2 years ago

Why did the error say "MyTrainer" object has no attribute, should it be Trainer object? I tried to reproduce the error, but my code work properly, can you try to first uninstall fastNLP pip uninstall fastNLP then install by pip install git+https://github.com/fastnlp/fastNLP@dev.

Yes, MyTrainer inherits from fastNLP Trainer. I'll try to check the code again and again. Thank you for the reply.