Skip to content

[Fix][MetaSchedule] Ignore unnamed handlers when configuring loggers - #20829

Open
Aurora-L6 wants to merge 1 commit into
apache:mainfrom
Aurora-L6:fix/metaschedule-unnamed-log-handlers
Open

Aurora-L6 wants to merge 1 commit into
apache:mainfrom
Aurora-L6:fix/metaschedule-unnamed-log-handlers

Conversation

@Aurora-L6

Copy link
Copy Markdown

An application-installed, unnamed logging.StreamHandler or logging.NullHandler makes MetaSchedule task logger initialization fail with AttributeError: 'NoneType' object has no attribute 'format'. create_loggers includes the handler's default None name in references that are later formatted as strings.

Skip unnamed existing handlers when constructing those named references. Add a subprocess-isolated regression covering both handler types and a no-handler control; each case initializes twice and verifies messages in both task log files.

Fixes #20828.

Validation on macOS arm64, Python 3.12.11, with a clean CPU-only build of TVM main (e345029c):

  • Before the fix: the two unnamed-handler cases fail with the reported AttributeError; the no-handler control passes.
  • After the fix: the three regression cases and two adjacent MetaSchedule profiler tests pass (5 passed).
  • pre-commit run --files python/tvm/s_tir/meta_schedule/logging.py tests/python/s_tir/meta_schedule/test_meta_schedule_logging.py: all applicable hooks pass.

This branch has not been deployed

No deployments
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.

[Bug][MetaSchedule] Unnamed logging handlers crash task logger initialization

1 participant