Benign python 123,676 installs Download

pydantic-evals 2.6.0

“Agent Framework / shim to use Pydantic with LLMs”

setup() call followed by other codeBundled Python dependency library path
SHA-2565345625469dfe969720567ca2e9a1ad16e1b974a6178e7d70dcb0d514ea847d6
MaleculeO(As)H(Db)

Evidence

Hex decoding via int(x, 16) _otel_emit.py · lines 115–120
115:16… erence is None:
116 return None
117 try:
118 trace_id = int(span_reference.trace_id, 16)
119 span_id = int(span_reference.span_id, 16)
120 except ValueError: # pragma: no cover — d …
Handles a missing-module ImportError online.py · lines 1–48
1"""Online evaluation — attach evaluators to live functions for automatic background evaluation.
2
3This module provides the infrastructure for running evaluators on production (or staging) traffic.
4The same `Evaluator` instances used with `Dataset.evaluate()` work here, the difference is in how
5they are wired up (decorator vs dataset) rather than what they are.
6
7Example:
8```python
9from dataclasses import dataclass
10
11from pydantic_evals.evaluators import Evaluator, EvaluatorContext
12from pydantic_evals.online import evaluate
13
14
⋯12 lines
27from __future__ import annotations
28
29import asyncio
30import functools
31import inspect
32import threading
33from collections.abc import Awaitable, Callable, Generator, Iterable, Sequence
34from contextlib import contextmanager
35from dataclasses import dataclass
36from typing import Any, Literal, Protocol
37
38import anyio
39from opentelemetry import trace
40from typing_extensions import LiteralString, ParamSpec, TypeVar
41
42from . import _online as _online_internal, _task_run
43from ._online import CallbackSink, EvaluationSink, SinkPayload
44from ._utils import UNSET, Unset, logfire_span
45from .evaluators._run_evaluator import run_evaluator
46from .evaluators.context import EvaluatorContext
47from .evaluators.evaluator import EvaluationResult, Evaluator, EvaluatorFailure
48
Explicit LLM or language-model reference online.py · lines 195–203
195:67… heuristic should
196 run on 100% of traffic while an expensive LLM judge might run on only 1%.
197 """
198
⋯5 lines
Python for-range-over-len(X) loop online.py · lines 323–329
323:48… s):
324 tg.start_soon(_run, i, evaluator)
325
326 for i in range(len(evaluators)):
327 result = results_by_index[i]
328 if isinstance(result, EvaluatorFailure):
329 all_failures.ap …
Python getattr dynamic attribute lookup online.py · lines 381–384
381:47… following `@logfire.instrument`'s convention."""
382 qualname = getattr(func, '__qualname__', getattr(func, '__name__', repr(func)))
383 module = inspect.getmodule(func)
384 module_name = getattr(mod …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.