Skip to content

Read tool file by utf-8 encoding. - #759

Merged
Robben Wang (huaiyan) merged 1 commit into
mainfrom
robbenwang/encoding_utf8
Oct 13, 2023
Merged

Read tool file by utf-8 encoding.#759
Robben Wang (huaiyan) merged 1 commit into
mainfrom
robbenwang/encoding_utf8

Conversation

@huaiyan

@huaiyan Robben Wang (huaiyan) commented Oct 13, 2023

Copy link
Copy Markdown
Contributor

Description

Set encoding as utf-8 as reading meta file.

For windows, the default encoding is cp1252. Use utf-8 since that's more common.
And could read file with "Private Use" Unicode character.

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.

@huaiyan
Robben Wang (huaiyan) requested a review from a team as a code owner October 13, 2023 06:42
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:43 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:43 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:43 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:43 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:43 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Oct 13, 2023

Copy link
Copy Markdown

SDK CLI Global Config Test Result robbenwang/encoding_utf8

2 tests   2 ✔️  43s ⏱️
1 suites  0 💤
1 files    0

Results for commit 552f9fc.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 13, 2023

Copy link
Copy Markdown

Executor Unit Test Result robbenwang/encoding_utf8

    2 files      2 suites   2m 2s ⏱️
361 tests 361 ✔️ 0 💤 0
700 runs  699 ✔️ 1 💤 0

Results for commit 552f9fc.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 13, 2023

Copy link
Copy Markdown

SDK PFS E2E Test Result robbenwang/encoding_utf8

8 tests   8 ✔️  26s ⏱️
1 suites  0 💤
1 files    0

Results for commit 552f9fc.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 13, 2023

Copy link
Copy Markdown

Executor E2E Test Result robbenwang/encoding_utf8

    2 files      2 suites   18m 20s ⏱️
102 tests 100 ✔️ 2 💤 0
204 runs  198 ✔️ 6 💤 0

Results for commit 552f9fc.

♻️ This comment has been updated with latest results.

@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:55 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:55 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:55 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:55 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 06:55 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Oct 13, 2023

Copy link
Copy Markdown

SDK CLI Test Result robbenwang/encoding_utf8

    2 files      2 suites   29m 39s ⏱️
285 tests 271 ✔️ 14 💤 0
570 runs  542 ✔️ 28 💤 0

Results for commit 552f9fc.

♻️ This comment has been updated with latest results.

@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:28 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:28 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:28 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:28 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:28 — with GitHub Actions Inactive
For windows, the default eoncoding will be cp1252.
Specify utf-8 since that should be more common.
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:33 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:33 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:33 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:33 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) temporarily deployed to internal October 13, 2023 08:33 — with GitHub Actions Inactive
@huaiyan
Robben Wang (huaiyan) merged commit 762f032 into main Oct 13, 2023
@huaiyan
Robben Wang (huaiyan) deleted the robbenwang/encoding_utf8 branch October 13, 2023 08:59
Robben Wang (huaiyan) added a commit that referenced this pull request Oct 16, 2023
# Description

For LLM/Prompt/CUSTOM_LLM tool, we need to read file to resolve the
tool.
If there is special character, will introduce unexpected error.
So, we set encoding as "uts-8".

This is continuing PR for
#759

# All Promptflow Contribution checklist:
- [X] **The pull request does not introduce [breaking changes].**
- [ ] **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: Robben Wang <robbenwang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants