Skip to content

Commit

Permalink
Pulling in latest ldp for bulk_evaluate_consensus (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza authored Jan 22, 2025
1 parent e87dba1 commit ead8958
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ repos:
- anyio
- fh-llm-client>=0.0.9 # Match pyproject.toml
- fhaviary[llm]>=0.14 # Match pyproject.toml
- ldp>=0.17 # Match pyproject.toml
- ldp>=0.20 # Match pyproject.toml
- html2text
- httpx
- pybtex
Expand Down
6 changes: 3 additions & 3 deletions paperqa/_ldp_shims.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"SimpleAgentState",
"UIndexMemoryModel",
"_Memories",
"bulk_evaluate_consensus",
"discounted_returns",
"evaluate_consensus",
"set_training_mode",
]

Expand All @@ -34,7 +34,7 @@
Callback,
ComputeTrajectoryMetricsMixin,
RolloutManager,
evaluate_consensus,
bulk_evaluate_consensus,
)
from ldp.graph.memory import Memory, UIndexMemoryModel
from ldp.graph.op_utils import set_training_mode
Expand Down Expand Up @@ -63,5 +63,5 @@ class Callback: # type: ignore[no-redef]
SimpleAgentState = None # type: ignore[assignment,misc]
UIndexMemoryModel = None # type: ignore[assignment,misc]
discounted_returns = None # type: ignore[assignment]
evaluate_consensus = None # type: ignore[assignment]
bulk_evaluate_consensus = None # type: ignore[assignment]
set_training_mode = None # type: ignore[assignment]
4 changes: 2 additions & 2 deletions paperqa/agents/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from paperqa._ldp_shims import (
Callback,
ComputeTrajectoryMetricsMixin,
evaluate_consensus,
bulk_evaluate_consensus,
)
from paperqa.docs import Docs
from paperqa.litqa import (
Expand Down Expand Up @@ -254,7 +254,7 @@ def extract_ideal(x: GradablePaperQAEnvironment | Frame) -> str:
return query["ideal_answer"]

try:
consensus, accuracy = await evaluate_consensus(
consensus, accuracy = await bulk_evaluate_consensus(
data=data,
grouping_fn=extract_question,
extract_answer_fn=extract_answer,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dev = [
"vcrpy>=6", # Pin for https://github.com/kevin1024/vcrpy/issues/884
]
ldp = [
"ldp>=0.17", # For evaluate_consensus
"ldp>=0.20", # For bulk_evaluate_consensus
]
local = [
"sentence-transformers",
Expand Down
70 changes: 47 additions & 23 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ead8958

Please sign in to comment.