Skip to content

Commit

Permalink
Skip chmod test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
talmo committed Sep 29, 2024
1 parent 8e179ca commit e97cfff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sleap_io/model/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e97cfff

Please sign in to comment.