How to make cell for code generation?
The clip in https://docs.marimo.io/guides/editor_features/ai_completion.html#generate-code-with-our-ai-assistant shows cell enabled for code generation, but I don't see how to make cell for this generative mode, I mean where's the option to be turned on to allow cell for this? Marimo config:
.$ marimo config show ... [ai.open_ai] model = "qwen2.5-coder:1.5b"...
.$ marimo config show ... [ai.open_ai] model = "qwen2.5-coder:1.5b"...
Solution:
sorry, i missed this part of docs https://docs.marimo.io/guides/editor_features/ai_completion.html#generate-code-with-our-ai-assistant CTRL+SHIFT+e , thanks!
How to inject custom css into wasm notebook?
I have tried and failed in every way. I created the custom.css file in the notebook's folder, but even if I copy the example from the Theming part of documentation, it does not change anything. What am I doing wrong?
differences between mo.ui.dictionary and python dict?
I find it unclear from the documentation, why I should use a marimo dictionary, and not just a python dict to hold UI elements. What is the fundamental difference, and when should you use one, and not the other, and vice verse?
Solution:
The main reason to use
mo.ui.dictionary
is for reactive execution — when you interact with an element in a mo.ui.dictionary
, all cells that reference the mo.ui.dictionary
run automatically, just like all other ui elements. When you use a regular dictionary, you don’t get this reactivity. This is the main reason to use mo.ui.dictionary
.dataframe transformer datetime filter no time range?
Would be useful if time range is provided as part of datetime column filter
Solution:
running async inside sync cells
I have a long chained function call, which needs to call some async function to fetch data from a database. I was thinking I could use asyncio to get the running loop, and then run the function inside that loop using "run_until_complete", but I just get an runtimeerror "this event loop is already running". How can I handle this without having to rewrite all my functions to async instead?
Shift enter not working from time to time
Hi team, from time to time shift enter (run and new below) is not working. Not sure what is causing this and how to solve it. On the other hand, ctrl enter works all the time.
Import from a different project
Is it possible to import stuff from one project to another on the marimo.io dashboard?
Hide code in a notebook in a Collection
I have a collection of notebooks in the marimo.io/dashboard/... and I would like to either hide the code by default or exclude it. So I would like a ntb to open as marimo.io/p/@kejtos/slug?include-code=False (or ?show-code=False) when someone opens it at marimo.io/c/@kejtos/collection_name. I have tried various things in the settings, but I have not been able to figure it out. Thanks.
Label widget placement
Hello everyone, is there a way to have the widget label above the widget instead of on the left? When putting
in a custom css, it doesn't work. Thanks...
.flex-row {
flex-direction: column;
}
.flex-row {
flex-direction: column;
}
highlighted elements in markdown
This is moreso for my understanding of the syntax, but the elements for the unordered list lost their color scheme after I closed the first sub-list
Keep ui table state of selected rows
Is there any way to keep the state of selected rows of ui table which is part of the items in accordion (or tabs)? The table always get re-rendered on switching between items, thereby losing the state of selected rows of the table
pyodide installation through uvx sandboxing fails
Was "sanboxifying" a notebook with uv (for inline dependency scripts); the notebook just had pyodide as it's main requirement (this is the Post Approval Study Recommender notebook shared by Mustjaab; on clicking the install button (with the popup on the top left), it seemed to fail.
This is whta I got in the terminal:
"ValueError: Pyodide is a Python distribution that runs in the browser or Node.js. It cannot be installed from PyPi.
See https://github.com/pyodide/pyodide for how to use Pyodide."...
Altair performance questions
Hi team, thanks for your work on this package. Apologies for the dumb question, I have been using large datasets and used altair for dynamic plotting with slider filters.
Using on jupyter:
alt.data_transformers.enable("vegafusion")
alt.renderers.enable("jupyter", offline=True), this is very fast (less than 1 sec for the update).
I tried to achieve the same filtering using marimo sliders directly on my polars dataframe and then plotting, this works but it is slower as obviously polars needs to do the filtering and run 2 cells (2-5 seconds)....
Sorting tables elements that are not fully strings, floats or ints
Hi. I'm looking to sort tables that contain values which are numeric, but to help the user, I want to add a colorbar in the cell. Because I do that the elements can no longer be sorted. Is there a workaround to allow the cells to be sorted still? I would rather that, than placing colorbar in a separate column. This goes for any type of composite type of cell really. It would be great if you could still sort (given some condition that is sortable).
Solution:
Not currently. I would suggest another column.
You could try:
1. Custom
format_mapping
. Keep the value the same, but add the color in the format function:
```python...marimo restart API
Is there a way to programmatically restart marimo session?
I have an iterative control flow logic using a SparkContext. In order to release cluster resources I figured that periodically restarting the kernel works. Currently i do this manually by page reload and clicking the “reload” UI button. I am looking for official marimo api/sdk way to restart the kernel....
Kernel keeps crashing / change cell to code shortcut
Hi, I'm new here. When inside the tutorial notebooks (didn't try my own notebook yet), Marimo kernel keeps crashing.
"ConnectionResetError: [WinError 10054] an existing connection was forcibly closed by the remote host" a few times and then SystemExit. I'm running on windows 10, with python 3.9.13 in a poetry env. I cannot paste much as this is happening on my work computer. Thank you for your help!...
redirect_stdout and print statements from threads
Hello, thanks for your fantastic work.
I would like, in run mode, to show logs from a multithreaded library that emits logs from different threads, but can't manage to make it work with redirect_stdout.
As the library is handling long running tasks, it is useful for the user to have a dynamic display of the progress.
I have attached a small file to reproduce....
Been trying to message in mo.ui.chat
I'm unable to enter any text/type in the mo.ui.chat chatbox area; I can however add default prompts and after they appear in the chatbox text area, I'm able to edit the text. I'm on:
...
>>> marimo --version
>>> 0.9.7
>>> marimo --version
>>> 0.9.7