Skip to content

Commit ecd9085

Browse files
authored
Remove an unwanted section of the evals docs (#3235)
1 parent 1e1a6d5 commit ecd9085

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

docs/evals/how-to/dataset-serialization.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -450,40 +450,6 @@ evaluators:
450450
- ShortName # Instead of VeryLongDescriptiveEvaluatorName
451451
```
452452
453-
## Advanced: Custom Serialization
454-
455-
Override serialization behavior for complex types:
456-
457-
```python
458-
from dataclasses import dataclass
459-
from typing import Any
460-
461-
from pydantic_evals.evaluators import Evaluator, EvaluatorContext
462-
463-
464-
@dataclass
465-
class ComplexEvaluator(Evaluator):
466-
# Field with complex type
467-
config: dict[str, Any]
468-
469-
def build_serialization_arguments(self) -> dict[str, Any]:
470-
"""Customize how this evaluator is serialized."""
471-
# Only serialize non-default values
472-
args = super().build_serialization_arguments()
473-
474-
# Add custom logic
475-
if 'config' in args:
476-
args['config'] = {
477-
k: v for k, v in args['config'].items()
478-
if v is not None
479-
}
480-
481-
return args
482-
483-
def evaluate(self, ctx: EvaluatorContext) -> bool:
484-
return True
485-
```
486-
487453
## Troubleshooting
488454
489455
### Schema Not Found in IDE

0 commit comments

Comments
 (0)