Skip to content

Commit efa7fac

Browse files
committed
refactor(graders): Renames the aevaluate method to the internally used _aevaluate.
- Renames the `aevaluate` async method in multiple gradient classes to `_aevaluate` to identify it as an internal method. - Updates the method call names in `CGCVGrader` to match the renamed `_aevaluate`. - Maintains asynchronous call logic, enhancing code encapsulation. - Affected gradients include the `audit`, `cgcv`, `ebtu`, `grounding`, `presentation_quality`, and `traceability` modules.
1 parent 6b9eb50 commit efa7fac

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

tutorial/example_deep_finance/judge/audit/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def create_default_model(
6969

7070
return OpenAIChatModel(**kwargs)
7171

72-
async def aevaluate(
72+
async def _aevaluate(
7373
self,
7474
traj: Any,
7575
**_: Any,

tutorial/example_deep_finance/judge/cgcv/grader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def create_default_model(
135135

136136
return OpenAIChatModel(**kwargs)
137137

138-
async def aevaluate(
138+
async def _aevaluate(
139139
self,
140140
traj: Any,
141141
**_: Any,
@@ -239,7 +239,7 @@ def evaluate(
239239
loop = asyncio.new_event_loop()
240240
asyncio.set_event_loop(loop)
241241

242-
return loop.run_until_complete(self.aevaluate(traj, **kwargs))
242+
return loop.run_until_complete(self._aevaluate(traj, **kwargs))
243243

244244
def get_detailed_result(
245245
self,

tutorial/example_deep_finance/judge/ebtu/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848
response_format={"type": "json_object"},
4949
)
5050

51-
async def aevaluate(self, traj: Any, **kwargs: Any) -> GraderScore:
51+
async def _aevaluate(self, traj: Any, **kwargs: Any) -> GraderScore:
5252
messages = coerce_to_messages_list(traj)
5353

5454
# 输入有效性检查

tutorial/example_deep_finance/judge/grounding/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def create_default_model(
8080

8181
return OpenAIChatModel(**kwargs)
8282

83-
async def aevaluate(
83+
async def _aevaluate(
8484
self,
8585
traj: Any,
8686
**_: Any,

tutorial/example_deep_finance/judge/presentation_quality/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def create_default_model(
8383

8484
return OpenAIChatModel(**kwargs)
8585

86-
async def aevaluate(
86+
async def _aevaluate(
8787
self,
8888
report_content: str,
8989
user_query: str | None = None,

tutorial/example_deep_finance/judge/traceability/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
super().__init__(name=name, **kwargs)
3737
self.model = model
3838

39-
async def aevaluate(self, traj: Any, **kwargs: Any) -> GraderScore:
39+
async def _aevaluate(self, traj: Any, **kwargs: Any) -> GraderScore:
4040
messages = coerce_to_messages_list(traj)
4141

4242
if not messages:

0 commit comments

Comments
 (0)