Skip to content
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

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

dorisjoy
Copy link
Contributor

Currently this test will fail in python version >= 3.11, the reason is because:
image
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."

Copy link

promptflow SDK CLI Azure E2E Test Result users/gega/fixUT

  4 files    4 suites   5m 0s ⏱️
238 tests 203 ✅  35 💤 0 ❌
952 runs  812 ✅ 140 💤 0 ❌

Results for commit 241cada.

Copy link

promptflow-core test result

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 241cada.

Copy link

SDK CLI Global Config Test Result users/gega/fixUT

5 tests   5 ✅  1m 18s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 241cada.

Copy link

Executor Unit Test Result users/gega/fixUT

792 tests   792 ✅  3m 41s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 241cada.

Copy link

Executor E2E Test Result users/gega/fixUT

241 tests   236 ✅  5m 12s ⏱️
  1 suites    5 💤
  1 files      0 ❌

Results for commit 241cada.

Copy link

SDK CLI Test Result users/gega/fixUT

    4 files      4 suites   58m 22s ⏱️
  663 tests   650 ✅ 13 💤 0 ❌
2 652 runs  2 600 ✅ 52 💤 0 ❌

Results for commit 241cada.

@dorisjoy dorisjoy merged commit 6f2759c into main Apr 26, 2024
52 checks passed
@dorisjoy dorisjoy deleted the users/gega/fixUT branch April 26, 2024 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants