From b6426462a116f3fb0187a1ccdae3d258e5ace6fe Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Thu, 5 Aug 2021 14:05:50 -0500 Subject: [PATCH] Fix failing tests --- miplearn/features/sample.py | 1 + tests/features/test_extractor.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/miplearn/features/sample.py b/miplearn/features/sample.py index 11f37b4..4f33edd 100644 --- a/miplearn/features/sample.py +++ b/miplearn/features/sample.py @@ -312,6 +312,7 @@ class Hdf5Sample(Sample): def _pad(veclist: VectorList) -> Tuple[VectorList, List[int]]: + veclist = deepcopy(veclist) lens = [len(v) if v is not None else -1 for v in veclist] maxlen = max(lens) diff --git a/tests/features/test_extractor.py b/tests/features/test_extractor.py index 9edb496..9612211 100644 --- a/tests/features/test_extractor.py +++ b/tests/features/test_extractor.py @@ -192,7 +192,7 @@ if __name__ == "__main__": extractor = FeaturesExtractor(with_lhs=False) sample = Hdf5Sample("tmp/prof.h5", mode="w") - def run(): + def run() -> None: extractor.extract_after_load_features(instance, solver, sample) extractor.extract_after_lp_features(solver, sample)