Skip to content

[Bug]: AutoDeploy logger treats verbose and internal_error as info #19491

Description

@adenzhou1350

System Info

  • TensorRT-LLM main at b8e337d939cde1b7aa65feb5287e5bdefa02154b
  • Python 3.12 and 3.14
  • Reproduced on Linux and Windows
  • CPU-only; no GPU or model is involved

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

ADLogger defines AutoDeploy-specific severities and maps verbose to logging.DEBUG and internal_error to logging.CRITICAL in log(). The environment-variable path and set_level() instead use getattr(logging, ...), so these same public severity names silently fall back to INFO.

import logging
from tensorrt_llm._torch.auto_deploy.utils.logger import ADLogger

logger = ADLogger()
logger.set_level("verbose")
print(logger._logger.level)  # 20 (INFO), expected 10 (DEBUG)

logger.set_level("internal_error")
print(logger._logger.level)  # 20 (INFO), expected 50 (CRITICAL)

The same mismatch occurs when AUTO_DEPLOY_LOG_LEVEL is set before importing the module. Standard levels such as warning work as expected.

Expected behavior

All public AutoDeploy severity names should resolve consistently in log(), set_level(), and AUTO_DEPLOY_LOG_LEVEL: verbose should select DEBUG and internal_error should select CRITICAL. Unknown strings can continue to fall back to INFO.

actual behavior

Both AutoDeploy-specific names resolve to INFO in set_level() and the environment-variable initialization path, so verbose logs stay hidden and internal errors lose their intended severity.

additional notes

I searched open and closed issues/PRs and did not find an exact duplicate. A minimal fix can reuse _SEVERITY_TO_LEVEL for all three paths and add a CPU-only regression test. I have reproduced the baseline/fix differential on current main and can submit the patch if this issue is approved, per the contribution policy. The behavior remains present even though AutoDeploy is being redirected toward the standalone backend.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoDeploy<NV> AutoDeploy BackendbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions