Skip to content

Commit

Permalink
Merge branch 'main' into mis-graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroPierro authored Oct 16, 2023
2 parents 9935ca7 + a8a31bd commit 8c63a4d
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 285 deletions.
423 changes: 143 additions & 280 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ packages = [
{include = "tests"}
]
include = ["tutorials"]
version = "0.3.0"
version = "0.3.0.dev0"
readme = "README.md"
description = "A library of solvers that leverage neuromorphic hardware for constrained optimization. Lava-Optimization is part of Lava Framework. Lava-optimization is part of Lava Framework"
homepage = "https://lava-nc.org/"
repository = "https://github.com/lava-nc/lava-optimization"
Expand Down Expand Up @@ -48,7 +49,7 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.8, <3.11"

lava-nc = "0.8.0"
lava-nc = { git = "https://github.com/lava-nc/lava.git", branch = "main", develop = true }

numpy = "^1.24.4"
networkx = "<=2.8"
Expand Down
3 changes: 2 additions & 1 deletion src/lava/lib/optimization/solvers/generic/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
MixedConstraintsProcess,
)
from lava.proc.dense.process import Dense
from lava.proc.sparse.process import Sparse


@dataclass
class CostMinimizer:
"""Processes implementing an optimization problem's cost function."""

coefficients_2nd_order: Dense
coefficients_2nd_order: Sparse

@property
def state_in(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def __init__(self, proc):
np.eye(*cost_coefficients[2].init.shape)
)
self.cost_minimizer = CostMinimizer(
Dense(
weights=weights,
Sparse(
weights=csr_matrix(weights),
num_message_bits=24,
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def setUp(self) -> None:
{"type": t} for t in valid_ips
]

@unittest.skip("Failing due to a change in numpy, to be investaget further")
def test_model_bayesian_optimizer(self) -> None:
"""test behavior of the BayesianOptimizer process"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from lava.lib.optimization.solvers.bayesian.solver import BayesianSolver


@unittest.skip("Failing due to a change in numpy, to be investaget further")
class TeatSolvers(unittest.TestCase):
"""Test initialization and runtime of the BayesianSolver class
Expand Down

0 comments on commit 8c63a4d

Please sign in to comment.