Skip to content

Conversation

@HolyWu
Copy link
Contributor

@HolyWu HolyWu commented Oct 5, 2024

Description

Add an option to colorize text written by logging module.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions bot added component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: torch_compile labels Oct 5, 2024
@github-actions github-actions bot requested a review from gs-olive October 5, 2024 09:17
@narendasan
Copy link
Collaborator

Do we need to include this as part of the library? My impression is that folks using logging typically bring their own loggerConfig. We actually just removed another vestigial loggerConfig from fx that was causing issues for a user #3145

@HolyWu
Copy link
Contributor Author

HolyWu commented Oct 10, 2024

I think the cause of #3145 was that basicConfig was invoked globally in __init__.py and hence users had no choice. The added option is defaulted to False so it shouldn't affect people who want to add their own handler though.

@HolyWu
Copy link
Contributor Author

HolyWu commented Oct 10, 2024

Closing as it's actually not a good idea to use basicConfig which adds handler to the root logger rather than the module's logger.

@HolyWu HolyWu closed this Oct 10, 2024
@HolyWu HolyWu deleted the color_log branch October 10, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: torch_compile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants