mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-09 19:08:51 -06:00
Make xy_sample receive features, not instances
This commit is contained in:
@@ -58,6 +58,7 @@ class FeaturesExtractor:
|
||||
self,
|
||||
instance: "Instance",
|
||||
) -> Dict[str, ConstraintFeatures]:
|
||||
has_static_lazy = instance.has_static_lazy_constraints()
|
||||
constraints: Dict[str, ConstraintFeatures] = {}
|
||||
for cid in self.solver.get_constraint_ids():
|
||||
user_features = None
|
||||
@@ -83,6 +84,10 @@ class FeaturesExtractor:
|
||||
"Category": category,
|
||||
"User features": user_features,
|
||||
}
|
||||
if has_static_lazy:
|
||||
constraints[cid]["Lazy"] = instance.is_constraint_lazy(cid)
|
||||
else:
|
||||
constraints[cid]["Lazy"] = False
|
||||
return constraints
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user