Quantile attribute error when using Topaz

Hi,

We tried to run the topaz (train) job from CryoSparc and get this following error message:

Traceback (most recent call last):
  File "cryosparc2_worker/cryosparc2_compute/run.py", line 78, in cryosparc2_compute.run.main
  File "cryosparc2_compute/jobs/topaz/run_topaz.py", line 298, in run_topaz_wrapper_train
    assert len(glob.glob(os.path.join(model_dir, '*'))) > 0, "Training failed, no models were created."
AssertionError: Training failed, no models were created.

If we look at the log file, further up, there is also this error message:

Starting preprocessing...
Starting micrograph preprocessing by running command /gpfs/share/apps/python/gpu/3.6.5/bin/topaz preprocess --scale 4 --niters 200 --num-workers 0 -o /gpfs/data/bhabhaekiertlabs/local_software/CryoSparc/users/coudrn01/P2/J559/preprocessed [MICROGRAPH PATHS EXCLUDED FOR LEGIBILITY]
Traceback (most recent call last):
  File "/gpfs/share/apps/python/gpu/3.6.5/bin/topaz", line 10, in <module>
    sys.exit(main())
  File "/gpfs/share/apps/python/gpu/3.6.5/lib/python3.6/site-packages/topaz/main.py", line 146, in main
    args.func(args)
  File "/gpfs/share/apps/python/gpu/3.6.5/lib/python3.6/site-packages/topaz/commands/normalize.py", line 129, in main
    name = process(path)
  File "/gpfs/share/apps/python/gpu/3.6.5/lib/python3.6/site-packages/topaz/commands/normalize.py", line 69, in __call__
    , method=method, sample=self.sample, use_cuda=self.use_cuda)
  File "/gpfs/share/apps/python/gpu/3.6.5/lib/python3.6/site-packages/topaz/stats.py", line 36, in normalize
    , verbose=verbose)
  File "/gpfs/share/apps/python/gpu/3.6.5/lib/python3.6/site-packages/topaz/stats.py", line 64, in norm_fit
    splits = np.quantile(x, 1-pis)
AttributeError: module 'numpy' has no attribute 'quantile'

It seems to come from numpy, but as far as I understand, Cryosparc maintains its own Python instance, so updating our wouldn’t help, right?

Would anyone know where this error comes from and how to solve it?

Thanks,
Best,
Nicolas

Hi @ncoudray,

If you followed the instructions on the Topaz Github page, you should’ve installed topaz into a new anaconda environment. If you look at the setup.py file, you’ll see that Topaz requires:

'torch>=1.0.0',
'torchvision',
'numpy>=1.11',
'pandas',
'scikit-learn>=0.19.0',
'scipy>=0.17.0',
'pillow>=4.2.1',

Can you make sure these requirements are satisfied?

Thanks for the reply and Happy New Year - We will have a look.