You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Unable to push empty dataset to Confident AI, there must be at least one test case or golden in dataset"
556
-
)
553
+
ifauto_convert_test_cases_to_goldensisFalse:
554
+
iflen(self.goldens) ==0:
555
+
raiseValueError(
556
+
"Unable to push empty dataset to Confident AI, there must be at least one golden in dataset. To include test cases, set 'auto_convert_test_cases_to_goldens' to True."
Copy file name to clipboardExpand all lines: docs/docs/confident-ai-evaluation-dataset-management.mdx
+27-14
Original file line number
Diff line number
Diff line change
@@ -34,16 +34,20 @@ Alternatively, you can also choose to upload entire datasets from CSV files. Sim
34
34
35
35
Pushing an `EvaluationDataset` on Confident using `deepeval` is a two-step process:
36
36
37
-
1. Create a dataset locally (same as how you would create a dataset as shown in the [datasets section](evaluation-datasets))
38
-
2. Push the created dataset to Confident
37
+
1. Create a dataset locally (same as how you would create a dataset as shown in the [datasets section](evaluation-datasets)).
38
+
2. Populate it with `Golden`s.
39
+
3. Push the new dataset to Confident AI.
40
+
41
+
:::warning
42
+
Although you can also populate an `EvaluationDataset` with `LLMTestCase`s, we **HIGHLY** recommend that you do it with `Golden`s instead as it is more flexible to work with when dealing with datasets.
43
+
:::
39
44
40
45
### Create A Dataset Locally
41
46
42
-
Here's a quick example:
47
+
Here's a quick example of populating an `EvaluationDataset` with `Golden`s before pushing it to Confident AI:
43
48
44
49
```python
45
-
from deepeval.test_case import LLMTestCase
46
-
from deepeval.dataset import EvaluationDataset
50
+
from deepeval.dataset import EvaluationDataset, Golden
After creating your `EvaluationDataset`, all you have to do is push it to Confident by providing an `alias` as an unique identifier:
93
+
After creating your `EvaluationDataset`, all you have to do is push it to Confident by providing an `alias` as an unique identifier. When you push an `EvaluationDataset`, the data is being uploaded as `Golden`s, **NOT**`LLMTestCase`s:
90
94
91
95
```python
96
+
...
97
+
92
98
# Provide an alias when pushing a dataset
93
99
dataset.push(alias="My Confident Dataset")
94
100
```
95
101
96
-
:::tip Did you know?
97
-
You can choose to overwrite or append to an existing dataset if an existing dataset with the same alias already exist.
102
+
The `push()` method will upload all `Goldens` found in your dataset to Confident AI, ignoring any `LLMTestCase`s. If you wish to also include `LLMTestCase`s in the push, you can set the `auto_convert_test_cases_to_goldens` parameter to `True`:
0 commit comments