Ilya I. Lubenets
Mmarimo
•Created by Ilya I. Lubenets on 10/1/2024 in #help-support
how to disable “defined by another cell” error?
While experimenting and testing models - I usually reuse some variables from cell to cell. For example, when training models - I can set device variable to cuda for better coding experience.
device = torch.device("cuda”)
And when I want to use this model later in the same notebook and leave GPU for another processes, I’ll do:
device = torch.device(“cpu”)
But marimo forbids this type of operations!
Same applies to situations with sklearn models, where I train models in cells reusing “model” variable.
model = TypeOfModel()
model.fit()
Of course, it’s not clear or any close to production looking code, but this is what I want from notebooks - fast and simple “proof of concept” code.
P.s. forgive me for code blocks here, mobile discord sucks
22 replies
Mmarimo
•Created by Ilya I. Lubenets on 9/22/2024 in #help-support
How do I share marimo notebooks as files properly?
So, my situation is simple:
1. I've created a
rye
project and added some dependencies
2. I've created a some_notebook.marimo.py
with using some of those dependencies I've installed
3. Now I want to share only a notebook, without all those rye
complications
4. The person who will download and open my marimo nb should be able to easily install those dependencies
The only reason why default marimo install helper is not working for me - because of some of the projects I use is available only from git+https://my-private-gitlab.com/...
or self-hosted pypi alternatives (so there is a custom pypi index-url
)
With jupyter I can use %pip install
inside nb and that solves my problem, but how to do it inside marimo nb without creating a project or installing deps outside of marimo?15 replies