Skip to content

Commit 75330f3

Browse files
author
Gerit Wagner
committed
test v2
1 parent 4e793bf commit 75330f3

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

notebooks/evaluation.py

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import evaluation
1111
import pandas as pd
12-
from asreview.data import ASReviewData
1312

1413
from bib_dedupe.bib_dedupe import block
1514
from bib_dedupe.bib_dedupe import cluster
@@ -336,14 +335,40 @@ def append_to_output(result: dict, *, package_name: str) -> None:
336335
)
337336

338337
# ASReview
338+
339+
tmp_in = Path("notebooks/asreview_input.csv")
340+
tmp_out = Path("notebooks/asreview_dedup.csv")
341+
records_df.to_csv(tmp_in, index=False)
342+
339343
timestamp = datetime.now()
340-
asdata = ASReviewData(records_df)
341-
merged_df = asdata.drop_duplicates()
344+
subprocess.run(
345+
[
346+
"asreview",
347+
"data",
348+
"dedup",
349+
str(tmp_in),
350+
"-o",
351+
str(tmp_out),
352+
"--pid",
353+
"DOI",
354+
],
355+
check=True,
356+
)
357+
merged_df = pd.read_csv(tmp_out)
358+
342359
result = dedupe_benchmark.compare_dedupe_id(
343360
records_df=records_df, merged_df=merged_df, timestamp=timestamp
344361
)
345362
evaluation.append_to_output(result, package_name="asreview")
346363

364+
# timestamp = datetime.now()
365+
# asdata = ASReviewData(records_df)
366+
# merged_df = asdata.drop_duplicates()
367+
# result = dedupe_benchmark.compare_dedupe_id(
368+
# records_df=records_df, merged_df=merged_df, timestamp=timestamp
369+
# )
370+
# evaluation.append_to_output(result, package_name="asreview")
371+
347372
# ASySD (R)
348373
# temporarily skip (need to combine part1/2)
349374
if benchmark_path == "depression":

0 commit comments

Comments
 (0)