-
Notifications
You must be signed in to change notification settings - Fork 903
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
difficulty to read logs with Jupyter (VSCode Dark theme) and new logging #1733
Comments
thank you for your reply. |
@noklam maybe let's group this under the similar databricks issue? |
I get a clear log with it on the VSCode Jupyter But with Supplement a bit more, it is recognized correctly as |
@datajoely Do you think this is a import rich
rich.pretty.install()
console = rich.get_console()
console |
Can we get anywhere with this |
@datajoely Doesn't seem to have any effect. I think it's likely some hook buried in |
Maybe we should provide a readymade console to the https://github.com/Textualize/rich/blob/2ee992b17ef5ff3c34f89545b0d57ad4690a64fc/rich/pretty.py#L198 |
@datajoely Did you get any working example that has effect on it? I try to play around with the config but it doesn't change the output style at all. There is another |
I guess we need to set this global beforehand? https://github.com/Textualize/rich/blob/2ee992b17ef5ff3c34f89545b0d57ad4690a64fc/rich/__init__.py#L30 |
I can confirm this is a problem with Jupyter specifically (not IPython) and not limited to VSCode. It boils down to how rich handles the colour scheme. Here's what I get with Here's what I get with The colour schemes used here are clearly a bit different. The one I see in Jupyter is the same as the one that you see in VSCode Jupyter also. Ultimately this is due the fact that rich seems to render logging using a slightly different colour scheme in Jupyter compared to on the console. e.g. using this example from the docs in a plain (non-Kedro) Jupyter notebook. The So I think what we're seeing here is nothing in particular to do with the Kedro setup but the fact that rich uses a different colour scheme for logging in Jupyter vs. on the console. I don't know if that's deliberate or not - we should ask there. |
I'll add my own experience, I just install |
Essentially Textualize/rich#505, Textualize/rich#2484 |
Rich is not doing anything about this issue, and in theory there are themes one can customise but it's not clear to me how to apply them. Closing this as won't fix. Stay tuned to the linked issues for upcoming changes in how we manage logging and our rich integration. |
Description
I'm working on VSCode, and I custom my vscode with the Dark+ color theme. When I use interactive python to work it's really diffcult to read logs because of colors. I need to select them to be able to read them correctly. I notice that the colors are slightly different in interactive python and in terminal.
Context
Steps to Reproduce
you will have :
you will have :
Expected Result
I would like to have readable logs.
Actual Result
logs are difficulty to read.
Your Environment
pip show kedro
orkedro -V
): 0.18.2python -V
): 3.9.13thank you for your help :)
The text was updated successfully, but these errors were encountered: