camlab-bioml / starling

Segmentation error aware clustering for multiplexed imaging
https://camlab-bioml.github.io/starling/
Other
11 stars 2 forks source link

Runtime error on python3.9 #50

Open kieranrcampbell opened 2 months ago

kieranrcampbell commented 2 months ago

Documenting this here:

installed starling from very minimal Pipfile:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
biostarling = "*"
snakemake = "*"

[requires]
python_version = "3.9"

A basic run throws an error in st.train_and_fit that ultimately points to

  File "/home/campbell/kcampbel/.local/share/virtualenvs/masscyto-AMD-8Wte/lib64/python3.9/site-packages/torch/distributions/studentT.py", line 86, in log_prob
    torch.lgamma(0.5 * self.df) -

which in turn throws a runtime error:

RuntimeError:
  #define POS_INFINITY __int_as_float(0x7f800000)
  #define INFINITY POS_INFINITY
  #define NEG_INFINITY __int_as_float(0xff800000)
  #define NAN __int_as_float(0x7fffffff)

(that goes on for a very long time) and ultimately ends with

Error limit reached.
100 errors detected in the compilation of "default_program".
Compilation terminated.

But a minimal lgamma example on the same python environment:

import torch

print(torch.lgamma(0.5 * torch.tensor(2)))

works no problem. Will continue trying to debug...