Skip to content

Release/promptflow/1.1.0 #4026

Release/promptflow/1.1.0

Release/promptflow/1.1.0 #4026

GitHub Actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++) failed Nov 30, 2023 in 0s

9 errors, 26 fail, 1 skipped, 515 pass in 45s

    1 files  ±  0      1 suites  ±0   45s ⏱️ -4s
551 tests  - 26  515 ✔️  - 55  1 💤  - 6  26 +26    9 🔥 +  9 
557 runs   - 20  515 ✔️  - 55  1 💤  - 6  26 +26  15 🔥 +15 

Results for commit d3c1fae. ± Comparison against earlier commit ce10e46.

Annotations

Check failure on line 0 in /

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

tests.executor.unittests._core.test_api_injector with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
collection failure
collection failure
collection failure
collection failure
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/_core/test_api_injector.py:22: in <module>
    from promptflow.tools.aoai import AzureOpenAI
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/_core/test_api_injector.py:22: in <module>
    from promptflow.tools.aoai import AzureOpenAI
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/_core/test_api_injector.py:22: in <module>
    from promptflow.tools.aoai import AzureOpenAI
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/_core/test_api_injector.py:22: in <module>
    from promptflow.tools.aoai import AzureOpenAI
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

Check failure on line 0 in /

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

tests.executor.unittests.executor.test_flow_executor with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
collection failure
collection failure
collection failure
collection failure
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/executor/test_flow_executor.py:15: in <module>
    from promptflow.tools.aoai import chat, completion
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/executor/test_flow_executor.py:15: in <module>
    from promptflow.tools.aoai import chat, completion
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/executor/test_flow_executor.py:15: in <module>
    from promptflow.tools.aoai import chat, completion
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: in <module>
    from openai import AzureOpenAI as AzureOpenAIClient
E   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
src/promptflow/tests/executor/unittests/executor/test_flow_executor.py:15: in <module>
    from promptflow.tools.aoai import chat, completion
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: in <module>
    raise Exception(
E   Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

Check warning on line 0 in tests.executor.unittests.contracts.test_flow.TestFlowContract

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_flow_get_connection_names[web_classification-expected_connection_names0] (tests.executor.unittests.contracts.test_flow.TestFlowContract) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'fetch_url': FlowInputAssignment(value='url', value_type=...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.contracts.test_flow.TestFlowContract object at 0x7f18c12b6940>
flow_folder = 'web_classification'
expected_connection_names = {'azure_open_ai_connection'}

    @pytest.mark.parametrize(
        "flow_folder, expected_connection_names",
        [
            ("web_classification", {"azure_open_ai_connection"}),
            ("basic-with-connection", {"azure_open_ai_connection"}),
            ("flow_with_dict_input_with_variant", {"mock_custom_connection"}),
        ],
    )
    def test_flow_get_connection_names(self, flow_folder, expected_connection_names):
        flow_yaml = get_yaml_file(flow_folder)
>       flow = Flow.from_yaml(flow_yaml)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/contracts/test_flow.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'fetch_url': FlowInputAssignment(value='url', value_type=...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule

Check warning on line 0 in tests.executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_generate_tool_meta_dict_by_file[prompt_tools-summarize_text_content_prompt.jinja2-llm] (tests.executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
AssertionError: Call cd_and_run failed:
  (Exception) Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
assert False
 +  where False = isinstance('(Exception) Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.', dict)
self = <executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils object at 0x7f830ca35700>
flow_dir = 'prompt_tools', tool_path = 'summarize_text_content_prompt.jinja2'
tool_type = 'llm'

    @pytest.mark.parametrize(
        "flow_dir, tool_path, tool_type",
        [
            ("prompt_tools", "summarize_text_content_prompt.jinja2", "prompt"),
            ("prompt_tools", "summarize_text_content_prompt.jinja2", "llm"),
            ("script_with_import", "dummy_utils/main.py", "python"),
            ("script_with___file__", "script_with___file__.py", "python"),
            ("script_with_special_character", "script_with_special_character.py", "python"),
        ],
    )
    def test_generate_tool_meta_dict_by_file(self, flow_dir, tool_path, tool_type):
        wd = str((FLOW_ROOT / flow_dir).resolve())
        meta_dict = generate_tool_meta_dict_by_file_with_cd(wd, tool_path, tool_type, cd_and_run)
>       assert isinstance(meta_dict, dict), "Call cd_and_run failed:\n" + meta_dict
E       AssertionError: Call cd_and_run failed:
E         (Exception) Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
E       assert False
E        +  where False = isinstance('(Exception) Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.', dict)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py:84: AssertionError

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_diff_type (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c72bf10>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_invalid_type (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c811eb0>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_invalid_source_type (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c811c70>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_no_source (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c811940>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_custom_llm_meta[ReservedVariableCannotBeUsed] (tests.executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests._utils.test_generate_tool_meta_utils.TestToolMetaUtils object at 0x7f830c5a2160>
content = '{{max_tokens}}'
error_code = <class 'promptflow._core.tool_meta_generator.ReservedVariableCannotBeUsed'>
message = "Generate tool meta failed for llm tool. Jinja parsing failed: Variable name 'max_tokens' is a reserved name by llm tools, please change to another name."

    @pytest.mark.parametrize(
        "content, error_code, message",
        [
            pytest.param(
                "{% zzz",
                JinjaParsingError,
                "Generate tool meta failed for llm tool. Jinja parsing failed at line 1: "
                "(TemplateSyntaxError) Encountered unknown tag 'zzz'.",
                id="JinjaParsingError_Code",
            ),
            pytest.param(
                "no_end.jinja2",
                JinjaParsingError,
                "Generate tool meta failed for llm tool. Jinja parsing failed at line 2: "
                "(TemplateSyntaxError) Unexpected end of template. Jinja was looking for the following tags: "
                "'endfor' or 'else'. The innermost block that needs to be closed is 'for'.",
                id="JinjaParsingError_File",
            ),
            pytest.param(
                "{{max_tokens}}",
                ReservedVariableCannotBeUsed,
                "Generate tool meta failed for llm tool. Jinja parsing failed: "
                "Variable name 'max_tokens' is a reserved name by llm tools, please change to another name.",
                id="ReservedVariableCannotBeUsed",
            ),
        ],
    )
    def test_custom_llm_meta(self, content, error_code, message) -> None:
        if content.endswith(".jinja2"):
            with open(TOOLS_ROOT / content, "r") as f:
                code = f.read()
        else:
            code = content
        with pytest.raises(error_code) as ex:
>           generate_prompt_meta("some_tool", code)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py:234: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_core/tool_meta_generator.py:286: in generate_prompt_meta
    return json.dumps(generate_prompt_meta_dict(name, content, prompt_only, source), indent=2)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_core/tool_meta_generator.py:102: in generate_prompt_meta_dict
    return asdict_without_none(generate_prompt_tool(name, content, prompt_only, source))
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_core/tool_meta_generator.py:67: in generate_prompt_tool
    import promptflow.tools  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_no_source_path (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c9175b0>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_line_execution_process_pool[web_classification_no_variants] (tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool object at 0x7f830bd68460>
flow_folder = 'web_classification_no_variants'
dev_connections = {'azure_content_safety_config': {'module': 'promptflow.connections', 'type': 'AzureContentSafetyConnection', 'value': ...e': 'promptflow.connections', 'type': 'BingConnection', 'value': {'api_key': '72749e712d074ce28a018b0ed1ba90ca'}}, ...}

    @pytest.mark.parametrize(
        "flow_folder",
        [
            SAMPLE_FLOW,
        ],
    )
    def test_line_execution_process_pool(self, flow_folder, dev_connections):
        log_path = str(Path(mkdtemp()) / "test.log")
        log_context_initializer = LogContext(log_path).get_initializer()
        log_context = log_context_initializer()
        with log_context:
>           executor = FlowExecutor.create(get_yaml_file(flow_folder), dev_connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/flow_executor.py:200: in create
    flow = Flow.from_yaml(flow_file, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_duplicated_inputs (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917370>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check failure on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_tool_by_node_with_invalid_template (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) with error

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
failed on setup with "Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai."
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917d30>

    @pytest.fixture
    def resolver(self):
>       return ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_ensure_node_inputs_type (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917640>

    def test_ensure_node_inputs_type(self):
        # Case 1: conn_name not in connections, should raise conn_name not found error
        tool = Tool(name="mock", type="python", inputs={"conn": InputDefinition(type=["CustomConnection"])})
        node = Node(
            name="mock",
            tool=tool,
            inputs={"conn": InputAssignment(value="conn_name", value_type=InputValueType.LITERAL)},
        )
        connections = {}
        with pytest.raises(ConnectionNotFound):
>           tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_llm_connection_to_inputs (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917dc0>

    def test_resolve_llm_connection_to_inputs(self):
        # Case 1: node.connection is not specified
        tool = Tool(name="mock", type="python", inputs={"conn": InputDefinition(type=["CustomConnection"])})
        node = Node(
            name="mock",
            tool=tool,
            inputs={"conn": InputAssignment(value="conn_name", value_type=InputValueType.LITERAL)},
        )
        connections = {"conn_name": {"type": "AzureOpenAIConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
        with pytest.raises(ConnectionNotFound):
>           tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_line_execution_not_completed[web_classification_no_variants] (tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool object at 0x7f830bc03640>
flow_folder = 'web_classification_no_variants'
dev_connections = {'azure_content_safety_config': {'module': 'promptflow.connections', 'type': 'AzureContentSafetyConnection', 'value': ...e': 'promptflow.connections', 'type': 'BingConnection', 'value': {'api_key': '72749e712d074ce28a018b0ed1ba90ca'}}, ...}

    @pytest.mark.parametrize(
        "flow_folder",
        [
            SAMPLE_FLOW,
        ],
    )
    def test_line_execution_not_completed(self, flow_folder, dev_connections):
>       executor = FlowExecutor.create(
            get_yaml_file(flow_folder),
            dev_connections,
            line_timeout_sec=1,
        )

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:111: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/flow_executor.py:200: in create
    flow = Flow.from_yaml(flow_file, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_llm_node (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917a60>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc773090f10>

    def test_resolve_llm_node(self, mocker):
        def mock_llm_api_func(prompt: PromptTemplate, **kwargs):
            from promptflow.tools.template_rendering import render_template_jinja2
    
            return render_template_jinja2(prompt, **kwargs)
    
        tool_loader = ToolLoader(working_dir=None)
        tool = Tool(name="mock", type=ToolType.LLM, inputs={"conn": InputDefinition(type=["AzureOpenAIConnection"])})
        mocker.patch.object(tool_loader, "load_tool_for_llm_node", return_value=tool)
    
        mocker.patch(
            "promptflow._core.tools_manager.BuiltinsManager._load_package_tool",
            return_value=(mock_llm_api_func, {"conn": AzureOpenAIConnection}),
        )
    
        connections = {"conn_name": {"type": "AzureOpenAIConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
>       tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:332: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_script_node (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c9177c0>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc773089f40>

    def test_resolve_script_node(self, mocker):
        def mock_python_func(prompt: PromptTemplate, **kwargs):
            from promptflow.tools.template_rendering import render_template_jinja2
    
            return render_template_jinja2(prompt, **kwargs)
    
        tool_loader = ToolLoader(working_dir=None)
        tool = Tool(name="mock", type=ToolType.PYTHON, inputs={"conn": InputDefinition(type=["AzureOpenAIConnection"])})
        mocker.patch.object(tool_loader, "load_tool_for_script_node", return_value=(None, tool))
    
        mocker.patch(
            "promptflow._core.tools_manager.BuiltinsManager._load_tool_from_module",
            return_value=(mock_python_func, {"conn": AzureOpenAIConnection}),
        )
    
        connections = {"conn_name": {"type": "AzureOpenAIConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
>       tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:370: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_exec_line[web_classification_no_variants] (tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool object at 0x7f83035cf250>
flow_folder = 'web_classification_no_variants'
dev_connections = {'azure_content_safety_config': {'module': 'promptflow.connections', 'type': 'AzureContentSafetyConnection', 'value': ...e': 'promptflow.connections', 'type': 'BingConnection', 'value': {'api_key': '72749e712d074ce28a018b0ed1ba90ca'}}, ...}
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f830bab8b80>

    @pytest.mark.parametrize(
        "flow_folder",
        [
            SAMPLE_FLOW,
        ],
    )
    def test_exec_line(self, flow_folder, dev_connections, mocker: MockFixture):
        output_queue = Queue()
>       executor = FlowExecutor.create(
            get_yaml_file(flow_folder),
            dev_connections,
            line_timeout_sec=1,
        )

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:144: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/flow_executor.py:200: in create
    flow = Flow.from_yaml(flow_file, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_resolve_package_node (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c917b50>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc773154370>

    def test_resolve_package_node(self, mocker):
        tool_loader = ToolLoader(working_dir=None)
        tool = Tool(name="mock", type=ToolType.PYTHON, inputs={"conn": InputDefinition(type=["AzureOpenAIConnection"])})
        mocker.patch.object(tool_loader, "load_tool_for_package_node", return_value=tool)
    
        mocker.patch(
            "promptflow._core.tools_manager.BuiltinsManager._load_package_tool",
            return_value=(mock_package_func, {"conn": AzureOpenAIConnection}),
        )
    
        connections = {"conn_name": {"type": "AzureOpenAIConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
>       tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:400: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_integrate_prompt_in_package_node (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c481970>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc7730b1fd0>

    def test_integrate_prompt_in_package_node(self, mocker):
>       tool_resolver = ToolResolver(working_dir=None, connections={})

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:420: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_convert_to_custom_strong_type_connection_value[conn_types0-MyFirstCSTConnection] (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c481d00>
conn_types = ['MyFirstCSTConnection']
expected_type = <class 'executor.unittests.executor.test_tool_resolver.MyFirstCSTConnection'>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc7730932b0>

    @pytest.mark.parametrize(
        "conn_types, expected_type",
        [
            (["MyFirstCSTConnection"], MyFirstCSTConnection),
            (["CustomConnection", "MyFirstCSTConnection"], CustomConnection),
            (["CustomConnection", "MyFirstCSTConnection", "MySecondCSTConnection"], CustomConnection),
            (["MyFirstCSTConnection", "MySecondCSTConnection"], MyFirstCSTConnection),
        ],
    )
    def test_convert_to_custom_strong_type_connection_value(self, conn_types: List[str], expected_type, mocker):
        connections = {"conn_name": {"type": "CustomConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
>       tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:453: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_exec_line_failed_when_line_execution_not_start[web_classification_no_variants] (tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool object at 0x7f83035cf1c0>
flow_folder = 'web_classification_no_variants'
dev_connections = {'azure_content_safety_config': {'module': 'promptflow.connections', 'type': 'AzureContentSafetyConnection', 'value': ...e': 'promptflow.connections', 'type': 'BingConnection', 'value': {'api_key': '72749e712d074ce28a018b0ed1ba90ca'}}, ...}
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f830bc56e50>

    @pytest.mark.parametrize(
        "flow_folder",
        [
            SAMPLE_FLOW,
        ],
    )
    def test_exec_line_failed_when_line_execution_not_start(self, flow_folder, dev_connections, mocker: MockFixture):
        output_queue = Queue()
>       executor = FlowExecutor.create(
            get_yaml_file(flow_folder),
            dev_connections,
            line_timeout_sec=1,
        )

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:170: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/flow_executor.py:200: in create
    flow = Flow.from_yaml(flow_file, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule

Check warning on line 0 in tests.executor.unittests.executor.test_tool_resolver.TestToolResolver

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_convert_to_custom_strong_type_connection_value[conn_types1-CustomConnection] (tests.executor.unittests.executor.test_tool_resolver.TestToolResolver) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

self = <executor.unittests.executor.test_tool_resolver.TestToolResolver object at 0x7fc77c481760>
conn_types = ['CustomConnection', 'MyFirstCSTConnection']
expected_type = <class 'promptflow._sdk.entities._connection.CustomConnection'>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc773075130>

    @pytest.mark.parametrize(
        "conn_types, expected_type",
        [
            (["MyFirstCSTConnection"], MyFirstCSTConnection),
            (["CustomConnection", "MyFirstCSTConnection"], CustomConnection),
            (["CustomConnection", "MyFirstCSTConnection", "MySecondCSTConnection"], CustomConnection),
            (["MyFirstCSTConnection", "MySecondCSTConnection"], MyFirstCSTConnection),
        ],
    )
    def test_convert_to_custom_strong_type_connection_value(self, conn_types: List[str], expected_type, mocker):
        connections = {"conn_name": {"type": "CustomConnection", "value": {"api_key": "mock", "api_base": "mock"}}}
>       tool_resolver = ToolResolver(working_dir=None, connections=connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py:453: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/_tool_resolver.py:49: in __init__
    from promptflow.tools import aoai, openai  # noqa: F401
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

Check warning on line 0 in tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool

See this annotation in the file changed.

@github-actions github-actions / Executor Unit Test Result [release/promptflow/1.1.0](https://github.com/microsoft/promptflow/actions/workflows/promptflow-executor-unit-test.yml?query=branch:release/promptflow/1.1.0++)

test_process_set_environment_variable_successed (tests.executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..
import json
    
    try:
>       from openai import AzureOpenAI as AzureOpenAIClient
E       ImportError: cannot import name 'AzureOpenAI' from 'openai' (/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/openai/__init__.py)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:4: ImportError

During handling of the above exception, another exception occurred:

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
>                   try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:563: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/_utils/utils.py:111: in try_import
    importlib.import_module(module)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/__init__.py:1: in <module>
    from .aoai import AzureOpenAI  # noqa: F401
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import json
    
    try:
        from openai import AzureOpenAI as AzureOpenAIClient
    except Exception:
>       raise Exception(
            "Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.")
E       Exception: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai.

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/promptflow/tools/aoai.py:6: Exception

The above exception was the direct cause of the following exception:

self = <executor.unittests.processpool.test_line_execution_process_pool.TestLineExecutionProcessPool object at 0x7f83035cf7f0>
dev_connections = {'azure_content_safety_config': {'module': 'promptflow.connections', 'type': 'AzureContentSafetyConnection', 'value': ...e': 'promptflow.connections', 'type': 'BingConnection', 'value': {'api_key': '72749e712d074ce28a018b0ed1ba90ca'}}, ...}

    def test_process_set_environment_variable_successed(self, dev_connections):
        os.environ["PF_BATCH_METHOD"] = "spawn"
>       line_execution_process_pool = self.create_line_execution_process_pool(dev_connections)

/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/promptflow/promptflow/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py:55: in create_line_execution_process_pool
    executor = FlowExecutor.create(
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/executor/flow_executor.py:200: in create
    flow = Flow.from_yaml(flow_file, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:639: in from_yaml
    return Flow._from_dict(flow_dag=flow_dag, working_dir=working_dir)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:645: in _from_dict
    flow = Flow.deserialize(flow_dag)
/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:581: in deserialize
    Flow._import_requisites(tools, nodes)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tools = []
nodes = [Node(name='fetch_text_content_from_url', tool=None, inputs={'url': FlowInputAssignment(value='url', value_type=<Input...source=ToolSource(type='code', tool=None, path='convert_to_dict.py'), type=<ToolType.PYTHON: 'python'>, activate=None)]

    @staticmethod
    def _import_requisites(tools, nodes):
        """This function will import tools/nodes required modules to ensure type exists so flow can be executed."""
        try:
            # Import tool modules to ensure register_builtins & registered_connections executed
            for tool in tools:
                if tool.module:
                    try_import(tool.module, f"Import tool {tool.name!r} module {tool.module!r} failed.")
            # Import node provider to ensure register_apis executed so that provider & connection exists.
            for node in nodes:
                if node.module:
                    try_import(node.module, f"Import node {node.name!r} provider module {node.module!r} failed.")
        except Exception as e:
            logger.warning("Failed to import modules...")
>           raise FailedToImportModule(
                message=f"Failed to import modules with error: {str(e)}.", target=ErrorTarget.RUNTIME
            ) from e
E           promptflow.contracts._errors.FailedToImportModule: Failed to import modules with error: Please upgrade your OpenAI package to version 1.0.0 or later using the command: pip install --upgrade openai..

/home/runner/work/promptflow/promptflow/src/promptflow/promptflow/contracts/flow.py:566: FailedToImportModule