lava-optimization icon indicating copy to clipboard operation
lava-optimization copied to clipboard

TypeError in lava-optimization when a QPsolver execued with lower alpha_d and beta_g values less than solver iterations.

Open LVAjay opened this issue 3 years ago • 1 comments

Objective of issue:

  1. TypeError in lava-optimization when a QPsolver execued with lower alpha_d and beta_g values less than solver iterations.
  2. AttributeError: 'int' object has no attribute 'shape'.** - for self.decay_counter.shape

Lava version:

Lava Optimization 0.1.2

**I'm submitting a bug report -

Issue 1.

While running the QPSolver with constant value for alpha ,and alpha_d value less than solver iterations: I hit an exception in the file runtime.py. Further analyzing the exception, printing the traceback for the exception in the file runtime.py- ran into the below statement.

TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''.

I am afraid that the exception is due to right shift operation performed on alpha which is float64 dtype.

Issue 2.

Also, I have encountered another issue after updating work around for alpha and beta. Which I am afraid to see an attribute error for self.decay_counter.shape. The detailed error is as shown below:

self.decay_counter = np.zeros(self.decay_counter.shape) AttributeError: 'int' object has no attribute 'shape'.

LVAjay avatar Apr 02 '22 20:04 LVAjay

Thanks @LVAjay for finding this bug and its root cause, let us take a look and come back to you.

GaboFGuerra avatar Apr 04 '22 08:04 GaboFGuerra

@ashishrao7, Do you know what is the status of this issue opened by @LVAjay? Was this resolved on any of the last releases?

GaboFGuerra avatar Jan 12 '23 18:01 GaboFGuerra

This bug has been fixed by the latest release

ashishrao7 avatar Jan 16 '23 16:01 ashishrao7