Get help from the marimo community

Updated 6 months ago

Output too large

At a glance

The community members are discussing an issue with displaying a Marimo table based on multiple filters, such as date range. They are trying to set the environment variable MARIMO_OUTPUT_MAX_BYTES to increase the maximum acceptable output size, as their output size is sometimes over 13 MB. However, they are still encountering issues even after setting the variable to 15 MB. The community members provide code snippets to demonstrate how they are setting the environment variable, and one community member suggests learning more about how environment variables work, providing a link to a guide on setting environment variables in Linux.

Useful resources
Following up from #general. @Sonali can you share more information? What are you outputting and how did you set the environment variable?
S
A
19 comments
we are tring to display marimo table based on multiple filters e.g. date range etc.
@Akshay Hi What is the maximum acceptable output size?
Sometimes my output size is 13309715 bytes
up to what extent we can increase
table = mo.ui.table(
{
"Request Id": df_next["request_id"].tolist(),
"Request Type": df_next["request_type"].tolist(),
"Request": df_next["requests"].tolist(),
"Response":df_next["responses"].tolist(),
"Feedback": df_next["feedbacks"].tolist(),
"Comment":df_next["comments"].tolist(),
"Faithfulness": df_next["faithfulness"].tolist(),
"Answer Relevancy": df_next["answer_relevancy"].tolist(),
"Groundtruth Answer": list(groundtruth_texts),
"LLM model": df_next["llm_model"].tolist(),
"Contexts": df_next["contexts"].tolist(),
},
pagination=True, page_size=10)
Below is the code to set the env patameter : MARIMO_OUTPUT_MAX_BYTES= boto_client.get_parameter(Name=os.getenv('MARIMO_OUTPUT_MAX_BYTES'), WithDecryption=True)['Parameter']['Value']
and it is now 15000000
but still getting same error for 7mb size too .
Is the parameter is not set properly
The parameter has to be set before starting marimo. It is an evironment variable, which is not a Python variable.

For example, MARIMO_OUTPUT_MAX_BYTES=15000000 marimo edit my_notebook.py; or export MARIMO_OUTPUT_MAX_BYTES=15000000; marimo edit my_notebook.py
I am running multiple marimo notebooks using below code "# marimo_app.py
import marimo
#from starlette.applications import Starlette
import uvicorn

Create your Marimo ASGI app

server = marimo.create_asgi_app()

for dashboard in app_config.DASHBOARD_MENU:
for name, path in dashboard.items():
server = server.with_app(path=dashboard['path'], root=dashboard["root"])

Create a Starlette app and mount the Marimo ASGI app

app = server.build()

if name == "main":
uvicorn.run(app, host="localhost", port=2718)
"
I run it using poetry run python ./eval/marimo_app.py
when I set MARIMO_OUTPUT_MAX_BYTES=1500000 while executing I am getting "'MARIMO_OUTPUT_MAX_BYTES' is not recognized as an internal or external command,
operable program or batch file."
I think it would be worthwhile to spend some time learning how environment variables work. If you are on linux, I might suggest this guide. https://www.freecodecamp.org/news/how-to-set-an-environment-variable-in-linux/
It worked properly! Thanks for the help
Add a reply
Sign up and join the conversation on Discord