File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/judgeval/data/datasets Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 5
5
import os
6
6
import yaml
7
7
from dataclasses import dataclass , field
8
- from typing import List , Union , Literal
8
+ from typing import List , Union , Literal , Optional
9
9
10
10
from judgeval .data import Example , Trace
11
11
from judgeval .common .logger import debug , error , warning , info
@@ -21,14 +21,13 @@ class EvalDataset:
21
21
def __init__ (self ,
22
22
judgment_api_key : str = os .getenv ("JUDGMENT_API_KEY" ),
23
23
organization_id : str = os .getenv ("JUDGMENT_ORG_ID" ),
24
- examples : List [Example ] = [] ,
25
- traces : List [Trace ] = []
24
+ examples : Optional [ List [Example ]] = None ,
25
+ traces : Optional [ List [Trace ]] = None
26
26
):
27
- debug (f"Initializing EvalDataset with { len (examples )} examples" )
28
27
if not judgment_api_key :
29
28
warning ("No judgment_api_key provided" )
30
- self .examples = examples
31
- self .traces = traces
29
+ self .examples = examples or []
30
+ self .traces = traces or []
32
31
self ._alias = None
33
32
self ._id = None
34
33
self .judgment_api_key = judgment_api_key
You can’t perform that action at this time.
0 commit comments