Skip to content

Commit

Permalink
Reduce required accuracy in ranking_agent_test.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 703085807
Change-Id: Iefd35170f48a9a8c6ce8f5b44d5e2dc32f6b3f24
  • Loading branch information
nimrod-gileadi authored and copybara-github committed Dec 5, 2024
1 parent a809aa8 commit ee4d6fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tf_agents/bandits/agents/ranking_agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ def testPositionalBiasParams(
agent.train(experience)
weights = agent._construct_sample_weights(scores, observations, None)
self.assertAllEqual(weights.shape, [batch_size, num_slots])
self.assertAllClose(weights[-1, 1], expected_second_weight)
self.assertAllClose(
weights[-1, 1], expected_second_weight, atol=1e-3, rtol=1e-3
)


if __name__ == '__main__':
Expand Down

0 comments on commit ee4d6fe

Please sign in to comment.