Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] Fix invalid flow path in run YAML (#1656)
# Description This pull request introduces several changes to the `src/promptflow` directory. The most important changes include enhancing the validation of the `flow` property in the `RunSchema` class, adding a new test configuration file for bulk runs, and adding a new test case to validate the behavior of the code when an invalid flow path is provided. Main changes: * <a href="diffhunk://#diff-db38cc07d25efdbc0622e8e9352e07e34c502d36bdad1954bcd52db156192c9fL63-R80">`src/promptflow/promptflow/_sdk/schemas/_run.py`</a>: Enhanced the validation of the `flow` property in the `RunSchema` class by adding a new field called `RemoteFlowStr` and a new validation in the `_validate` method. <a href="diffhunk://#diff-db38cc07d25efdbc0622e8e9352e07e34c502d36bdad1954bcd52db156192c9fL63-R80">[1]</a> <a href="diffhunk://#diff-db38cc07d25efdbc0622e8e9352e07e34c502d36bdad1954bcd52db156192c9fR51-R67">[2]</a> * <a href="diffhunk://#diff-b33d2ea22b9e9679f7a70a7beb5bd27b64c0bdb575e425aeece5322ff550ddbbR1-R11">`src/promptflow/tests/test_configs/runs/bulk_run_invalid_flow.yaml`</a>: Added a new test configuration file for bulk runs, `bulk_run_invalid_flow.yaml`. * <a href="diffhunk://#diff-c3d1c4e4539af1a59525218043dad93dc866b761a70a16a21783e57a7d0adac5R97-R103">`src/promptflow/tests/sdk_cli_test/unittests/test_run.py`</a>: Added a new test case to validate the behavior of the code when an invalid flow path is provided. Other changes: * <a href="diffhunk://#diff-41ec3f7c4b5d4c0e670407d3c00a03a6966d7ebf617b1536473e33a12e2bc765R5-R12">`src/promptflow/CHANGELOG.md`</a>: Introduced a new feature to the Executor, a `@trace` decorator, which allows logging traces for functions called by tools. However, it was later decided to remove this decorator without mentioning the reason in the diff. <a href="diffhunk://#diff-41ec3f7c4b5d4c0e670407d3c00a03a6966d7ebf617b1536473e33a12e2bc765R5-R12">[1]</a> <a href="diffhunk://#diff-41ec3f7c4b5d4c0e670407d3c00a03a6966d7ebf617b1536473e33a12e2bc765L18-R23">[2]</a> Please add an informative description that covers that changes made by the pull request and link all relevant issues. # 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