Unable to find hydra config
Hi there, i'm a current Jupyter user and am trying out Marimo for the first time.
I have used the converter command to convert my Jupyter notebook to Marimo.
Currently, i'm facing an issue where i cannot load my hydra config in the Marimo notebook.
I have ran
marimo edit --headless --host 0.0.0.0 --port 8883
in my root dir (/~/project), which is where marimo_notebook.py resides.
project
|- config
|- hydra
|- config.yaml
|- marimo_notebook.py
However, when i run the following to initialize my hydra config:
I get the error below:
Why is the root dir: /tmp/marimo_5081/
instead of project
?6 Replies
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by Akshay. View answer.
Question regards to hydra's fix has been answered here
https://discord.com/channels/1059888774789730424/1228123354607648788/1323700608737218650
Pass an absolute path to the config param? mo.notebook_dir() + “config/hydra” for example
Thanks! Passing the absolute path did work for me.
However im just curious, how does marimo treats relative paths?
I was also trying to import local modules via the following way below and it did not register:
1. Started Marimo in directory (i.e. /~/project)
2. Created my notebook in a subfolder of directory (i.e. /~/project/notebook)
3. Has local modules in other subfolders of directory (i.e. /~/project/source_codes/data_generator)
4. Tries to import the local modules into Marimo via this way in the cell (currently this is how i do it in jupyter):
Got error:
ModuleNotFoundError
The working directory is the directory where marimo is started — this is what python does. We recommend using mo.notebook_dir() to construct paths relative to where the notebook file is
Thanks! Will try it out!