facebookresearch / theseus

A library for differentiable nonlinear optimization
MIT License
1.78k stars 128 forks source link

Error with linalg.cholesky #645

Closed EmeryLee97 closed 5 months ago

EmeryLee97 commented 5 months ago

❓ Questions and Help

When I run my code, this error keeps appearing. I use LM optimizer and set step_size to 0.1, what can be the problem that causes this issue?

/theseus/optimizer/nonlinear/nonlinear_least_squares.py:150: RuntimeWarning: There was an error while running the linear optimizer. Original error message: linalg.cholesky: (Batch element 0): The factorization could not be completed because the input is not positive-definite (the leading minor of order 55 is not positive-definite).. warnings.warn(msg, RuntimeWarning)

EmeryLee97 commented 5 months ago

Solved this by setting {"damping": 0.1} in optimizer_kwargs by following https://github.com/AutoGPTQ/AutoGPTQ/issues/196#issuecomment-1643551257