Remove sample.after_lp

This commit is contained in:
2021-07-01 12:25:50 -05:00
parent 4093ac62fd
commit b4a267a524
8 changed files with 95 additions and 78 deletions

View File

@@ -44,24 +44,28 @@ def sample() -> Sample:
lazy=[True, True, True, True, False],
),
),
after_lp=Features(
instance=InstanceFeatures(),
constraints=ConstraintFeatures(names=["c1", "c2", "c3", "c4", "c5"]),
),
data={
"constr_categories": [
"type-a",
"type-a",
"type-a",
"type-b",
"type-b",
],
"constr_lazy": [True, True, True, True, False],
"constr_names": ["c1", "c2", "c3", "c4", "c5"],
"instance_features_user": [5.0],
"lazy_enforced": {"c1", "c2", "c4"},
"lp_constr_features": [
[1.0, 1.0],
[1.0, 2.0],
[1.0, 3.0],
[1.0, 4.0, 0.0],
None,
],
"static_lazy_count": 4,
},
)
sample.after_lp.instance.to_list = Mock(return_value=[5.0]) # type: ignore
sample.after_lp.constraints.to_list = Mock( # type: ignore
side_effect=lambda idx: {
0: [1.0, 1.0],
1: [1.0, 2.0],
2: [1.0, 3.0],
3: [1.0, 4.0, 0.0],
4: None,
}[idx]
)
return sample