Skip to content
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

Feature Request: Support for ANSI Escape Codes in Logs for Better Readability #1899

Open
liblaf opened this issue Jan 17, 2025 · 1 comment
Assignees

Comments

@liblaf
Copy link

liblaf commented Jan 17, 2025

First of all, thank you for providing such a powerful tool for experiment tracking! I truly appreciate the work you've put into Neptune.ai.

Is your feature request related to a problem? Please describe.

Yes, the problem is related to the readability of logs in the Neptune.ai dashboard. Currently, stdout and stderr logs are displayed as StringSeries, but they do not support ANSI escape codes. This makes the logs difficult to read, especially when users (like me) add color to the output for better readability in the terminal. The logs appear cluttered with ANSI escape codes, which are not rendered correctly in the dashboard.

Here is an example of how the logs look like in the dashboard:

Image

Here is how the logs look like in the terminal:

Image

Describe the solution you'd like

I would like Neptune.ai to support ANSI escape codes in the logs so that the logs are displayed with the same color and formatting as they appear in the terminal. This would greatly improve the readability of the logs in the dashboard.

Alternatively, if supporting ANSI escape codes is not feasible, I would appreciate an option to strip all ANSI escape codes from the logs, making them plain text and easier to read.

Describe alternatives you've considered

As an alternative, I have considered manually stripping ANSI escape codes from the logs before sending them to Neptune.ai.

Additional context

The ability to view logs with proper formatting is crucial for debugging and monitoring experiments effectively. Supporting ANSI escape codes or providing an option to strip them would significantly enhance the user experience for those who rely on colored logs for better readability.

Thank you for considering this feature request!

@liblaf
Copy link
Author

liblaf commented Jan 17, 2025

I came across a few libraries that might be helpful for implementing support for ANSI escape codes or stripping them from logs:

  • fancy-ansi: A small JavaScript library for converting ANSI escape codes to HTML. This could be useful for rendering colored logs directly in the Neptune.ai dashboard.
  • strip-ansi: A lightweight library for stripping ANSI escape codes from strings. This could serve as a fallback option for users who prefer plain-text logs without any formatting.
  • blessed.terminal.Terminal.strip_seqs: A Python utility from the blessed library that removes terminal sequences from text. This could be another option for handling ANSI escape codes in Python-based workflows.

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

No branches or pull requests

3 participants