Error in Extracting from Micrographs after Topaz Extract

Hello,
I am testing Topaz following the T20s Tutorial. Everything works well until I try to extract the particles from the micrographs (job: Extract from Micrographs having as input the Topaz Exatract output). I get the following error message:

File "cryosparc_worker/cryosparc_compute/run.py", line 84, in cryosparc_compute.run.main
  File "/opt/corecryosparc/cryosparc2_worker/cryosparc_compute/jobs/extract/run.py", line 41, in run_extract_micrographs_multi
    run_extract_micrographs(job)
  File "/opt/corecryosparc/cryosparc2_worker/cryosparc_compute/jobs/extract/run.py", line 540, in run_extract_micrographs
    if 'ctf/type' in list(micrograph.keys()):
AttributeError: 'Dataitem' object has no attribute 'keys'

I assume that the issue happened during the Topaz extract job (which is signed as complete, without any error mesage), the output is below:
I had the same issue with cryosparc 3.0 and 3.1 For the topaz executable, I pointed to the Topaz installation within sbgrid.

any help is appreciated

Starting extraction by running command /programs/x/topaz/0.2.3/bin/topaz extract --radius 7 --threshold -6 --up-scale 16 --assignment-radius -1 --min-radius 5 --max-radius 100 --step-radius 5 --num-workers 8 --device 1 --model /mnt/linfs/data/zmbstaff/T20S/P15/J12/models/model_epoch10.sav -o /mnt/linfs/data/zmbstaff/T20S/P15/J14/topaz_particles_prediction.txt [MICROGRAPH PATHS EXCLUDED FOR LEGIBILITY]

[CPU: 203.8 MB]  THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1544176307774/work/aten/src/THC/THCGeneral.cpp line=405 error=11 : invalid argument

[CPU: 203.8 MB]  Extraction command complete.

[CPU: 203.8 MB]  Starting particle pick thresholding by running command /programs/x/topaz/0.2.3/bin/topaz convert -t 0 -o /mnt/linfs/data/zmbstaff/T20S/P15/J14/topaz_particles_prediction_thresholded.txt /mnt/linfs/data/zmbstaff/T20S/P15/J14/topaz_particles_prediction.txt

[CPU: 203.8 MB]  Particle pick thresholding command complete.

[CPU: 881.0 MB]  Extraction done in 15.950s.

[CPU: 881.0 MB]  --------------------------------------------------------------

[CPU: 881.0 MB]  Finished Topaz process in 16.23s

[CPU: 213.3 MB]  --------------------------------------------------------------

[CPU: 213.3 MB]  Compiling job outputs...

[CPU: 213.3 MB]  Passing through outputs for output group micrographs from input group micrographs

[CPU: 213.3 MB]  This job outputted results ['micrograph_blob']

[CPU: 213.3 MB]    Loaded output dset with 20 items

[CPU: 213.3 MB]  Passthrough results ['ctf', 'mscope_params', 'background_blob', 'ctf_stats', 'micrograph_blob_non_dw', 'micrograph_thumbnail_blob_1x', 'micrograph_thumbnail_blob_2x', 'rigid_motion', 'spline_motion', 'movie_blob', 'gain_ref_blob']

[CPU: 213.3 MB]    Loaded passthrough dset with 20 items

[CPU: 213.5 MB]    Intersection of output and passthrough has 20 items

[CPU: 213.5 MB]  Checking outputs for output group micrographs

[CPU: 213.5 MB]  Updating job size...

[CPU: 213.5 MB]  Exporting job and creating csg files...

[CPU: 213.5 MB]  ***************************************************************
[CPU: 213.5 MB]  Job complete. Total time 35.32s

Hi,
I have similar error after Topaz but just when try to extract with ‘Extract From Micrographs (CPU)’

error:
Traceback (most recent call last):
File “cryosparc_worker/cryosparc_compute/run.py”, line 84, in cryosparc_compute.run.main
File “/data2/software/cryosparc/cryosparc2_worker/cryosparc_compute/jobs/extract/run.py”, line 167, in run_extract_micrographs_cpu_parallel
for field in micrograph:
File “/data2/software/cryosparc/cryosparc2_worker/cryosparc_compute/dataset.py”, line 656, in getitem
return self.dataset.data[key][self.idx]
KeyError: 0

when using the same Topaz output to ‘Extract From Micrographs’ with GPU is is work OK.

Hi @ssorrentino and @Elad,

Are you running the latest version + patch of cryoSPARC? There was a bug in CPU extract that was along the lines of what you’re experiencing, though it has been fixed as of the latest release. If you’re running an older version, please update and let us know if you continue to experience this issue.

–Harris

Hi Harris,

I’m running v.3.2.0 and just run patch update (now v. Patch v3.2.0+210511 applied!) and still have the error just in cpu job:

[CPU: 732.8 MB] Traceback (most recent call last):
File “cryosparc_worker/cryosparc_compute/run.py”, line 84, in cryosparc_compute.run.main
File “/data2/software/cryosparc/cryosparc2_worker/cryosparc_compute/jobs/extract/run.py”, line 167, in run_extract_micrographs_cpu_parallel
for field in micrograph:
File “/data2/software/cryosparc/cryosparc2_worker/cryosparc_compute/dataset.py”, line 656, in getitem
return self.dataset.data[key][self.idx]
KeyError: 0

Hi Elad,

Upon looking into this further, we’ve discovered that there is indeed a bug here. We will fix it in a future release (most likely very soon).

Harris

1 Like

Patch v3.2.0+210601 released yesterday resolves this issue: Patch 210601 is available for cryoSPARC v3.2.0