sherodbuilds
sherodbuilds
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
btw just created an issue if thats okay it seems like a fair ask whether prioritized soon or not
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
is there a way to manage the state via redis or something?
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
its an internally managed and built tool
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
yeah our kaas doesn't support it and requires us to be stateless....
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
so multiple containers w/ no control over it
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
i'm deploying in my companies which is using kubernetes
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
where would you start
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
i see
17 replies
Mmarimo
Created by sherodbuilds on 7/12/2024 in #help-support
Invalid Session for create_asgi_app deployed across 4 different machines
import argparse
import logging
from typing import Any

import marimo
from fastapi import FastAPI
import uvicorn



LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]

def parse_args(args: list[str] | None = None) -> dict[str, Any]:
parser = argparse.ArgumentParser()
parser.add_argument("--log-file", "-l")
parser.add_argument("--host", default="0.0.0.0")
parser.add_argument("--log-level", default="INFO", choices=LOG_LEVELS)
parser.add_argument("--dir", default="./notebooks")
parsed_args, unknown = parser.parse_known_args(args=args)
logging.info(f'unknown args - {unknown}')
return vars(parsed_args)



def start_server(host: str, dir: str) -> None:

server = (
marimo.create_asgi_app()
.with_app(path="", root=f'{dir}/workflow-metrics.py')
)

# Create a FastAPI app
app = FastAPI(host=host)
app.mount("/", server.build())

uvicorn.run(app, host=host, port=8080)


def main() -> None:
args = parse_args()
start_server(args.pop("host"), args.pop("dir"))


if __name__ == "__main__":
main()
import argparse
import logging
from typing import Any

import marimo
from fastapi import FastAPI
import uvicorn



LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]

def parse_args(args: list[str] | None = None) -> dict[str, Any]:
parser = argparse.ArgumentParser()
parser.add_argument("--log-file", "-l")
parser.add_argument("--host", default="0.0.0.0")
parser.add_argument("--log-level", default="INFO", choices=LOG_LEVELS)
parser.add_argument("--dir", default="./notebooks")
parsed_args, unknown = parser.parse_known_args(args=args)
logging.info(f'unknown args - {unknown}')
return vars(parsed_args)



def start_server(host: str, dir: str) -> None:

server = (
marimo.create_asgi_app()
.with_app(path="", root=f'{dir}/workflow-metrics.py')
)

# Create a FastAPI app
app = FastAPI(host=host)
app.mount("/", server.build())

uvicorn.run(app, host=host, port=8080)


def main() -> None:
args = parse_args()
start_server(args.pop("host"), args.pop("dir"))


if __name__ == "__main__":
main()
17 replies
Mmarimo
Created by sherodbuilds on 6/21/2024 in #archived-help-and-support
Marimo export to jupyter notebook
it actually does run to some extent it would be nice if you supported a basic output
7 replies
Mmarimo
Created by sherodbuilds on 6/21/2024 in #archived-help-and-support
Marimo export to jupyter notebook
i agree with the premise of not fully supporting output but why support exporting as a feature if it can't run maybe it shouldn't be a bug but more of a feature to allow more people to migrate off of it. i agree you shouldn't couple it to jupyter but it would be trivial enough to support writing the output or ipython display
7 replies
Mmarimo
Created by sherodbuilds on 6/21/2024 in #archived-help-and-support
Marimo export to jupyter notebook
hi have been experimenting w/ marimo and running into a couple issues w/ ^ https://github.com/marimo-team/marimo/issues/1669
7 replies