Get help from the marimo community

r
roost
Offline, last seen 4 weeks ago
Joined November 25, 2024
When sharing a presentation or app, it is unclear if the app is still loading, or how much of it is loaded.

This is a problem if you are sharing the app with someone who is unfamiliar with the platform. If it's taking a while, content might appear to simply not exist or be missing.

There's also a bit of a delay upon initial page load of the app and presentation. After the "loading dependencies" spinner, there's a gap between that and the hour glass spinner in the top left.

With presentation mode, it is even more unclear. It only shows slides / circles at the bottom, only for cells that have executed and have content. Someone might flip through all the slides but to realize all of the content is not there.

Ideally, on the app in the presentation, it would show "Still loading all content, please wait to see all components" with a progress bar.
3 comments
M
r
problem: I was attempting to solve this issue and found that cells were automatically converting to different cell types.

Auto conversion from Python --> SQL
  • To mitigate some downstream dependency issues, I first tried converting the SQL cell to python (e.g, "df_result = mo.sql(f""" query """)") , and then would save the file, and then reset the Kernel. Post kernel reset, that cell that I converted to Python was back to being a SQL file.
  • I resolved this auto-conversion by making df_result local (_df_result) and then df_result = _df_result.copy().
  • Even though both were outputting the same DF, the python version seemed to work more extensively for dependencies.
Auto conversion from mo.sql + Python code --> SQL

  • I have data from an mo.sql outputting to a dataframe.
  • This dataframe is then used in am mo.md
  • Everything would be set up correctly - I would restart the kernel and the script would autorun
  • Upon restart/rerun, my cells with mo.sql + Python would convert to SQL. I tried many times to have the .py cell format stick.
  • To resolve this, I had to break out my mo.sql -> dataframe code (also unfortunately having to use the fix above) into a previous cell, and then display that resulting dataframe via an mo.md in the next cell.
Recommendation

Ideally, cells would not auto-convert from Python --> SQL. Some people might be more comfortable using mo.sql explicitly.

Additionally, ideally I could generate a DF with mo.sql in a cell, and also present that DF in mo.md. If this is undesired, then throwing an exception and stating this requirement would be helpful.
6 comments
A
r
Hello!

Problem: Following a kernel reset and full auto run, my SQL cells (not python cells) outputting a dataframe fail to work causing downstream execution issues.


  • Even though my DF output cells were referenced by downstream cells, meaning they should have run in-order, some downstream cells didn't find the dataframe.
  • To resolve this, I had to do an if not None statement before the downstream cells ran.
  • This required that I convert other SQL cells to python cells, which is not ideal
Ideally, I could create DFs with SQL cells and the downstream dependent cells would execute at the right time.
1 comment
A