BUG? _log() got an unexpected keyword argument 'end'
See original GitHub issueTraceback (most recent call last): | 0/949 [00:00<?, ?it/s]
File "train_bert.py", line 105, in <module>
main()
File "train_bert.py", line 95, in main
model.train_model(train_df=df_train)
File "/opt/conda/lib/python3.6/site-packages/simpletransformers/classification/classification_model.py", line 219, in train_model
global_step, tr_loss = self.train(train_dataset, output_dir, multi_label=multi_label, show_running_loss=show_running_loss, eval_df=eval_df, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/simpletransformers/classification/classification_model.py", line 330, in train
logger.info("\rRunning loss: %f\n" % loss, end="")
File "/opt/conda/lib/python3.6/logging/__init__.py", line 1307, in info
self._log(INFO, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument 'end'
Looks like switching from print
to logging
is causing this issue
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
TypeError: _log() got an unexpected keyword argument ...
Using stacklevel with log.error produces this error ...
Read more >Error in prod - TypeError: _log() got an unexpected keyword ...
Successfully merging a pull request may close this issue. Get rid of invalid argument file when logging codalab/codalab-worksheets.
Read more >Bug #143748 (zope2dev-2155) “_log() got an unexpected ...
I'm not sure I understand the original problem, exactly, but I encountered "_log() got an unexpected keyword argument 'error'" when starting up ...
Read more >2033970 – Repository sync ends with a warning of "Artifact ...
Bug 2033970 - Repository sync ends with a warning of "Artifact() got an unexpected keyword argument 'sha'" for some repos in Satellite 6.10....
Read more >logging module: log method with keyword arguments
_log, (DEBUG, msg, args), kwargs) TypeError: _log() got an unexpected keyword argument 'msg2' Now, I can kind of understand this because the ...
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
@ThilinaRajapakse let me know if you want me to take a stab at this.
Can we please follow best practices? see: https://docs.python.org/3/howto/logging.html#library-config
logging.info()… is bad form, not recommended, should actually declare a Logger instance. Also the error is: logger.info(“\rRunning loss: %f\n” % loss, end=“”)
@kinoute This is a library, if folks want info from it, they should initialize a logger:
import logging
logging.basicConfig(level=logging.DEBUG)