Skip to content

Commit fbf62b6

Browse files
authored
Evaluation: Fix evaluate API failure when trace.destination is set to none (Azure#38023)
* Handle the case where the customer manually run "pf config set trace.destination=none" * fix the black issue * update changelog
1 parent 5c3c178 commit fbf62b6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sdk/evaluation/azure-ai-evaluation/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Bugs Fixed
1212
- Non adversarial simulator works with `gpt-4o` models using the `json_schema` response format
13+
- Fix evaluate API failure when `trace.destination` is set to `none`
1314

1415
### Other Changes
1516
- Improved error messages for the `evaluate` API by enhancing the validation of input parameters. This update provides more detailed and actionable error descriptions.

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ def _evaluate( # pylint: disable=too-many-locals,too-many-statements
690690
)
691691

692692
trace_destination: Optional[str] = pf_client._config.get_trace_destination() # pylint: disable=protected-access
693+
694+
# Handle the case where the customer manually run "pf config set trace.destination=none"
695+
if trace_destination and trace_destination.lower() == "none":
696+
trace_destination = None
697+
693698
target_run: Optional[Run] = None
694699

695700
# Create default configuration for evaluators that directly maps

0 commit comments

Comments
 (0)