You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This logging callsets up the root logger at import time. This is problematic, because:
Client projects want to configure logging on their own.
A second handler may be added to the root logger (e.g. when the client code doesn't use logging.basicConfig). This means duplicated logs, which leads to double the storage costs, should someone use torch_tensorrt in production.
How to Reproduce:
importloggingimporttorch_tensorrt# This import triggers logging.basicConfig _LOGGER=logging.getLogger()
_LOGGER.addHandler(logging.StreamHandler())
print(f"Number of handlers on root logger: {len(_LOGGER.handlers)}")
# THIS MEANS DUPLICATE LOGS
Result: Number of handlers on root logger: 2
The text was updated successfully, but these errors were encountered:
This logging callsets up the root logger at import time. This is problematic, because:
logging.basicConfig
). This means duplicated logs, which leads to double the storage costs, should someone usetorch_tensorrt
in production.How to Reproduce:
Result:
Number of handlers on root logger: 2
The text was updated successfully, but these errors were encountered: