pydantic-evals 0.4.3__tar.gz → 0.4.4__tar.gz
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.
Potentially problematic release.
This version of pydantic-evals might be problematic. Click here for more details.
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/PKG-INFO +8 -8
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/README.md +5 -5
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/generation.py +2 -2
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pyproject.toml +4 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/.gitignore +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/LICENSE +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/__init__.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/_utils.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/dataset.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/__init__.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/_run_evaluator.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/_spec.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/common.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/context.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/evaluator.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/evaluators/llm_as_a_judge.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/otel/__init__.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/otel/_context_in_memory_span_exporter.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/otel/_context_subtree.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/otel/_errors.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/otel/span_tree.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/py.typed +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/reporting/__init__.py +0 -0
- {pydantic_evals-0.4.3 → pydantic_evals-0.4.4}/pydantic_evals/reporting/render_numbers.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-evals
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
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
|
|
7
7
|
Project-URL: Documentation, https://ai.pydantic.dev/evals
|
|
8
8
|
Project-URL: Changelog, https://github.com/pydantic/pydantic-ai/releases
|
|
9
|
-
Author-email: David Montague <david@pydantic.dev>
|
|
9
|
+
Author-email: Samuel Colvin <samuel@pydantic.dev>, Marcelo Trylesinski <marcelotryle@gmail.com>, David Montague <david@pydantic.dev>, Alex Hall <alex@pydantic.dev>, Douwe Maan <douwe@pydantic.dev>
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -32,7 +32,7 @@ Requires-Python: >=3.9
|
|
|
32
32
|
Requires-Dist: anyio>=0
|
|
33
33
|
Requires-Dist: eval-type-backport>=0; python_version < '3.11'
|
|
34
34
|
Requires-Dist: logfire-api>=1.2.0
|
|
35
|
-
Requires-Dist: pydantic-ai-slim==0.4.
|
|
35
|
+
Requires-Dist: pydantic-ai-slim==0.4.4
|
|
36
36
|
Requires-Dist: pydantic>=2.10
|
|
37
37
|
Requires-Dist: pyyaml>=6.0.2
|
|
38
38
|
Requires-Dist: rich>=13.9.4
|
|
@@ -51,18 +51,18 @@ Description-Content-Type: text/markdown
|
|
|
51
51
|
This is a library for evaluating non-deterministic (or "stochastic") functions in Python. It provides a simple,
|
|
52
52
|
Pythonic interface for defining and running stochastic functions, and analyzing the results of running those functions.
|
|
53
53
|
|
|
54
|
-
While this library is developed as part of [
|
|
54
|
+
While this library is developed as part of [Pydantic AI](https://ai.pydantic.dev), it only uses Pydantic AI for a small
|
|
55
55
|
subset of generative functionality internally, and it is designed to be used with arbitrary "stochastic function"
|
|
56
|
-
implementations. In particular, it can be used with other (non-
|
|
56
|
+
implementations. In particular, it can be used with other (non-Pydantic AI) AI libraries, agent frameworks, etc.
|
|
57
57
|
|
|
58
|
-
As with
|
|
58
|
+
As with Pydantic AI, this library prioritizes type safety and use of common Python syntax over esoteric, domain-specific
|
|
59
59
|
use of Python syntax.
|
|
60
60
|
|
|
61
61
|
Full documentation is available at [ai.pydantic.dev/evals](https://ai.pydantic.dev/evals).
|
|
62
62
|
|
|
63
63
|
## Example
|
|
64
64
|
|
|
65
|
-
While you'd typically use Pydantic Evals with more complex functions (such as
|
|
65
|
+
While you'd typically use Pydantic Evals with more complex functions (such as Pydantic AI agents or graphs), here's a
|
|
66
66
|
quick example that evaluates a simple function against a test case using both custom and built-in evaluators:
|
|
67
67
|
|
|
68
68
|
```python
|
|
@@ -110,7 +110,7 @@ report.print(include_input=True, include_output=True)
|
|
|
110
110
|
"""
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Using the library with more complex functions, such as
|
|
113
|
+
Using the library with more complex functions, such as Pydantic AI agents, is similar — all you need to do is define a
|
|
114
114
|
task function wrapping the function you want to evaluate, with a signature that matches the inputs and outputs of your
|
|
115
115
|
test cases.
|
|
116
116
|
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
This is a library for evaluating non-deterministic (or "stochastic") functions in Python. It provides a simple,
|
|
10
10
|
Pythonic interface for defining and running stochastic functions, and analyzing the results of running those functions.
|
|
11
11
|
|
|
12
|
-
While this library is developed as part of [
|
|
12
|
+
While this library is developed as part of [Pydantic AI](https://ai.pydantic.dev), it only uses Pydantic AI for a small
|
|
13
13
|
subset of generative functionality internally, and it is designed to be used with arbitrary "stochastic function"
|
|
14
|
-
implementations. In particular, it can be used with other (non-
|
|
14
|
+
implementations. In particular, it can be used with other (non-Pydantic AI) AI libraries, agent frameworks, etc.
|
|
15
15
|
|
|
16
|
-
As with
|
|
16
|
+
As with Pydantic AI, this library prioritizes type safety and use of common Python syntax over esoteric, domain-specific
|
|
17
17
|
use of Python syntax.
|
|
18
18
|
|
|
19
19
|
Full documentation is available at [ai.pydantic.dev/evals](https://ai.pydantic.dev/evals).
|
|
20
20
|
|
|
21
21
|
## Example
|
|
22
22
|
|
|
23
|
-
While you'd typically use Pydantic Evals with more complex functions (such as
|
|
23
|
+
While you'd typically use Pydantic Evals with more complex functions (such as Pydantic AI agents or graphs), here's a
|
|
24
24
|
quick example that evaluates a simple function against a test case using both custom and built-in evaluators:
|
|
25
25
|
|
|
26
26
|
```python
|
|
@@ -68,7 +68,7 @@ report.print(include_input=True, include_output=True)
|
|
|
68
68
|
"""
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Using the library with more complex functions, such as
|
|
71
|
+
Using the library with more complex functions, such as Pydantic AI agents, is similar — all you need to do is define a
|
|
72
72
|
task function wrapping the function you want to evaluate, with a signature that matches the inputs and outputs of your
|
|
73
73
|
test cases.
|
|
74
74
|
|
|
@@ -47,7 +47,7 @@ async def generate_dataset(
|
|
|
47
47
|
path: Optional path to save the generated dataset. If provided, the dataset will be saved to this location.
|
|
48
48
|
dataset_type: The type of dataset to generate, with the desired input, output, and metadata types.
|
|
49
49
|
custom_evaluator_types: Optional sequence of custom evaluator classes to include in the schema.
|
|
50
|
-
model: The
|
|
50
|
+
model: The Pydantic AI model to use for generation. Defaults to 'gpt-4o'.
|
|
51
51
|
n_examples: Number of examples to generate. Defaults to 3.
|
|
52
52
|
extra_instructions: Optional additional instructions to provide to the LLM.
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ async def generate_dataset(
|
|
|
59
59
|
"""
|
|
60
60
|
output_schema = dataset_type.model_json_schema_with_evaluators(custom_evaluator_types)
|
|
61
61
|
|
|
62
|
-
# TODO(DavidM): Update this once we add better response_format and/or ResultTool support to
|
|
62
|
+
# TODO(DavidM): Update this once we add better response_format and/or ResultTool support to Pydantic AI
|
|
63
63
|
agent = Agent(
|
|
64
64
|
model,
|
|
65
65
|
system_prompt=(
|
|
@@ -15,7 +15,11 @@ name = "pydantic-evals"
|
|
|
15
15
|
dynamic = ["version", "dependencies"]
|
|
16
16
|
description = "Framework for evaluating stochastic code execution, especially code making use of LLMs"
|
|
17
17
|
authors = [
|
|
18
|
+
{ name = "Samuel Colvin", email = "samuel@pydantic.dev" },
|
|
19
|
+
{ name = "Marcelo Trylesinski", email = "marcelotryle@gmail.com" },
|
|
18
20
|
{ name = "David Montague", email = "david@pydantic.dev" },
|
|
21
|
+
{ name = "Alex Hall", email = "alex@pydantic.dev" },
|
|
22
|
+
{ name = "Douwe Maan", email = "douwe@pydantic.dev" },
|
|
19
23
|
]
|
|
20
24
|
license = "MIT"
|
|
21
25
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|