Skip to content

Commit

Permalink
Bug in tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Old-Shatterhand committed Apr 8, 2024
1 parent 0489972 commit 9404bce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ def check_folder(output_root, epsilon, e_weight, f_weight, e_filename, f_filenam
tests = sum(f_map[f] for f, s in data if s == "test")
else:
trains, tests = splits[-1].count("train"), splits[-1].count("test")
train_frac, test_frac = trains / (trains + tests), tests / (trains + tests)
assert 0.7 * (1 - epsilon) <= train_frac
assert 0.3 * (1 - epsilon) <= test_frac
assert int(0.7 * (1 - epsilon) * (trains + tests)) <= trains
assert int(0.3 * (1 - epsilon) * (trains + tests)) <= tests
if n == "I":
break

Expand Down

0 comments on commit 9404bce

Please sign in to comment.