Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadGate PyModel not working with target_cost=None #175

Open
AlessandroPierro opened this issue Jan 27, 2023 · 0 comments
Open

ReadGate PyModel not working with target_cost=None #175

AlessandroPierro opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
1-bug Something isn't working

Comments

@AlessandroPierro
Copy link
Collaborator

AlessandroPierro commented Jan 27, 2023

Describe the bug
The ReadGate doesn't work with timeout=None when running on CPU.

To reproduce current behavior
Steps to reproduce the behavior:

  1. When I run this code (add code or minimum test case) ...
from lava.lib.optimization.problems.problems import QUBO
from lava.lib.optimization.solvers.generic.solver import OptimizationSolver
import numpy as np

Q = np.array([[11, -5, 2, 0, -6], 
              [-5, -13, -1, -3, 10], 
              [2, -1, 0, 2, 10], 
              [0, -3, 2, 2, -1], 
              [-6, 10, 10, -1, -3]])

problem = QUBO(Q)
solver = OptimizationSolver(problem)

solution = solver.solve(timeout=50,
    target_cost=None
)
  1. I get this error ...
TypeError: '<=' not supported between instances of 'int' and 'NoneType'

Expected behavior
The OptimizationSolver should run until the timeout is reached.

Environment (please complete the following information):

  • Device: Intel cloud
  • OS: Linux
  • Lava version 0.6.1
@AlessandroPierro AlessandroPierro added the 1-bug Something isn't working label Jan 27, 2023
@AlessandroPierro AlessandroPierro self-assigned this Jan 27, 2023
@github-actions github-actions bot added the 0-needs-review Has to be reviewed. label Jan 27, 2023
@AlessandroPierro AlessandroPierro removed the 0-needs-review Has to be reviewed. label Jan 27, 2023
@GaboFGuerra GaboFGuerra changed the title ReadGate PyModel not working with timeout=None ReadGate PyModel not working with target_cost=None May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant