Topaz Train AssertionError

Hello,

I’m trying to run topaz that continually bugs out with an AssertionError that is similar to the post: “Topaz Train FileNotFound Error v5.0.1” with the exception of the fact that I am running a standalone topaz install (0.2.4) and cryosparc (4.7.1) and that this particular error seems to be referencing an inability to read the input .mrc headers. Strangely enough, Topaz runs without errors on micrographs denoised with “Micrograph Denoiser (BETA)” albeit, particle picks after training are very poor.

I’m starting to think that the topaz error might be due to a mismatch between the CryoSPARC and topaz versions (but I am not sure). What do you think?

Moreover, is there a way to update Topaz without installing a new version? If I have to create a fresh install of topaz would it be better/safer to put it into a new conda environment instead of overwriting the current version?

Lastly, I’ve noticed that Deep Picker is obsolete for CryoSPARC v5.0+. Is there a reason for that? In my experience, running the Deep Picker jobs freeze the Linux GUI.

Thanks in advance for your help,

Gregor

Topaz error below:

Traceback (most recent call last): File “cryosparc_master/cryosparc_compute/run.py”, line 129, in cryosparc_master.cryosparc_compute.run.main File “/home/cryosparcuser/Desktop/Cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/run_topaz.py”, line 332, in run_topaz_wrapper_train utils.run_process(split_command) File “/home/cryosparcuser/Desktop/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 (/home/cryosparcuser/anaconda3/envs/topaz/bin/topaz train_test_split --number 4 --seed 634579178 --image-dir /media/cryosparcuser/pathtoimages/…)

Looking at the log files I see:

CPU: 260.3 MB Avail: 242.87 GB

File “/home/cryosparcuser/anaconda3/envs/topaz/lib/python3.6/site-packages/topaz/mrc.py”, line 134, in parse

CPU: 260.3 MB Avail: 242.87 GB

Traceback (most recent call last):

CPU: 260.3 MB Avail: 242.87 GB

topaz preprocess: error: the following arguments are required: files

CPU: 260.3 MB Avail: 242.95 GB

multiprocessing.pool.RemoteTraceback:

CPU: 260.3 MB Avail: 242.95 GB

File “/home/cryosparcuser/anaconda3/envs/topaz/lib/python3.6/multiprocessing/pool.py”, line 119, in worker

CPU: 260.3 MB Avail: 242.94 GB

raise Exception(‘Unknown dtype mode:’ + str(header.model))

CPU: 260.3 MB Avail: 242.92 GB

“”"

CPU: 260.3 MB Avail: 242.92 GB

result = (True, func(*args, **kwds))

CPU: 260.3 MB Avail: 242.91 GB

AttributeError: ‘MRCHeader’ object has no attribute ‘model’

CPU: 260.3 MB Avail: 242.89 GB

Traceback (most recent call last):

CPU: 260.3 MB Avail: 242.88 GB

File “/home/cryosparcuser/anaconda3/envs/topaz/lib/python3.6/site-packages/topaz/commands/normalize.py”, line 61, in _call_

If your computer has a working installation of the nvidia driver (to ensure installation of the GPU-accelerated dependencies), you can try these commands

/home/cryosparcuser/anaconda3/condabin/conda create -n topaz-0.2.5-20260821 python=3.6 topaz=0.2.5 mkl=2024.0.0 --override-channels -c tbepler -c pytorch -c conda-forge
/home/cryosparcuser/anaconda3/envs/topaz-0.2.5-20260821/bin/topaz --version

for the installation of topaz-0.2.5 (the latest version supported in CryoSPARC v4.7.1) in a new environment and (very superficial) test of installation success.
Running a clone of the failed topaz job where you specify

/home/cryosparcuser/anaconda3/envs/topaz-0.2.5-20260821/bin/topaz

for the Path to Topaz executable should quickly tell us whether the earlier job’s failure was

Hi Wolfram,

Thank you for providing me with this information. I tried running the commands above in addition to installing Topaz in a new, separate, conda environment ( Topaz (Bepler, et al) | CryoSPARC Guide ). For both the updated install, and new standalone Topaz install conda seems to be hanging at “solving environment” for a couple hours.

Any thoughts on why this might be the case?

Terminal output below:

/home/cryosparcuser/anaconda3/condabin/conda create -n topaz-0.2.5-20260821 python=3.6 topaz=0.2.5 mkl=2024.0.0 --override-channels -c tbepler -c pytorch -c conda-forge
Collecting package metadata (current_repodata.json): - WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1., but conda is ignoring the . and treating it as 1.7.1
done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): / WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0., but conda is ignoring the . and treating it as 1.9.0
WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0., but conda is ignoring the . and treating it as 1.8.0
WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.6.0., but conda is ignoring the . and treating it as 1.6.0

done

Solving environment: /

What is the output of the command

/home/cryosparcuser/anaconda3/condabin/conda --version

?

The output is: conda 23.3.1