Skip to content

Commit ead8958

Browse files
authored
Pulling in latest ldp for bulk_evaluate_consensus (#826)
1 parent e87dba1 commit ead8958

File tree

5 files changed

+54
-30
lines changed

5 files changed

+54
-30
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ repos:
8686
- anyio
8787
- fh-llm-client>=0.0.9 # Match pyproject.toml
8888
- fhaviary[llm]>=0.14 # Match pyproject.toml
89-
- ldp>=0.17 # Match pyproject.toml
89+
- ldp>=0.20 # Match pyproject.toml
9090
- html2text
9191
- httpx
9292
- pybtex

paperqa/_ldp_shims.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"SimpleAgentState",
1515
"UIndexMemoryModel",
1616
"_Memories",
17+
"bulk_evaluate_consensus",
1718
"discounted_returns",
18-
"evaluate_consensus",
1919
"set_training_mode",
2020
]
2121

@@ -34,7 +34,7 @@
3434
Callback,
3535
ComputeTrajectoryMetricsMixin,
3636
RolloutManager,
37-
evaluate_consensus,
37+
bulk_evaluate_consensus,
3838
)
3939
from ldp.graph.memory import Memory, UIndexMemoryModel
4040
from ldp.graph.op_utils import set_training_mode
@@ -63,5 +63,5 @@ class Callback: # type: ignore[no-redef]
6363
SimpleAgentState = None # type: ignore[assignment,misc]
6464
UIndexMemoryModel = None # type: ignore[assignment,misc]
6565
discounted_returns = None # type: ignore[assignment]
66-
evaluate_consensus = None # type: ignore[assignment]
66+
bulk_evaluate_consensus = None # type: ignore[assignment]
6767
set_training_mode = None # type: ignore[assignment]

paperqa/agents/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from paperqa._ldp_shims import (
3737
Callback,
3838
ComputeTrajectoryMetricsMixin,
39-
evaluate_consensus,
39+
bulk_evaluate_consensus,
4040
)
4141
from paperqa.docs import Docs
4242
from paperqa.litqa import (
@@ -254,7 +254,7 @@ def extract_ideal(x: GradablePaperQAEnvironment | Frame) -> str:
254254
return query["ideal_answer"]
255255

256256
try:
257-
consensus, accuracy = await evaluate_consensus(
257+
consensus, accuracy = await bulk_evaluate_consensus(
258258
data=data,
259259
grouping_fn=extract_question,
260260
extract_answer_fn=extract_answer,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dev = [
7777
"vcrpy>=6", # Pin for https://github.com/kevin1024/vcrpy/issues/884
7878
]
7979
ldp = [
80-
"ldp>=0.17", # For evaluate_consensus
80+
"ldp>=0.20", # For bulk_evaluate_consensus
8181
]
8282
local = [
8383
"sentence-transformers",

uv.lock

Lines changed: 47 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)