Skip to content

[BUG][URGENT] FISTA and POGM converge in single iteration! #115

@chaithyagr

Description

@chaithyagr

System setup
OS: [e.g] macOS v10.14.1
Python version: [e.g.] v3.6.7
Python environment (if any): [e.g.] conda v4.5.11

Describe the bug
Currently, FISTA and POGM algorithms seem to converge in a single iteration.
The reason being that we have added a comma for python style guide:

if self._cost_func:
self.converge = (
self.any_convergence_flag()
or self._cost_func.get_cost(self._x_new),
)

if self._cost_func:
self.converge = (
self.any_convergence_flag()
or self._cost_func.get_cost(self._x_new),
)

These make self.converge into a tuple, i.e. (False,)!
Due to this, the check for convergence later here :

if self.converge:
if self.verbose:
print(' - Converged!')
break

Becomes true and the code ends.

We need to remove the commas from the above lines.
Also @sfarrens can we keep this issue to add tests for this? It seems like a very important bug that we should have not missed.

Are you planning to submit a Pull Request?

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions