Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add a shared base for local executor proxy and runtime exec…
…utor proxy (#1943) # Description This pull request involves significant changes to the `src/promptflow/promptflow/batch/_csharp_executor_proxy.py` file and the addition of a new file `src/promptflow/promptflow/batch/_csharp_base_executor_proxy.py`. The changes mainly revolve around the refactoring of the `CSharpExecutorProxy` class into a new `CSharpBaseExecutorProxy` class and a revised `CSharpLocalExecutorProxy` class. The refactoring aims to improve code reuse and organization. Here are the most important changes: **Refactoring and code organization:** * [`src/promptflow/promptflow/batch/_csharp_base_executor_proxy.py`](diffhunk://#diff-2237f977aca2e9808fd5c2957c79d4be28b0525c02cdfd801c0160ad3315836dR1-R103): This is a new file that contains the base class `CSharpBaseExecutorProxy` for the C# executor proxy. It includes methods and properties that were previously in the `CSharpExecutorProxy` class. * [`src/promptflow/promptflow/batch/_csharp_executor_proxy.py`](diffhunk://#diff-f8219170007d8a89eed104a166ab8c0c9d3af5b5c5e61225659d982f470aeb95L4-L51): The `CSharpExecutorProxy` class has been renamed to `CSharpLocalExecutorProxy` and now inherits from the new `CSharpBaseExecutorProxy` class. Several methods previously in this class have been moved to the base class. **Code simplification:** * [`src/promptflow/promptflow/batch/_csharp_executor_proxy.py`](diffhunk://#diff-f8219170007d8a89eed104a166ab8c0c9d3af5b5c5e61225659d982f470aeb95L110-R107): The `create` method has been simplified by using the `_construct_service_startup_command` method from the base class to generate the command for starting the service. * [`src/promptflow/promptflow/batch/_csharp_executor_proxy.py`](diffhunk://#diff-f8219170007d8a89eed104a166ab8c0c9d3af5b5c5e61225659d982f470aeb95L151-L182): The `exec_aggregation_async` and `_get_tool_metadata` methods, which are not supported or used in the local executor proxy, have been removed. # 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](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#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](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes.
- Loading branch information