Closed jkalleberg closed 1 year ago
I think I figured it out and wanted to share it with anyone else dealing with this in the future. My conda env was fine, the demo files downloaded with curl
were not. I re-downloaded them using wget
via
CUE_DIR="https://storage.googleapis.com/cue-demo"
declare -a FILES=("inputs/chr21.small.bam" "inputs/chr21.small.bam.bai" "inputs/GRCh38.fa.fai" "ground_truth/svs.chr21.small.sorted.vcf.gz" "ground_truth/svs.chr21.small.sorted.vcf.gz.tbi" "models/cue.pt")
for f in ${FILES[@]}; do
if [ ! -f ./data/demo/${f} ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') INFO: downloading a file now... | '${CUE_DIR}/${f}'"
AWS_FILE_NAME="${CUE_DIR}/${f}"
PREFIX=$(echo ${f} | cut -d "/" -f 1)
echo "./data/demo/${PREFIX}"
wget --directory-prefix="./data/demo/${PREFIX}" ${AWS_FILE_NAME}
else
echo "$(date '+%Y-%m-%d %H:%M:%S') INFO: file found | './data/demo/${f}'"
fi
done
This got me past the Unpickeling.Error
but then I ran into another error below:
Traceback (most recent call last):
File "../cue/engine/call.py", line 107, in <module>
joblib.delayed(call)(config.devices[i], chr_name_chunks[i], scan_id) for i in range(n_procs))
File "/storage/hpc/group/UMAG_test/WORKING/jakth2/SVS_230718/miniconda_envs/dev/lib/python3.7/site-packages/joblib/parallel.py", line 1855, in __call__
return output if self.return_generator else list(output)
File "/storage/hpc/group/UMAG_test/WORKING/jakth2/SVS_230718/miniconda_envs/dev/lib/python3.7/site-packages/joblib/parallel.py", line 1784, in _get_sequential_output
res = func(*args, **kwargs)
File "../cue/engine/call.py", line 90, in call
collect_data_metrics=True, given_ground_truth=given_ground_truth)
File "/storage/hpc/group/UMAG_test/WORKING/jakth2/cue/engine/core.py", line 98, in evaluate
targets2=targets)
File "/storage/hpc/group/UMAG_test/WORKING/jakth2/cue/img/plotting.py", line 202, in plot_images
image = annotate(image, targets[indices[i]], classes, display_boxes=True, color=(0, 76 / 255, 153 / 255))
File "/storage/hpc/group/UMAG_test/WORKING/jakth2/cue/img/plotting.py", line 161, in annotate
cv2.circle(image, (p[0], p[1]), int(image_dim/100), color=color, thickness=-thickness)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'circle'
> Overload resolution failed:
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
To fix this I changed both instances of v2.circle(image, (p[0], p[1])
in plotting.py
to cv2.circle(image, (int(p[0]), int(p[1]))
.
Finally, I used the bug fix in Issue #21 to get the tutorial to run.
Hello,
I'm sorry in advance for the wall of text; however, I've repeatedly tried to build the environment without success and wanted to be thorough for reproducibility. I would greatly appreciate any help!
To avoid using long local paths, use these paths as examples: I pulled the git repo to
/root/path/cue
and ran the tutorial atWORKING_DIR=/root/path/project_dirname
.I am getting the following error while trying to run the tutorial:
Output (edited to have
${WORKING_DIR}
instead of the long absolute path):Tutorial Bash Script
I initially assumed my package/dependency versions were introducing a syntax error. However, being explicit using version numbers from the
requirements.txt
was unsuccessful. Instead, I built the conda env repeatedly, landing on success by specifying Python3.7 and torch v0.6 using the following bash script, but I still get the error:My conda environment includes the following:
I also attempted to install packages using pip within a fresh conda env using the following:
But got the following error: