Skip to content
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

improvement: add support for running in a marimo notebook #892

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

akshayka
Copy link
Contributor

This makes runhouse work in marimo notebooks, in addition to Jupyter notebooks.

This makes runhouse work in marimo notebooks, in addition to Jupyter
notebooks.
@dongreenberg
Copy link
Contributor

Love it! Thanks for the PR. One question - IIRC Marimo notebooks are .py files, so wouldn't they be importable natively on the server (and not require a short-circuit to write out the user's Module into a separate file)?

@akshayka
Copy link
Contributor Author

akshayka commented Jun 14, 2024

Love it! Thanks for the PR. One question - IIRC Marimo notebooks are .py files, so wouldn't they be importable natively on the server (and not require a short-circuit to write out the user's Module into a separate file)?

They are Python files. But the function definitions are in their own lexical scopes (notebook files are lazy), so the server won't be able to find them — unless it knew it was looking at a marimo notebook, and knew how to extract the function. We'll have an API for that in the future but don't have it yet.

Maybe in the future we could have a way of defining top-level functions. But for now I think something like this PR is needed to get it to work.

@dongreenberg dongreenberg merged commit e95e4f9 into run-house:main Jun 18, 2024
1 check passed
@dongreenberg
Copy link
Contributor

Ok! That makes sense, and appreciate the contribution to make Runhouse work with Marimo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants