Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BatchEngine] Chat group poc with batch engine, chat group orchestrator changes #2360

Closed

Conversation

Bixiaodi
Copy link

@Bixiaodi Bixiaodi commented Mar 15, 2024

Description

Add a chat group proxy to support chat group scenario.
Chat group proxy will be passed directly to batch engine. All the executor proxy will be created when initialize chat group proxy.
Chat group orchestrator schedule flow runs and resolve flow inputs and outputs for each run.
image

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Xiaodi Bi added 7 commits April 1, 2024 16:14
Refine code

init orchestrator when create orchestrator proxy

resolve conflict and refine code using executor proxy factory

resolve confict and refine

fix test

implement orchestrator

Refine code to use proxy factory

Add a python single line proxy and e2e test

refine code to use current interface and add e2e test

fix

register executor proxy in test

move chat group contract to seperated file and refine

refine

Use proxy property

Pass chat group proxy directly

update test

remove useless parameter

update
Copy link

github-actions bot commented Apr 1, 2024

SDK CLI Global Config Test Result bixiaodi/chat_group_contract

3 tests   3 ✅  45s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 60e770f.

Copy link

github-actions bot commented Apr 1, 2024

Executor Unit Test Result bixiaodi/chat_group_contract

743 tests   741 ✅  3m 43s ⏱️
  1 suites    0 💤
  1 files      0 ❌  2 🔥

For more details on these errors, see this check.

Results for commit 60e770f.

Copy link

github-actions bot commented Apr 1, 2024

Executor E2E Test Result bixiaodi/chat_group_contract

219 tests   212 ✅  5m 3s ⏱️
  1 suites    2 💤
  1 files      5 ❌

For more details on these failures, see this check.

Results for commit 60e770f.

from promptflow.storage._run_storage import AbstractRunStorage


class ChatGroupOrchestratorProxy(AbstractExecutorProxy):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this class in promptflow._internal? Because runtime needs to import it.

from promptflow._sdk.entities._run import Run
from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations
from promptflow._utils.utils import dump_list_to_jsonl
from promptflow.batch._batch_engine import BatchEngine
from promptflow.batch._errors import EmptyInputsData
from promptflow.batch._result import BatchResult
from promptflow._proxy._single_line_python_executor_proxy import SingleLinePythonExecutorProxy
from promptflow._proxy._chat_group_orchestrator_proxy import ChatGroupOrchestratorProxy
from promptflow._sdk.entities._chat_group._chat_role import ChatRole
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also include this in the promptflow_internal? Because runtime needs to import it.

stop_signal: Optional[str] = None,
flow_file: Optional[Path] = None,
working_dir: Optional[Path] = None,
connections: Optional[Dict[str, Any]] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to send environment variable here?

@Bixiaodi Bixiaodi closed this Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
executor The changes related to the execution of the flow external promptflow sdk prompt flow SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants