MannLabs / alphadia

modular & open DIA search
https://alphadia.readthedocs.io
Apache License 2.0
41 stars 3 forks source link

Optimization fails with: zero-size array to reduction operation minimum which has no identity #347

Closed GeorgWa closed 4 days ago

GeorgWa commented 1 week ago

Describe the bug It looks like optimization can fail when the number of precursors get's very low due to FDR instability. In this example, optimization was started as lots of precursors where found. during optimization, only 199 precursors where found.

1:19:14.677819 INFO: Traceback (most recent call last):
  File "alphadia\cli.py", line 342, in run
    plan.run()
  File "alphadia\planning.py", line 365, in run
    raise e
  File "alphadia\planning.py", line 338, in run
    workflow.search_parameter_optimization()
  File "alphadia\workflow\peptidecentric.py", line 453, in search_parameter_optimization
    self.optlock.update()
  File "alphadia\workflow\optimization.py", line 878, in update
    self.decrease_batch_idx()
  File "alphadia\workflow\optimization.py", line 863, in decrease_batch_idx
    smallest_value = np.min(
                     ^^^^^^^
  File "numpy\core\fromnumeric.py", line 2953, in min
  File "numpy\core\fromnumeric.py", line 88, in _wrapreduction
ValueError: zero-size array to reduction operation minimum which has no identity

1:19:14.678819 ERROR: zero-size array to reduction operation minimum which has no identity

Expected behavior aborting optimization with the best solution so far

Version (please complete the following information): alphaDIA 1.8.0