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

Fix trtlogger instead of mm logger #1755

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

triple-Mu
Copy link
Collaborator

TensorRT's logger behaves differently from mmdeploy's logger.

>>> import tensorrt as trt
>>> log_level = trt.Logger.ERROR
>>> logger = trt.Logger(log_level)
>>> logger.warning('This is a warning')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'tensorrt.tensorrt.Logger' object has no attribute 'warning'
>>> logger.log(log_level, 'This is a warning')
[02/14/2023-11:26:54] [TRT] [E] This is a warning

We should use logger.log method for printing infomation.
Maybe this pr can also applies to the dev branch?

Copy link
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RunningLeon RunningLeon merged commit 4bb8920 into open-mmlab:master Feb 20, 2023
@triple-Mu triple-Mu deleted the triplemu/trt-logger branch February 20, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants