pydantic-evals 1.1.0__py3-none-any.whl → 1.2.0__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.
- pydantic_evals/generation.py +3 -1
- {pydantic_evals-1.1.0.dist-info → pydantic_evals-1.2.0.dist-info}/METADATA +2 -2
- {pydantic_evals-1.1.0.dist-info → pydantic_evals-1.2.0.dist-info}/RECORD +5 -5
- {pydantic_evals-1.1.0.dist-info → pydantic_evals-1.2.0.dist-info}/WHEEL +0 -0
- {pydantic_evals-1.1.0.dist-info → pydantic_evals-1.2.0.dist-info}/licenses/LICENSE +0 -0
pydantic_evals/generation.py
CHANGED
|
@@ -14,6 +14,7 @@ from pydantic import ValidationError
|
|
|
14
14
|
from typing_extensions import TypeVar
|
|
15
15
|
|
|
16
16
|
from pydantic_ai import Agent, models
|
|
17
|
+
from pydantic_ai._utils import strip_markdown_fences
|
|
17
18
|
from pydantic_evals import Dataset
|
|
18
19
|
from pydantic_evals.evaluators.evaluator import Evaluator
|
|
19
20
|
|
|
@@ -73,8 +74,9 @@ async def generate_dataset(
|
|
|
73
74
|
)
|
|
74
75
|
|
|
75
76
|
result = await agent.run(extra_instructions or 'Please generate the object.')
|
|
77
|
+
output = strip_markdown_fences(result.output)
|
|
76
78
|
try:
|
|
77
|
-
result = dataset_type.from_text(
|
|
79
|
+
result = dataset_type.from_text(output, fmt='json', custom_evaluator_types=custom_evaluator_types)
|
|
78
80
|
except ValidationError as e: # pragma: no cover
|
|
79
81
|
print(f'Raw response from model:\n{result.output}')
|
|
80
82
|
raise e
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-evals
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Framework for evaluating stochastic code execution, especially code making use of LLMs
|
|
5
5
|
Project-URL: Homepage, https://ai.pydantic.dev/evals
|
|
6
6
|
Project-URL: Source, https://github.com/pydantic/pydantic-ai
|
|
@@ -30,7 +30,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
30
30
|
Requires-Python: >=3.10
|
|
31
31
|
Requires-Dist: anyio>=0
|
|
32
32
|
Requires-Dist: logfire-api>=3.14.1
|
|
33
|
-
Requires-Dist: pydantic-ai-slim==1.
|
|
33
|
+
Requires-Dist: pydantic-ai-slim==1.2.0
|
|
34
34
|
Requires-Dist: pydantic>=2.10
|
|
35
35
|
Requires-Dist: pyyaml>=6.0.2
|
|
36
36
|
Requires-Dist: rich>=13.9.4
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pydantic_evals/__init__.py,sha256=OKRbfhdc8UZPzrPJMZUQwvzIxLhXmEZxz1ZuD921fy4,839
|
|
2
2
|
pydantic_evals/_utils.py,sha256=1muGTc2zqjwxqngz6quRSLoZM88onjp0Xgt-a9n2aPQ,4111
|
|
3
3
|
pydantic_evals/dataset.py,sha256=hX9wrBvbWha1RLomaBY_mzKudWWKMT9doj8VPH8NflU,50437
|
|
4
|
-
pydantic_evals/generation.py,sha256=
|
|
4
|
+
pydantic_evals/generation.py,sha256=Qy03z7vGvE14cUBsqjorEx7Ar1KkR7Fb5SItZB429fc,3715
|
|
5
5
|
pydantic_evals/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
pydantic_evals/evaluators/__init__.py,sha256=E_JT6o96Ef-oS_IZ1Hyy95NRLwz7EOHewp-o13IdXEM,1032
|
|
7
7
|
pydantic_evals/evaluators/_run_evaluator.py,sha256=uGmH67gCTeF9BSprCiBC4DtKEpKLrKYaXgsAQiCbCLY,3630
|
|
@@ -17,7 +17,7 @@ pydantic_evals/otel/_errors.py,sha256=aW1414eTofpA7R_DUgOeT-gj7YA6OXmm8Y4oYeFukD
|
|
|
17
17
|
pydantic_evals/otel/span_tree.py,sha256=RzX4VGpEqc2QUhkyxMTXtBRo5yHHO1c0hI7QJJuiXPU,23043
|
|
18
18
|
pydantic_evals/reporting/__init__.py,sha256=702W2BjMiXhKQz6T4sor6Zi2SjYTDQypCvealJrwTFA,54067
|
|
19
19
|
pydantic_evals/reporting/render_numbers.py,sha256=8SKlK3etbD7HnSWWHCE993ceCNLZCepVQ-SsqUIhyxk,6916
|
|
20
|
-
pydantic_evals-1.
|
|
21
|
-
pydantic_evals-1.
|
|
22
|
-
pydantic_evals-1.
|
|
23
|
-
pydantic_evals-1.
|
|
20
|
+
pydantic_evals-1.2.0.dist-info/METADATA,sha256=G5Po3b1bvaxW3r0Mm240t4KIhRJLneDYWuxX5nexq9Q,7844
|
|
21
|
+
pydantic_evals-1.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
22
|
+
pydantic_evals-1.2.0.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
|
|
23
|
+
pydantic_evals-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|