Skip to content

Commit

Permalink
Add changelog and rename FailedExampleIterator -> SingleLabelClassify…
Browse files Browse the repository at this point in the history
…FailedExampleIterator

Task: IL-367
  • Loading branch information
SebastianNiehusTNG committed Apr 4, 2024
1 parent 44c84cb commit 951e302
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Breaking Changes

### New Features
- feature: Add SingleLabelClassifyFailedExampleIterator for easy retrieval of failed examples.
- feature: Error information is printed to the console on failed runs and evaluations.
- feature: The stack trace of a failed run/evaluation is included in the `FailedExampleRun`/`FailedExampleEvaluation` object
- feature: The `Runner.run_dataset` and `Evaluator.evaluate_run` have an optional flag `abort_on_error` to stop running/evaluating when an error occurs.
Expand Down
10 changes: 4 additions & 6 deletions src/examples/user_journey.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
" ClassifyInput,\n",
" PromptBasedClassify,\n",
" SingleLabelClassifyAggregationLogic,\n",
" SingleLabelClassifyEvaluation,\n",
" SingleLabelClassifyEvaluationLogic,\n",
" SingleLabelClassifyOutput,\n",
")\n",
"import json\n",
"\n",
Expand Down Expand Up @@ -319,10 +317,11 @@
"metadata": {},
"outputs": [],
"source": [
"from intelligence_layer.use_cases.classify.classify import (\n",
" SingleLabelClassifyFailedExampleIterator,\n",
")\n",
"\n",
"from intelligence_layer.use_cases.classify.classify import FailedExampleIterator\n",
"\n",
"failed_example_iterator = FailedExampleIterator(\n",
"failed_example_iterator = SingleLabelClassifyFailedExampleIterator(\n",
" dataset_repository, run_repository, evaluation_repository\n",
")\n",
"list(failed_example_iterator.get_examples(eval_overview.id))"
Expand Down Expand Up @@ -509,7 +508,6 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"list(failed_example_iterator.get_examples(eval_overview_prompt_adjusted.id))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/use_cases/classify/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def do_evaluate_single_output(
)


class FailedExampleIterator:
class SingleLabelClassifyFailedExampleIterator:
def __init__(
self,
dataset_repository: DatasetRepository,
Expand Down

0 comments on commit 951e302

Please sign in to comment.