AttributeError: 'NoneType' object has no attribute 'log_metric'
See original GitHub issueI have no idea about the following error, looking forward to someone’s help, thank you! ~~
Traceback (most recent call last):
File "disfluency_detection/pipelines/sentseg_train.py", line 427, in <module>
main()
File "disfluency_detection/pipelines/sentseg_train.py", line 394, in main
metrics = trainer.evaluate()
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/transformers/trainer.py", line 2044, in evaluate
self.log(output.metrics)
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/transformers/trainer.py", line 1709, in log
self.control = self.callback_handler.on_log(self.args, self.state, self.control, logs)
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/transformers/trainer_callback.py", line 371, in on_log
return self.call_event("on_log", args, state, control, logs=logs)
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/transformers/trainer_callback.py", line 388, in call_event
**kwargs,
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/transformers/integrations.py", line 354, in on_log
self.tb_writer.add_scalar(k, v, state.global_step)
File "/home/xxx/anaconda3/envs/correction/lib/python3.7/site-packages/tensorboardX/writer.py", line 453, in add_scalar
self.comet_logger.log_metric(tag, display_name, scalar_value, global_step)
AttributeError: 'NoneType' object has no attribute 'log_metric'
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None .
Read more >Ticket: User Preferences throws AttributeError: 'NoneType ...
It's simply because there is no attribute with the name you called, for that Object. This means that you got the error when...
Read more >Getting 'NoneType' object has no attribute 'id' error - Reddit
Can you help me solve this issue described on the post title? I am getting this error with this specific code: latest =…...
Read more >Attributeerror: 'Nonetype' Object Has No Attribute 'Startswith ...
Attributeerror : 'Nonetype' Object Has No Attribute 'Startswith ... We are exited to announce that we have released Rocket. specific users ...
Read more >AttributeError: 'NoneType' object has no attribute 'log' - Trac
AttributeError : 'NoneType' object has no attribute 'log' ... is masking the fact that it can't log another traceback (namely, clearsilver is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I used
with summary_writer:summary_writer.add_graph( )
before.add_scalar( )
After deletingwith summary_writer:
, my code could get correct output.@DrraBL Can you try whether pip install
git+https://github.com/lanpa/tensorboardX
helps?