-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test_retrieve_tool_func_result_error failure in python version >= 3.11 #3017
Conversation
promptflow SDK CLI Azure E2E Test Result users/gega/fixUT 4 files 4 suites 5m 0s ⏱️ Results for commit 241cada. |
promptflow-core test result0 tests 0 ✅ 0s ⏱️ Results for commit 241cada. |
SDK CLI Global Config Test Result users/gega/fixUT5 tests 5 ✅ 1m 18s ⏱️ Results for commit 241cada. |
Executor Unit Test Result users/gega/fixUT792 tests 792 ✅ 3m 41s ⏱️ Results for commit 241cada. |
Executor E2E Test Result users/gega/fixUT241 tests 236 ✅ 5m 12s ⏱️ Results for commit 241cada. |
SDK CLI Test Result users/gega/fixUT 4 files 4 suites 58m 22s ⏱️ Results for commit 241cada. |
Currently this test will fail in python version >= 3.11, the reason is because:
So the error message in python version >= 3.11 will be:
'Unable to retrieve tool func result due to 'ToolFuncCallScenario ToolFuncCallScenario.REVERSE_GENERATED_BY response must be a dict. {"index_type": "Azure Cognitive Search", "index": "index_1"} is not a dict.'. \nPlease contact the tool author/support team for troubleshooting assistance.'
But in the python version < 3.11, the error message will be:
'Unable to retrieve tool func result due to 'ToolFuncCallScenario reverse_generated_by response must be a dict. {"index_type": "Azure Cognitive Search", "index": "index_1"} is not a dict.'. \nPlease contact the tool author/support team for troubleshooting assistance.'
In order to keep the test stable in different python environment, so change the error message from:
f"ToolFuncCallScenario {func_call_scenario} response must be a dict. " f"{result} is not a dict."
to
f"ToolFuncCallScenario {func_call_scenario.value} response must be a dict. " f"{result} is not a dict."