Skip to content

Commit

Permalink
Update src/datachain/toolkit/split.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dreadatour authored Dec 10, 2024
1 parent bc1ea48 commit 24cd3b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/datachain/toolkit/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def train_test_split(

return [
dc.filter(
rand_col >= round(sum(weights_normalized[:index]) * (RESOLUTION + 1)),
rand_col < round(sum(weights_normalized[: index + 1]) * (RESOLUTION + 1)),
rand_col >= round(sum(weights_normalized[:index]) * (RESOLUTION - 1)),
rand_col < round(sum(weights_normalized[: index + 1]) * (RESOLUTION - 1)),
)
for index, _ in enumerate(weights_normalized)
]

0 comments on commit 24cd3b5

Please sign in to comment.