give useful warning if no records are blocked
@@ -159,6 +159,12 @@ def scoreDuplicates(records, data_model, classifier, num_cores=1, threshold=0) :
else :
from .backport import Process, SimpleQueue
+ first, iterable = peek(records)
+ if first is None:
+ raise ValueError("No records have been blocked together. "
+ "Is the data you are trying to match like "
+ "the data you trained on?")
+
record_pairs_queue = SimpleQueue()
score_queue = SimpleQueue()
result_queue = SimpleQueue()
