Skip to content

Commit

Permalink
Fix float comparisons in scoring tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emnoor-reef committed Jan 30, 2025
1 parent 5a15f15 commit e970a33
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_manifest_dance_incentives(

scores = score_batches([curr_batch])
assert "miner_hotkey" in scores
assert scores["miner_hotkey"] - 100 * expected_multiplier < 0.0001
assert abs(scores["miner_hotkey"] - 100 * expected_multiplier) < 0.0001


@pytest.mark.override_config(
Expand All @@ -338,4 +338,4 @@ def test_manifest_dance_incentives_disabled_on_v1(override_weights_version_v1):
assert "miner_hotkey" in scores

# there should be no bonus
assert scores["miner_hotkey"] - 100 < 0.0001
assert abs(scores["miner_hotkey"] - 100) < 0.0001

0 comments on commit e970a33

Please sign in to comment.