mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Make sample_xy an instance method
This commit is contained in:
@@ -171,8 +171,8 @@ class StaticLazyConstraintsComponent(Component):
|
||||
enforced_cids += [category_to_cids[category][i]]
|
||||
return enforced_cids
|
||||
|
||||
@staticmethod
|
||||
def sample_xy(
|
||||
self,
|
||||
instance: "Instance",
|
||||
sample: TrainingSample,
|
||||
) -> Tuple[Dict[Hashable, List[List[float]]], Dict[Hashable, List[List[float]]]]:
|
||||
|
||||
@@ -73,8 +73,8 @@ class ObjectiveValueComponent(Component):
|
||||
logger.info(f"{c} regressor not fitted. Skipping.")
|
||||
return pred
|
||||
|
||||
@staticmethod
|
||||
def sample_xy(
|
||||
self,
|
||||
instance: Instance,
|
||||
sample: TrainingSample,
|
||||
) -> Tuple[Dict[Hashable, List[List[float]]], Dict[Hashable, List[List[float]]]]:
|
||||
|
||||
Reference in New Issue
Block a user