"ValueError: cannot reshape array of size" "Assertion Error"

Dear All,

I am getting an error during during a Topaz Extraction job.

I have an “Assertion Error” and also
"ValueError: cannot reshape array of size 254720 into shape (1,1023,1440)

I post the complete log.
Many thanks for helping me out.

GIA

Starting extraction by running command /usr/local/bin/topaz extract --radius 7 --threshold -6 --up-scale 4 --assignment-radius -1 --min-radius 5 --max-radius 100 --step-radius 5 --num-workers 16 --device 0 --model /data/cryoEM/XXX/C1924_GIA_xxx_041124/cryosparc/CS-gia-xxx-c1924/J342/models/model_epoch15.sav -o /data/cryoEM/xxx/C1924_GIA_xxx_041124/cryosparc/CS-gia-xxx-c1924/J344/topaz_particles_prediction.txt [6897 MICROGRAPH PATHS EXCLUDED FOR LEGIBILITY]

[CPU: 289.2 MB Avail: 373.23 GB]
Traceback (most recent call last):

[CPU: 289.2 MB Avail: 373.23 GB]
File “/usr/local/bin/topaz”, line 11, in

[CPU: 289.2 MB Avail: 373.23 GB]
sys.exit(main())

[CPU: 289.2 MB Avail: 373.23 GB]
File “/usr/local/lib/python3.6/dist-packages/topaz/main.py”, line 148, in main

[CPU: 289.2 MB Avail: 373.23 GB]
args.func(args)

[CPU: 289.2 MB Avail: 373.23 GB]
File “/usr/local/lib/python3.6/dist-packages/topaz/commands/extract.py”, line 288, in main

[CPU: 289.2 MB Avail: 373.23 GB]
for path,score,coords in nms_iterator(stream, radius, threshold, pool=pool):

[CPU: 289.2 MB Avail: 373.23 GB]
File “/usr/local/lib/python3.6/dist-packages/topaz/commands/extract.py”, line 79, in nms_iterator

[CPU: 289.2 MB Avail: 373.23 GB]
for name,score,coords in pool.imap_unordered(process, scores):

[CPU: 289.2 MB Avail: 373.23 GB]
File “/usr/lib/python3.6/multiprocessing/pool.py”, line 735, in next

[CPU: 289.2 MB Avail: 373.23 GB]
raise value

[CPU: 289.2 MB Avail: 373.23 GB]
ValueError: cannot reshape array of size 254720 into shape (1,1023,1440)

[CPU: 289.2 MB Avail: 376.98 GB]
Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 95, in cryosparc_master.cryosparc_compute.run.main
File “/data/software/cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/run_topaz.py”, line 1128, in run_topaz_wrapper_extract
utils.run_process(extract_command)
File “/data/software/cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/topaz_utils.py”, line 99, in run_process
assert process.returncode == 0, f"Subprocess exited with status {process.returncode} ({str_command})"
AssertionError: Subprocess exited with status 1 (/usr/local/bin/topaz extract --radius 7 --threshold -6 --up-scale 4 --assignment-radius -1 --min-radius 5 --max-radius 100 --step-radius 5 --num-workers 16 --device 0 --model /data/cryoEM/xxx/C1924_GIA_xxx_041124/cryosparc/CS-gia-xxx-c1924/J342/models/m…)

50m 15s

default

1

NVIDIA RTX A5000
3

Please retry a new Topaz Extract job after

  1. creating an empty preprocessing directory, like
    mkdir /data/cryoEM/XXX/C1924_GIA_xxx_041124/cryosparc/CS-gia-xxx-c1924/preprocessed-20250206
    
  2. specifying the directory just created in the new Topaz Extract job’s Absolute path of directory containing preprocessed directory parameter field. Be sure to append a slash character / at the end of the path, like
    /data/cryoEM/XXX/C1924_GIA_xxx_041124/cryosparc/CS-gia-xxx-c1924/preprocessed-20250206/
    

Does this help?

Hi,

ended by reinstalling topaz using these commands:

conda create -n topaz python=3.6
conda activate topaz
conda install topaz=0.2.5 fsspec pytorch-cuda=11.8 -c tbepler -c pytorch -c nvidia

Now at least it does not give the error!
Will test it and see if it’s working as it should.

Thanks,

GIA

1 Like