From e97cfff6aac5c0024e3ff06fdb95a5159706046f Mon Sep 17 00:00:00 2001 From: Talmo Pereira Date: Sat, 28 Sep 2024 18:37:41 -0700 Subject: [PATCH] Skip chmod test on windows --- sleap_io/model/labels.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sleap_io/model/labels.py b/sleap_io/model/labels.py index 67dea5cf..3328c440 100644 --- a/sleap_io/model/labels.py +++ b/sleap_io/model/labels.py @@ -660,13 +660,19 @@ def make_training_splits( labels.suggestions = [] labels.clean() - # Make splits. + # Make train split. labels_train, labels_rest = labels.split(n_train, seed=seed) + + # Make test split. if n_test is not None: if n_test < 1: n_test = (n_test * len(labels)) / len(labels_rest) labels_test, labels_rest = labels_rest.split(n=n_test, seed=seed) - if n_val is not None: + else: + labels_test = labels_rest + + # Make val split. + if n_val is not None or (isinstance(n_val, float) and n_val == 1.0): if n_val < 1: n_val = (n_val * len(labels)) / len(labels_rest) labels_val, _ = labels_rest.split(n=n_val, seed=seed)