judgeval 0.9.4__py3-none-any.whl → 0.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- judgeval/__init__.py +2 -2
- judgeval/api/__init__.py +30 -92
- judgeval/api/api_types.py +57 -137
- judgeval/constants.py +1 -5
- judgeval/data/__init__.py +1 -3
- judgeval/data/example.py +4 -2
- judgeval/data/judgment_types.py +57 -165
- judgeval/data/result.py +1 -2
- judgeval/data/trace.py +14 -40
- judgeval/dataset/__init__.py +40 -44
- judgeval/evaluation/__init__.py +23 -34
- judgeval/scorers/__init__.py +9 -7
- judgeval/scorers/api_scorer.py +8 -0
- judgeval/scorers/base_scorer.py +0 -1
- judgeval/scorers/judgeval_scorers/api_scorers/__init__.py +2 -10
- judgeval/scorers/judgeval_scorers/api_scorers/answer_correctness.py +2 -2
- judgeval/scorers/judgeval_scorers/api_scorers/answer_relevancy.py +2 -2
- judgeval/scorers/judgeval_scorers/api_scorers/faithfulness.py +2 -2
- judgeval/scorers/judgeval_scorers/api_scorers/instruction_adherence.py +2 -2
- judgeval/scorers/judgeval_scorers/api_scorers/prompt_scorer.py +43 -4
- judgeval/tracer/__init__.py +13 -50
- judgeval/tracer/local_eval_queue.py +2 -2
- judgeval/tracer/processors/__init__.py +1 -1
- judgeval/tracer/utils.py +1 -1
- judgeval/trainer/trainer.py +4 -4
- {judgeval-0.9.4.dist-info → judgeval-0.10.1.dist-info}/METADATA +1 -1
- {judgeval-0.9.4.dist-info → judgeval-0.10.1.dist-info}/RECORD +30 -35
- judgeval/data/trace_run.py +0 -39
- judgeval/scorers/judgeval_scorers/api_scorers/derailment_scorer.py +0 -14
- judgeval/scorers/judgeval_scorers/api_scorers/tool_dependency.py +0 -20
- judgeval/scorers/judgeval_scorers/api_scorers/tool_order.py +0 -27
- judgeval/scorers/trace_api_scorer.py +0 -5
- {judgeval-0.9.4.dist-info → judgeval-0.10.1.dist-info}/WHEEL +0 -0
- {judgeval-0.9.4.dist-info → judgeval-0.10.1.dist-info}/entry_points.txt +0 -0
- {judgeval-0.9.4.dist-info → judgeval-0.10.1.dist-info}/licenses/LICENSE.md +0 -0
@@ -1,20 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
`judgeval` tool dependency scorer
|
3
|
-
"""
|
4
|
-
|
5
|
-
# Internal imports
|
6
|
-
from judgeval.scorers.trace_api_scorer import TraceAPIScorerConfig
|
7
|
-
from judgeval.constants import APIScorerType
|
8
|
-
from typing import Optional, Dict
|
9
|
-
|
10
|
-
|
11
|
-
class ToolDependencyScorer(TraceAPIScorerConfig):
|
12
|
-
kwargs: Optional[Dict] = None
|
13
|
-
|
14
|
-
def __init__(self, threshold: float = 1.0, enable_param_checking: bool = True):
|
15
|
-
super().__init__(threshold=threshold, score_type=APIScorerType.TOOL_DEPENDENCY)
|
16
|
-
self.kwargs = {"enable_param_checking": enable_param_checking}
|
17
|
-
|
18
|
-
@property
|
19
|
-
def __name__(self):
|
20
|
-
return "Tool Dependency"
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
`judgeval` tool order scorer
|
3
|
-
"""
|
4
|
-
|
5
|
-
# Internal imports
|
6
|
-
from judgeval.scorers.trace_api_scorer import TraceAPIScorerConfig
|
7
|
-
from judgeval.constants import APIScorerType
|
8
|
-
from typing import Dict, Any
|
9
|
-
|
10
|
-
|
11
|
-
class ToolOrderScorer(TraceAPIScorerConfig):
|
12
|
-
score_type: APIScorerType = APIScorerType.TOOL_ORDER
|
13
|
-
threshold: float = 1.0
|
14
|
-
exact_match: bool = False
|
15
|
-
|
16
|
-
def model_dump(self, *args, **kwargs) -> Dict[str, Any]:
|
17
|
-
base = super().model_dump(*args, **kwargs)
|
18
|
-
base_fields = set(TraceAPIScorerConfig.model_fields.keys())
|
19
|
-
all_fields = set(self.__class__.model_fields.keys())
|
20
|
-
|
21
|
-
extra_fields = all_fields - base_fields - {"kwargs"}
|
22
|
-
|
23
|
-
base["kwargs"] = {
|
24
|
-
k: getattr(self, k) for k in extra_fields if getattr(self, k) is not None
|
25
|
-
}
|
26
|
-
|
27
|
-
return base
|
File without changes
|
File without changes
|
File without changes
|