Error when running CS BART example
See original GitHub issueI have been trying to run the cs example, but I keep getting the following error. I have looked upon BART’s documentation and GitHub page, but I couldn’t find much information about it. I am running this from inside a docker.
I am running in a docker with:
- BART 0.7.0
- Python 3.8
- Ubuntu 18.04
- No GPUs
my command:
python3.8 ./fastMRI/fastmri_examples/cs/run_bart.py \
--challenge "singlecoil" \
--data_path "data/FastMRI/knee/" \
--out_path "pred-recons" \
--reg_wt 0.01 \
--mask_type "random" \
--split val
If I try the advised steps
Once BART is installed, set the TOOLBOX_PATH environment variable and point PYTHONPATH to the python wrapper for BART:
export TOOLBOX_PATH=$(which bart) # here I have tried a bunch of different options like /usr/local/bin, /usr/local/bin/bart, etc
export PYTHONPATH=${TOOLBOX_PATH}/python:${PYTHONPATH}
BART still can’t be found via python even though I can call it from shell and I get:
Traceback (most recent call last):
File "run_bart.py", line 15, in <module>
import bart
ModuleNotFoundError: No module named 'bart'
My fix
I did manage to run the experiment by hardcoding the repository with sys.path.append
inside run_bart.py
import sys
sys.path.append("./bart/python")
What did I miss? I can probably fix this myself, but I am not aware of what exactly I missed.
EDIT: I forgot to mention that the correct argument for the script is out_path
and not output_path
as cited in the CS example README
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
I didn’t see any issues in PR #135 so I went ahead and merged it. If you find an issue feel free to open a new PR.
Yeah feel free to change both of them! I’ll comment over there when I get a chance to look.