I’ve written an
ipynb notebook in vs code. It resides in a
pwd/scripts/notebook.ipynb folder. Within the notebook I access data in the
This works within vs code.
When I now try to run the notebook using
nbconvert as follows:
jupyter nbconvert --ExecutePreprocessor.timeout=-1 --to notebook --inplace --execute scripts/hierarchical_numpyro.ipynb
I get an error
FileNotFoundError: [Errno 2] No such file or directory: 'data/data.csv'
It looks like the working directory of the notebook execution through
nbconvert is the directory the notebook is in. This is unfortunate.
Is there a way to change the working directory other than requiring me to move the file to the root of the project?
I’d expect the working directory to be the directory I ran the command in, not the directory of the file.