Skip to content

Commit 669895b

Browse files
committed
python class fix
1 parent 31d3a54 commit 669895b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/judgeval/data/datasets/dataset.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
import yaml
77
from dataclasses import dataclass, field
8-
from typing import List, Union, Literal
8+
from typing import List, Union, Literal, Optional
99

1010
from judgeval.data import Example, Trace
1111
from judgeval.common.logger import debug, error, warning, info
@@ -21,14 +21,13 @@ class EvalDataset:
2121
def __init__(self,
2222
judgment_api_key: str = os.getenv("JUDGMENT_API_KEY"),
2323
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
2626
):
27-
debug(f"Initializing EvalDataset with {len(examples)} examples")
2827
if not judgment_api_key:
2928
warning("No judgment_api_key provided")
30-
self.examples = examples
31-
self.traces = traces
29+
self.examples = examples or []
30+
self.traces = traces or []
3231
self._alias = None
3332
self._id = None
3433
self.judgment_api_key = judgment_api_key

0 commit comments

Comments
 (0)