Skip to content

Commit

Permalink
[promptflow][Release] 1.0.0 release branch merge back (#1064)
Browse files Browse the repository at this point in the history
# Description

Merge release branch for promptflow 1.0.0 back to main branch.

# All Promptflow Contribution checklist:
- [x] **The pull request does not introduce [breaking changes].**
- [x] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [x] **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
- [x] Title of the pull request is clear and informative.
- [x] 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
- [x] Pull request includes test coverage for the included changes.

---------

Co-authored-by: zhen <[email protected]>
Co-authored-by: Hhhilulu <[email protected]>
Co-authored-by: Lina Tang <[email protected]>
Co-authored-by: Lina Tang <[email protected]>
  • Loading branch information
5 people authored Nov 10, 2023
1 parent 02356ba commit c095046
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
33 changes: 15 additions & 18 deletions examples/flows/chat/chat-with-pdf/tests/chat_with_pdf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import unittest
import promptflow
from base_test import BaseTest
from promptflow.exceptions import ValidationException


class TestChatWithPDF(BaseTest):
Expand Down Expand Up @@ -72,28 +71,26 @@ def test_bulk_run_valid_mapping(self):
self.assertEqual(details.shape[0], 3)

def test_bulk_run_mapping_missing_one_column(self):
# in this case, run won't be created because the question column is missed in the data
data_path = os.path.join(
self.flow_path, "data/invalid-data-missing-column.jsonl"
)
with self.assertRaises(ValidationException):
self.create_chat_run(
column_mapping={
"question": "${data.question}",
},
data=data_path
)
run = self.create_chat_run(
column_mapping={
"question": "${data.question}",
},
data=data_path
)
self.assertEqual(run.status, "Failed")

def test_bulk_run_invalid_mapping(self):
# in this case, run won't be created.
with self.assertRaises(ValidationException):
self.create_chat_run(
column_mapping={
"question": "${data.question_not_exist}",
"pdf_url": "${data.pdf_url}",
"chat_history": "${data.chat_history}",
}
)
run = self.create_chat_run(
column_mapping={
"question": "${data.question_not_exist}",
"pdf_url": "${data.pdf_url}",
"chat_history": "${data.chat_history}",
}
)
self.assertEqual(run.status, "Failed")


if __name__ == "__main__":
Expand Down
7 changes: 6 additions & 1 deletion src/promptflow/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 0.1.0b9 (Upcoming)
## 1.0.0 (2023.11.09)

### Features Added

Expand All @@ -11,6 +11,11 @@
### Bugs Fixed

- [SDK/CLI] Keep original format in run output.jsonl.
- [Executor] Fix the bug that raise an error when an aggregation node references a bypassed node

### Improvements

- [Executor] Set the outputs of the bypassed nodes as None

## 0.1.0b8 (2023.10.26)

Expand Down

0 comments on commit c095046

Please sign in to comment.