Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmsklnk committed Jun 2, 2024
1 parent 33f563d commit 46167c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions tests/metrics/test_reference_recall.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ def test_reference_recall():
the recall value should be equal to 0.5
"""
localization_pipeline = create_localization_pipeline()
recall, mask = avl.reference_recall(
recall = avl.reference_recall(
queries, localization_pipeline, k_closest=2, threshold=10
)

assert np.isclose(recall, 0.5)
assert mask == [True, False]


def test_reference_recall_low_threshold():
Expand All @@ -26,9 +25,8 @@ def test_reference_recall_low_threshold():
so the recall value should be equal to 0
"""
localization_pipeline = create_localization_pipeline()
recall, mask = avl.reference_recall(
recall = avl.reference_recall(
queries, localization_pipeline, k_closest=2, threshold=1
)

assert np.isclose(recall, 0)
assert mask == [False, False]
5 changes: 2 additions & 3 deletions tests/metrics/test_retrieval_recall.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ def test_retrieval_recall():
"""
localization_pipeline = create_localization_pipeline()
retrieval_system = localization_pipeline.retrieval_system
recall, mask = avl.retrieval_recall(
recalls = avl.retrieval_recall(
queries, retrieval_system, vpr_k_closest=2, feature_matcher_k_closest=1
)

assert np.isclose(recall, 0.5)
assert mask == [True, False]
assert np.isclose(recalls[0], 0.5)

0 comments on commit 46167c5

Please sign in to comment.