-
Notifications
You must be signed in to change notification settings - Fork 1k
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
added Marimo support for echo=True #981
base: main
Are you sure you want to change the base?
Conversation
Thanks @peterwilli ! This looks like a nice and straight-forward addition. @riedgar-ms I don't think it's necessary for this PR, but this provides further evidence that we need a "display handler" |
I agree that an abstraction layer (display handler) is the best way forward, and thanks by the way! I could extend this pr into a display handler if needed |
9d5d8e9
to
d7edfaf
Compare
d7edfaf
to
76e7b36
Compare
@peterwilli sorry for taking so long to get back to you! I was on vacation and not keeping super up to date. No need to extend this to a display handler for the sake of this PR imo. (But internally, let's definitely have more discussions around this @riedgar-ms) @Harsha-Nori just want to clear this with you before approving/merging -- I think we tend to think of Jupyter as a pretty "first-class citizen". Not sure how wide we want to get with support for alternatives, but I feel that this change is so light weight that we're still pretty far from any such slippery slope. Thoughts? |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #981 +/- ##
===========================================
+ Coverage 44.74% 61.12% +16.38%
===========================================
Files 62 62
Lines 4392 4404 +12
===========================================
+ Hits 1965 2692 +727
+ Misses 2427 1712 -715 ☔ View full report in Codecov by Sentry. |
Marimo is an alternative to Jupyter Lab, it contains a reactive UI and self-executing cells. I encourage people to check it out: https://marimo.io
However, the output of Guidance in Marimo is very scrambled with HTML, I altered the debug streamer to take Marimo into account, and use Marimo's own format to display the HTML output.
You can see the difference in the old version (left) and after this PR (right)
I also made sure that if someone has Jupyter installed + Marimo, that Jupyter printing will be preferred, this is to make sure that the original behaviour will not change and that current Jupyter users will not have any surprises.
How to test
I created a test Marimo script:
(I have no affiliation with Marimo, just wanted to use it with Guidance!)