Skip to content

Commit

Permalink
build elo v1
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Jan 15, 2025
1 parent 3a28955 commit 50464c1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pdelfin/eval/buildelo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ def build_review_page(args, comparisons):
)
parser.add_argument(
'--review_size',
default=20,
default=50,
type=int,
help="Number of entries to show on the generated review page",
)
parser.add_argument(
'--comparisons',
default=["pdelf", "gotocr", "gotocr_format"],
default=["pdelf", "gotocr", "gotocr_format", "mineru"],
help="Different variants to compare against"
)
parser.add_argument(
Expand Down Expand Up @@ -113,10 +113,14 @@ def build_review_page(args, comparisons):
alignment=comparer.compute(text_a, text_b)
)
)

# if len(all_comps) > 1000:
# break

# Sorting by alignment score is problemetic, because it only returns completely pathological parses
# And we miss cases where the parse is similar, but one thing hallucinated a word or two, etc.
#all_comps.sort(key=lambda c: c.alignment)

# DEBUG CODE, remove
if len(all_comps) > 10:
break

all_comps.sort(key=lambda c: c.alignment)
random.shuffle(all_comps)

result = build_review_page(args, all_comps[0:args.review_size])

0 comments on commit 50464c1

Please sign in to comment.