davidhallac / TICC

BSD 2-Clause "Simplified" License
457 stars 162 forks source link

Scipy >= 1.3 causes TICC_solver.py to hang #65

Closed grddavies closed 4 years ago

grddavies commented 4 years ago

Summary

Versions of Scipy >= 1.3 break UnitTest.py

Steps to recreate:

Environment details:

OS: macOS Mojave 10.14.6 Conda: 4.8.3 Python: 3.7.7 Numpy: 1.18.4 Scipy: 1.3.3 Scikit-learn: 0.21.3 Matplotlib: 3.2.1 Pandas: 1.0.4

$ python3 UnitTest.py this will hang

^CTraceback (most recent call last):
  File "UnitTest.py", line 69, in <module>
    unittest.main()
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/main.py", line 101, in __init__
    self.runTests()
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/main.py", line 271, in runTests
    self.result = testRunner.run(self.test)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/runner.py", line 176, in run
    test(result)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/case.py", line 676, in __call__
    return self.run(*args, **kwds)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/unittest/case.py", line 628, in run
    testMethod()
  File "UnitTest.py", line 13, in test_example
    (cluster_assignment, cluster_MRFs) = ticc.fit(input_file=fname)
  File "/Users/Gethin/code/TICC/TICC_solver.py", line 111, in fit
    train_cluster_inverse)
  File "/Users/Gethin/code/TICC/TICC_solver.py", line 295, in optimize_clusters
    val = optRes[cluster].get()
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/multiprocessing/pool.py", line 651, in get
    self.wait(timeout)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/multiprocessing/pool.py", line 648, in wait
    self._event.wait(timeout)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/threading.py", line 552, in wait
    signaled = self._cond.wait(timeout)
  File "/Users/Gethin/miniconda3/envs/py3/lib/python3.7/threading.py", line 296, in wait
    waiter.acquire()

Runs fine with Scipy 1.2.1

Note: upgrading from scipy 1.2.1 -> 1.3.1 requires update to libgfortran 4.0.0

grddavies commented 4 years ago

A fresh environment and installs sorted this! Not entirely sure what the issue was.