Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] Record aggregation node error in bulk run (#1580)
# Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. Warn and record. CLI experience: ![image](https://github.com/microsoft/promptflow/assets/7776147/793517c2-2683-4d46-a3ac-e6ca37dce67f) SDK experience: ![image](https://github.com/microsoft/promptflow/assets/7776147/91bbdde2-8578-47b6-8b0b-2c892e69b35c) This pull request includes several changes to improve the functionality and logging of the codebase. The most important changes include adding a new variable to improve warning messages during a bulk run, updating import statements and renaming keys in exception classes for consistency, and adding new test data and a test method for the `aggregation_node_failed` flow. Main functionality and logging improvements: * <a href="diffhunk://#diff-e3499cf713c66612d91723759de1c5076c22689b2ce2c89678f82de624b57c2cL99-R110">`src/promptflow/promptflow/_sdk/_submitter/run_submitter.py`</a>: Added a new variable `error_log` to improve warning messages during a bulk run. * <a href="diffhunk://#diff-1a5c2463c2ef997c5203a6b2e77b247d812961b7a6df5f0f45c02579b6656719L294-R300">`src/promptflow/promptflow/_sdk/operations/_local_storage_operations.py`</a>: Added a loop to collect error messages from failed aggregation nodes and renamed a key in the exception dictionary. <a href="diffhunk://#diff-1a5c2463c2ef997c5203a6b2e77b247d812961b7a6df5f0f45c02579b6656719L294-R300">[1]</a> <a href="diffhunk://#diff-1a5c2463c2ef997c5203a6b2e77b247d812961b7a6df5f0f45c02579b6656719L322-R324">[2]</a> * <a href="diffhunk://#diff-22682fe335b54b3d9e9535b43000db9a81b718ad54ce82fccc27eb8f51ba99ddL4-R4">`src/promptflow/promptflow/_sdk/_errors.py`</a>: Updated import statement and renamed a key in the exception class. <a href="diffhunk://#diff-22682fe335b54b3d9e9535b43000db9a81b718ad54ce82fccc27eb8f51ba99ddL4-R4">[1]</a> <a href="diffhunk://#diff-22682fe335b54b3d9e9535b43000db9a81b718ad54ce82fccc27eb8f51ba99ddL71-R80">[2]</a> Test improvements: * <a href="diffhunk://#diff-fd2280ec43a75adf07bef635f79fe8054a7272f14ab4d1464bd24f41a9169953R1-R3">`src/promptflow/tests/test_configs/flows/aggregation_node_failed/data.jsonl`</a>: Added additional test data for the `aggregation_node_failed` flow. * <a href="diffhunk://#diff-94a59a05643476869fa3c6bc45466f1582944a935488075e2e63b6a6a196958fR1061-R1082">`src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py`</a>: Added a new test method `test_aggregation_node_failed` to test the `aggregation_node_failed` flow and assert the run's status and error messages. # 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