mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Store cuts and lazy constraints as JSON in H5
This commit is contained in:
@@ -28,17 +28,17 @@ def test_mem_component_gp(
|
||||
clf.fit.assert_called()
|
||||
x, y = clf.fit.call_args.args
|
||||
assert x.shape == (3, 50)
|
||||
assert y.shape == (3, 415)
|
||||
assert y.shape == (3, 412)
|
||||
y = y.tolist()
|
||||
assert y[0][:20] == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||
assert y[1][:20] == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||
assert y[2][:20] == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1]
|
||||
assert y[0][40:50] == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||
assert y[1][40:50] == [1, 1, 0, 1, 1, 1, 1, 1, 1, 1]
|
||||
assert y[2][40:50] == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||
|
||||
# Should store violations
|
||||
assert comp.constrs_ is not None
|
||||
assert comp.n_features_ == 50
|
||||
assert comp.n_targets_ == 415
|
||||
assert len(comp.constrs_) == 415
|
||||
assert comp.n_targets_ == 412
|
||||
assert len(comp.constrs_) == 412
|
||||
|
||||
# Call before-mip
|
||||
stats: Dict[str, Any] = {}
|
||||
@@ -52,7 +52,7 @@ def test_mem_component_gp(
|
||||
|
||||
# Should set cuts_aot_
|
||||
assert model.cuts_aot_ is not None
|
||||
assert len(model.cuts_aot_) == 285
|
||||
assert len(model.cuts_aot_) == 256
|
||||
|
||||
|
||||
def test_usage_stab(
|
||||
|
||||
BIN
tests/fixtures/stab-gp-n50-00000.h5
vendored
BIN
tests/fixtures/stab-gp-n50-00000.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00000.mps.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00000.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00000.pkl.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00000.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00001.h5
vendored
BIN
tests/fixtures/stab-gp-n50-00001.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00001.mps.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00001.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00001.pkl.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00001.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00002.h5
vendored
BIN
tests/fixtures/stab-gp-n50-00002.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00002.mps.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00002.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-gp-n50-00002.pkl.gz
vendored
BIN
tests/fixtures/stab-gp-n50-00002.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00000.h5
vendored
BIN
tests/fixtures/stab-pyo-n50-00000.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00000.mps.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00000.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00000.pkl.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00000.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00001.h5
vendored
BIN
tests/fixtures/stab-pyo-n50-00001.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00001.mps.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00001.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00001.pkl.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00001.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00002.h5
vendored
BIN
tests/fixtures/stab-pyo-n50-00002.h5
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00002.mps.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00002.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/stab-pyo-n50-00002.pkl.gz
vendored
BIN
tests/fixtures/stab-pyo-n50-00002.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00000.h5
vendored
BIN
tests/fixtures/tsp-gp-n20-00000.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00000.mps.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00000.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00000.pkl.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00000.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00001.h5
vendored
BIN
tests/fixtures/tsp-gp-n20-00001.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00001.mps.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00001.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00001.pkl.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00001.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00002.h5
vendored
BIN
tests/fixtures/tsp-gp-n20-00002.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00002.mps.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00002.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-gp-n20-00002.pkl.gz
vendored
BIN
tests/fixtures/tsp-gp-n20-00002.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00000.h5
vendored
BIN
tests/fixtures/tsp-pyo-n20-00000.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00000.mps.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00000.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00000.pkl.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00000.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00001.h5
vendored
BIN
tests/fixtures/tsp-pyo-n20-00001.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00001.mps.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00001.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00001.pkl.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00001.pkl.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00002.h5
vendored
BIN
tests/fixtures/tsp-pyo-n20-00002.h5
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00002.mps.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00002.mps.gz
vendored
Binary file not shown.
BIN
tests/fixtures/tsp-pyo-n20-00002.pkl.gz
vendored
BIN
tests/fixtures/tsp-pyo-n20-00002.pkl.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user