Accept JSON string inputs in TaskNavigationEfficiencyEvaluator#46760
Draft
Accept JSON string inputs in TaskNavigationEfficiencyEvaluator#46760
Conversation
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/49b4cbb1-9f56-4652-a887-52e2e282a011 Co-authored-by: m7md7sien <16615690+m7md7sien@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
m7md7sien
May 6, 2026 18:26
View session
slister1001
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of Azure/azureml-assets#4999 to the SDK repo.
TaskNavigationEfficiencyEvaluatoronly acceptedresponse/ground_truthas native Python lists/tuples, so callers passing serialized JSON strings (e.g. from data pipelines) failed validation.Changes
_evaluators/_task_navigation_efficiency/_task_navigation_efficiency.py: At the top of_do_eval, ifresponseorground_truthis astr, attemptjson.loadsand replace the value on success._evaluators/_common/_validators/_task_navigation_efficiency_validator.py: Same fallback at the top ofvalidate_eval_input(the SDK uses a separate validator class, not an inline method like the upstream evaluator).tests/unittests/test_task_navigation_efficiency_evaluators.py: Addedtest_json_stringified_valid_inputscovering the EXACT_MATCH path with JSON-stringified inputs.CHANGELOG.md: Bug fix entry under1.16.7 (Unreleased).On parse failure the original string is left in place so downstream validation surfaces the error as before.
Note: the SDK uses
response/ground_truthparameter names rather thanactions/expected_actionsfrom azureml-assets; keys were adapted accordingly. Nospec.yamlversion bump applies here.