Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an error related to pytorch_lightning in this project #13

Open
Dsqds opened this issue Jun 17, 2021 · 2 comments
Open

an error related to pytorch_lightning in this project #13

Dsqds opened this issue Jun 17, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Dsqds
Copy link

Dsqds commented Jun 17, 2021

The detection result is precision=0.033734939759036145, recall=0.7636363636363637 and F1=0.06461538461538462
The correction result is precision=0.0, recall=0.0 and F1=0
Sentence Level: acc:0.000000, precision:0.000000, recall:0.000000, f1:0.000000
Traceback (most recent call last):
File "main.py", line 102, in
main()
File "main.py", line 94, in main
trainer.fit(model, train_loader, valid_loader)
File "/home/containeruser/conda/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 918, in fit
self.single_gpu_train(model)
File "/home/containeruser/conda/lib/python3.7/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 176, in single_gpu_train
self.run_pretrain_routine(model)
File "/home/containeruser/conda/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1077, in run_pretrain_routine
_, _, _, callback_metrics, _ = self.process_output(eval_results)
File "/home/containeruser/conda/lib/python3.7/site-packages/pytorch_lightning/trainer/logging.py", line 106, in process_output
for k, v in output.items():
AttributeError: 'NoneType' object has no attribute 'items'

i think this error is strange and i don't knon how to trace it because the interface is only 'trainer.fit'.
i think maybe you had met this problem.

@gitabtion
Copy link
Owner

This error is caused by the encoding problem of the data, it fixed by my another project BertBasedCorrectionModels, you can use that project to process the data, and than copy to this project.

@gitabtion
Copy link
Owner

i will fix this issue soon, thanks.

@gitabtion gitabtion added the bug Something isn't working label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants