mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-08 02:18:51 -06:00
Replace instance.samples by instance.get/push_sample
This commit is contained in:
@@ -28,7 +28,7 @@ class Instance(ABC):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.samples: List[Sample] = []
|
||||
self._samples: List[Sample] = []
|
||||
|
||||
@abstractmethod
|
||||
def to_model(self) -> Any:
|
||||
@@ -189,3 +189,9 @@ class Instance(ABC):
|
||||
Save any pending changes made to the instance to the underlying data store.
|
||||
"""
|
||||
pass
|
||||
|
||||
def get_samples(self) -> List[Sample]:
|
||||
return self._samples
|
||||
|
||||
def push_sample(self, sample: Sample) -> None:
|
||||
self._samples.append(sample)
|
||||
|
||||
Reference in New Issue
Block a user