Skip to content

Conversation

@vincentkoc
Copy link
Member

@vincentkoc vincentkoc commented Nov 1, 2025

Details

  • fix: preserve rich metadata when prefixing panels (OPIK-1896): Replace the capture/replay prefixing in reporting_utils.display_messages with a Rich-aware wrapper so hyperlinks and formatting survive in terminals and notebooks.
  • fix: respect jupyter detection for optimizer console (OPIK-1991): Stop forcing Console(is_jupyter=False) so Colab/Jupyter render real Rich links for optimizer reporting output.

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-1896
  • OPIK-1991

Testing

See example
Screenshot 2025-10-31 at 17 14 00

Documentation

n.a

@vincentkoc vincentkoc requested review from a team and dsblank as code owners November 1, 2025 00:08
Copilot AI review requested due to automatic review settings November 1, 2025 00:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves Rich formatting handling in the Opik optimizer SDK by preserving metadata and formatting when prefixing panels, and enabling proper Jupyter detection for console rendering. The changes ensure hyperlinks and Rich formatting survive in both terminal and notebook environments.

  • Replaces capture/replay prefixing mechanism with a Rich-aware wrapper class
  • Removes forced is_jupyter=False setting to respect Jupyter environment detection
  • Simplifies the console creation logic

Copy link
Contributor

@dsblank dsblank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sdks/python/src/opik/configurator/interactive_helpers.py

contains _in_jupter_environment() that returns True/False

@jverre
Copy link
Collaborator

jverre commented Nov 3, 2025

@vincentkoc I'll test and merge this tonight

Copy link
Collaborator

@jverre jverre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires some changes, I tested in Cursor / VSCode notebooks and it looks off:

Image

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.

4 participants