cryoSPARC v.3.1.0 and Topaz

@amorin Could the problem be that is not executable by the unix user that owns the cryoSPARC instance?
ls -l /home/ubuntu/topaz/
and possibly
chmod u+x /home/ubuntu/topaz/
What is the output of /home/ubuntu/topaz/ --version without using the sh command?

No. Its set executable

ubuntu@ip:~/topaz$ ./ --version
TOPAZ 0.2.5a
ubuntu@ip:~/topaz$ /home/ubuntu/.local/bin/topaz --version
TOPAZ 0.2.5a
ubuntu@ip:~/topaz$ ls -l
-rwxrwxr-x 1 ubuntu ubuntu 372 Mar 18 16:10


@amorin Your script resembles the guide example except the missing call to
conda activate <topaz-conda-env>
Could that be the problem?

Topaz is installed from source without conda, so there is no topaz conda environment to activate.
I don’t even have conda installed - except for whatever comes with cryosparc.

Might not the difference in output between the two versions of the script be a clue? And also confirmation that the issue is not about it being executable. One seems to be looking for a python module. Just a guess.


@amorin For use with cryoSPARC, I would suggest installing topaz in its dedicated conda environment and using a wrapper script (recently updated). Miniconda should be sufficient to initially establish the virtual environment.

dear @nfrasser and @wtempel

In attempt to reproduce the following suggestions and get Topaz installed

(Optional) Create a wrapper script

I run the following script -

But then I the terminal dissapeared and I have no clue where to look for

Could you please advice -
a) what went wrong - bash: ​: command not found…
b) was the created and if yes - where to find it?

Thank you in advance.


@Dmitry you must create the file yourself and insert the contents. If you’d like to create the file from the command line, here are the commands that would do that:

cat > << END
#!/usr/bin/env bash
if command -v conda > /dev/null 2>&1; then
    conda deactivate > /dev/null 2>&1 || true  # ignore any errors
    conda deactivate > /dev/null 2>&1 || true  # ignore any errors
unset _CE_CONDA
source $HOME/miniconda3/etc/profile.d/
conda activate topaz
exec topaz $@
chmod +x
1 Like

Dear colleagues,

We installed topaz and currently running the Topaz training.

In the progress log window I see the following –

UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /tmp/pip-req-build-vflcj7wg/torch/csrc/utils/tensor_numpy.cpp:180.)

Since it is already running quite a long time - for about 7 hours without further update I suppose there is an issue.

Could you please advice how to fix that?

Thank you in advance.


A similar UserWarning was discussed under NumPy array Warning · Issue #68 · tbepler/topaz · GitHub.

You may want to

  • confirm in the Event Log that Topaz has recognized your GPU device and is not “Falling back to CPU” (as it does in TOPAZ not using GPU)
  • confirm the GPU worker has not running out of free RAM or CPU resources
  • possibly reduce the Number of parallel processes and Number of CPUs values from their defaults (as discussed in Topaz Preprocessing very slow - #2 by ccgauvin94)
1 Like