Commit Graph
782 Commits
Author SHA1 Message Date
Evan Mattson 05f4589549 Python: Exclude the KernelContent's inner_content as it breaks serializing the model (#9626)
### Motivation and Context

There's been an error for a while where serializing the chat history
leads to the following error:

```
PydanticSerializationError(Error serializing to JSON: TypeError: 'MockValSer' object 
cannot be converted to 'SchemaSerializer')}
```

This is due to the fact that we're trying to do a model dump of an
object that we don't have a Pydantic model for as the `inner_content`
type is `Any`. Most, if not all, of the `inner_content` info is already
included in our `ChatMessageContent`, therefore we're excluding this
attribute from serialization.

Note: if you require the information in this `inner_content` attribute,
you will be responsible for grabbing the content before serializing the
chat history, as it won't be included.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR excludes the `inner_content` from the `model_dump()`,
`model_dump_json()`, or `serialize()` calls.
- Fixes #7903 
- Adds a concept sample showing how to serialize the `ChatHistory` after
invoking a prompt via the kernel.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-11-08 20:23:53 +00:00
dependabot[bot] 2d4c7524af Python: Update pymongo requirement from <4.9,>=4.8.0 to >=4.8.0,<4.11 in /python (#9271)
Updates the requirements on
[pymongo](https://github.com/mongodb/mongo-python-driver) to permit the
latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/releases">pymongo's
releases</a>.</em></p>
<blockquote>
<h2>PyMongo 4.10.1</h2>
<p>Community notes: <a
href="https://www.mongodb.com/community/forums/t/pymongo-4-10-1-released/299573">https://www.mongodb.com/community/forums/t/pymongo-4-10-1-released/299573</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst">pymongo's
changelog</a>.</em></p>
<blockquote>
<h2>Changes in Version 4.10.1</h2>
<p>Version 4.10.1 is a bug fix release.</p>
<ul>
<li>Fixed a bug where
:meth:<code>~pymongo.results.UpdateResult.did_upsert</code> would raise
a <code>TypeError</code>.</li>
<li>Fixed Binary BSON subtype (9) support on big-endian operating
systems (such as zSeries).</li>
</ul>
<p>Issues Resolved
...............</p>
<p>See the <code>PyMongo 4.10.1 release notes in JIRA</code>_ for the
list of resolved issues
in this release.</p>
<p>.. _PyMongo 4.10.1 release notes in JIRA: <a
href="https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40788">https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40788</a></p>
<h2>Changes in Version 4.10.0</h2>
<ul>
<li>Added provisional <strong>(BETA)</strong> support for a new Binary
BSON subtype (9) used for efficient storage and retrieval of vectors:
densely packed arrays of numbers, all of the same type.
This includes new methods
:meth:<code>~bson.binary.Binary.from_vector</code> and
:meth:<code>~bson.binary.Binary.as_vector</code>.</li>
<li>Added C extension use to client metadata, for example:
<code>{&quot;driver&quot;: {&quot;name&quot;: &quot;PyMongo|c&quot;,
&quot;version&quot;: &quot;4.10.0&quot;}, ...}</code></li>
<li>Fixed a bug where
:class:<code>~pymongo.asynchronous.mongo_client.AsyncMongoClient</code>
could deadlock.</li>
<li>Fixed a bug where PyMongo could fail to import on Windows if
<code>asyncio</code> is misconfigured.</li>
</ul>
<p>Issues Resolved
...............</p>
<p>See the <code>PyMongo 4.10 release notes in JIRA</code>_ for the list
of resolved issues
in this release.</p>
<p>.. _PyMongo 4.10 release notes in JIRA: <a
href="https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40553">https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40553</a></p>
<h2>Changes in Version 4.9.2</h2>
<ul>
<li>Fixed a bug where
:class:<code>~pymongo.asynchronous.mongo_client.AsyncMongoClient</code>
could deadlock.</li>
<li>Fixed a bug where PyMongo could fail to import on Windows if
<code>asyncio</code> is misconfigured.</li>
<li>Fixed a bug where
:meth:<code>~pymongo.results.UpdateResult.did_upsert</code> would raise
a <code>TypeError</code>.</li>
</ul>
<p>Issues Resolved
...............</p>
<p>See the <code>PyMongo 4.9.2 release notes in JIRA</code>_ for the
list of resolved issues
in this release.</p>
<p>.. _PyMongo 4.9.2 release notes in JIRA: <a
href="https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40732">https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=40732</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/77cd7ab9f6dc48e72a3bae94d2cca2e4200e6978"><code>77cd7ab</code></a>
BUMP 4.10.1</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/1c284307250dec4fb6b7b161d72e1876c067b4cb"><code>1c28430</code></a>
PYTHON-4808 Add changelog for 4.10.1 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1890">#1890</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/7848feb09a12bb6a14fb18deb8b873d8c2eff8a9"><code>7848feb</code></a>
PYTHON-4786 - Fix UpdateResult.did_upsert TypeError (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1878">#1878</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/02794079802f264be021707d20fc64e292ef74b7"><code>0279407</code></a>
PYTHON-4806 Fix expected metadata in mockupdb tests (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1888">#1888</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/7fbeca9793bb88561a8b9972df926193d54a1225"><code>7fbeca9</code></a>
[PYTHON-4803] Big endian fix for binary bson vectors (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1885">#1885</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/bfba5481a09b67fa3f5e9dcaf5e90d7913964406"><code>bfba548</code></a>
PYTHON-4789 Migrate test_retryable_reads.py to async (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1877">#1877</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/8791aa00ea8f87ceae5e5ec601b75c677a6754ab"><code>8791aa0</code></a>
PYTHON-4790 Migrate test_retryable_writes.py to async (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1876">#1876</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/c0f7810d56555c8a285beaa9aa5fe6d2b7185eff"><code>c0f7810</code></a>
BUMP 4.11.0.dev0</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/4713afa910f12d013571778a12fda2287d0bf19d"><code>4713afa</code></a>
BUMP 4.10.0</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/ae6cfd6d102d885ac6b0873d31f0dac139b1ddae"><code>ae6cfd6</code></a>
[DRIVERS-2926] [PYTHON-4577] BSON Binary Vector Subtype Support (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/1813">#1813</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/mongo-python-driver/compare/4.8.0...4.10.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 08:48:39 +00:00
Tao Chen e9a755dfbc Python: Audio to text (#9505)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Addresses: https://github.com/microsoft/semantic-kernel/issues/7434


### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Add audio to text to SK Python.

### Contribution Checklist
1. Add audio to text to SK Python.
2. Add text to image integration tests.
3. Refactor Azure AI connector AD auth.

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-11-08 00:12:07 +00:00
Evan Mattson c539e8b88b Python: Bump Python version to 1.14.0 for a release. (#9611)
### Motivation and Context

Bump Python version to 1.14.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.14.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-11-07 18:02:30 +00:00
Evan Mattson ed1fb08473 Python: Add type hint for ProcessStepBuilder in send_event_to. Improve schema building. (#9608)
### Motivation and Context

The `ProcessStepEdgeBuilder` `send_event_to` method allows one to pass
in a target that isn't of type `ProcessFunctionTargetBuilder`. If it is
of the other type `ProcessStepBuilder` we build the expected type
`ProcessFunctionTargetBuilder`. The `send_event_to` method was missing
the type hint, which can cause issues for type checkers.

Secondly, during json schema building, we get the type hints using the
builder's globals and locals. This is an issue because it doesn't allow
us to find types defined outside of this module. Improve this by getting
type hints for user defined modules, as well.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR adds the proper type hint.
- Closes #9605 
- Closes #9606
- Renames a `test_postgres.py` file that existed both in unit tests and
integration tests and caused a load conflict.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-11-07 16:08:12 +00:00
Eduard van ValkenburgandTao Chen 1db12c4393 Python: Adding Vector Search to the In Memory collection (#9574)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Adds vectorized search and text search to the In Memory connector.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Tao Chen <[email protected]>
2024-11-07 16:00:51 +00:00
Eduard van Valkenburg c9ef719e2f Python: fix mypy pre-commit setup, mypy fixes (#9498)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Fixes the mypy pre-commit job, and subsequent fixes from there.
Moved all python tests to use the uv setup task instead of manual cache,
python install and uv install.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-11-07 11:33:41 +00:00
Eduard van ValkenburgandTao Chen c8b4094835 Python: Introducing vector and text search (#9345)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This PR does the following things:
- Introduces TextSearch abstractions, including implementation for Bing
- This consists of the TextSearch class, which implements three public
search methods, and handles the internals, the search methods are:
'search' returns a string, 'get_text_search_results' returns a
TextSearchResult object and 'get_search_results' returns a object native
to the search service (i.e. BingWebPages for Bing)
- This also has a method called "create_{search_method}' which returns a
KernelFunction based on the search method. This function can be adapted
by setting the parameters and has several adaptability options and
allows you to create a RAG pipeline easily with custom names and
descriptions of both the functions and the parameters!
- Introduces VectorSearch abstractions, including implementation for
Azure AI Search
- This consists of a VectorStoreBase class which handles all the
internal and three public interfaces, vectorized_search (supply a
vector), vectorizable_text_search (supply a string that get's vectorized
downstream), vector_text_search (supply a string), each vector store
record collection can pick and choose which ones they need to support by
importing one or more next to the VectorSearchBase class.
- Introduces VectorStoreTextSearch as a way to leverage text search
against vector stores
- Since this builds on TextSearch this is now the best way to create a
super powerfull RAG setup with your own data model!
- Adds all the related classes, samples and tests for the above.
- Also reorders the data folder, which might cause some slight breaking
changes for the few stores that have the new vector store model.
- Adds additional IndexKinds and DistanceFunctions to stay in sync with
dotnet.
- Renames VolatileStore and VolatileCollection to InMemoryVectorStore
and InMemoryVectorCollection.

Closes #6832 #6833


### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Tao Chen <[email protected]>
2024-11-06 13:22:50 +00:00
Evan Mattson 8e0b3474f1 Python: Fix planner notebook link to plan.py (#9486)
### Motivation and Context

Fix planner notebook link to plan.py file

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Fix planner notebook link to plan.py file.
- Closes #9041

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-11-05 00:33:53 +00:00
dependabot[bot] 52f4895385 Python: Bump torch from 2.5.0 to 2.5.1 in /python (#9532)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.5.0 to 2.5.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytorch/pytorch/releases">torch's
releases</a>.</em></p>
<blockquote>
<h2>PyTorch 2.5.1: bug fix release</h2>
<p>This release is meant to fix the following regressions:</p>
<ul>
<li>Wheels from PyPI are unusable out of the box on PRM-based Linux
distributions: <a
href="https://redirect.github.com/pytorch/pytorch/issues/138324">pytorch/pytorch#138324</a></li>
<li>PyPI arm64 distribution logs cpuinfo error on import: <a
href="https://redirect.github.com/pytorch/pytorch/issues/138333">pytorch/pytorch#138333</a></li>
<li>Crash When Using torch.compile with Math
scaled_dot_product_attention in AMP Mode: <a
href="https://redirect.github.com/pytorch/pytorch/issues/133974">pytorch/pytorch#133974</a></li>
<li>[MPS] Internal crash due to the invalid buffer size computation if
sliced API is used: <a
href="https://redirect.github.com/pytorch/pytorch/issues/137800">pytorch/pytorch#137800</a></li>
<li>Several issues related to CuDNN Attention: <a
href="https://redirect.github.com/pytorch/pytorch/pull/138522">pytorch/pytorch#138522</a></li>
</ul>
<p>Besides the regression fixes, the release includes several
documentation updates.</p>
<p>See release tracker <a
href="https://redirect.github.com/pytorch/pytorch/issues/132400">pytorch/pytorch#132400</a>
for additional information.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytorch/pytorch/commit/a8d6afb511a69687bbb2b7e88a3cf67917e1697e"><code>a8d6afb</code></a>
Disabling amp context when invoking compiler (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138659">#138659</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/f31b8bbc5b8834cdac83d1b92e36a8896ed2e4b9"><code>f31b8bb</code></a>
[MPS] Fix sliced cast (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138535">#138535</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/848e7ac42a3c121d03bcff6cb53c1afb9b76164e"><code>848e7ac</code></a>
[SDPA-CUDNN] Make CuDNN Attention Opt in (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138587">#138587</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/885c823759be505f5725578e0ee46cfec249ccf3"><code>885c823</code></a>
Update doc copyrights to 2024 (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138650">#138650</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/8c3ed97baa03668945064b9f1f38496041de2ec0"><code>8c3ed97</code></a>
Update cpuinfo submodule (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138600">#138600</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/70cf2bbc0b9ebd30b7604b29123a9920d6fcdab6"><code>70cf2bb</code></a>
Add link to torch.compile the missing manual in troubleshooting (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137369">#137369</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/cde6b382ff39210939516f0d0cc3d270ced0fed0"><code>cde6b38</code></a>
Don't try to load cufile (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138539">#138539</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/4076a738b08e0118f0b0464fe5f79bf4109c29c5"><code>4076a73</code></a>
[Cherry-Pick] Use cuda 12.4 pytorch_extra_install_requirements as
default (<a
href="https://redirect.github.com/pytorch/pytorch/issues/1">#1</a>...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/a97c15174b8bb4f4cda95f86b759aabc2fbe25df"><code>a97c151</code></a>
update getting started xpu (<a
href="https://redirect.github.com/pytorch/pytorch/issues/138090">#138090</a>)</li>
<li>See full diff in <a
href="https://github.com/pytorch/pytorch/compare/v2.5.0...v2.5.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=torch&package-manager=pip&previous-version=2.5.0&new-version=2.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 23:12:17 +00:00
VGAandEvan Mattson 3a59ec9b7d Python: Fixes displaying of error message to properly show the exception details (#9507)
### Motivation and Context

This change is required to properly print exception details when logging
an error message, which helps debugging.

### Description

Fixes printing of debugging information used
[here](https://github.com/microsoft/semantic-kernel/blob/db45cfa7cf1b0f00aa3b1414e4d018ba816b8960/python/semantic_kernel/processes/local_runtime/local_process.py#L189)
where the exception details were ignored due to the usage of bad syntax.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-11-04 17:47:00 +00:00
dependabot[bot]andEvan Mattson d5906b66ac Python: Bump torch from 2.4.1 to 2.5.0 in /python (#9367)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.4.1 to 2.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytorch/pytorch/releases">torch's
releases</a>.</em></p>
<blockquote>
<h2>PyTorch 2.5.0 Release, SDPA CuDNN backend, Flex Attention</h2>
<h1>PyTorch 2.5 Release Notes</h1>
<ul>
<li>Highlights</li>
<li>Backwards Incompatible Change</li>
<li>Deprecations</li>
<li>New Features</li>
<li>Improvements</li>
<li>Bug fixes</li>
<li>Performance</li>
<li>Documentation</li>
<li>Developers</li>
<li>Security</li>
</ul>
<h2>Highlights</h2>
<p>We are excited to announce the release of PyTorch® 2.5! This release
features a new CuDNN backend for SDPA, enabling speedups by default for
users of SDPA on H100s or newer GPUs. As well, regional compilation of
torch.compile offers a way to reduce the cold start up time for
torch.compile by allowing users to compile a repeated nn.Module (e.g. a
transformer layer in LLM) without recompilations. Finally, TorchInductor
CPP backend offers solid performance speedup with numerous enhancements
like FP16 support, CPP wrapper, AOT-Inductor mode, and max-autotune
mode.
This release is composed of 4095 commits from 504 contributors since
PyTorch 2.4. We want to sincerely thank our dedicated community for your
contributions. As always, we encourage you to try these out and report
any issues as we improve 2.5. More information about how to get started
with the PyTorch 2-series can be found at our <a
href="https://pytorch.org/get-started/pytorch-2.0/">Getting Started</a>
page.
As well, please check out our new ecosystem projects releases with <a
href="https://github.com/pytorch/torchrec">TorchRec</a> and <a
href="https://github.com/pytorch-labs/torchfix/releases/tag/v0.6.0">TorchFix</a>.</p>
<table>
<thead>
<tr>
<th>Beta</th>
<th>Prototype</th>
</tr>
</thead>
<tbody>
<tr>
<td>CuDNN backend for SDPA</td>
<td>FlexAttention</td>
</tr>
<tr>
<td>torch.compile regional compilation without recompilations</td>
<td>Compiled Autograd</td>
</tr>
<tr>
<td>TorchDynamo added support for exception handling &amp;
MutableMapping types</td>
<td>Flight Recorder</td>
</tr>
<tr>
<td>TorchInductor CPU backend optimization</td>
<td>Max-autotune Support on CPU with GEMM Template</td>
</tr>
<tr>
<td></td>
<td>TorchInductor on Windows</td>
</tr>
<tr>
<td></td>
<td>FP16 support on CPU path for both eager mode and TorchInductor CPP
backend</td>
</tr>
<tr>
<td></td>
<td>Autoload Device Extension</td>
</tr>
<tr>
<td></td>
<td>Enhanced Intel GPU support</td>
</tr>
</tbody>
</table>
<p>*To see a full list of public feature submissions click <a
href="https://docs.google.com/spreadsheets/d/1TzGkWuUMF1yTe88adz1dt2mzbIsZLd3PBasy588VWgk/edit?gid=949287277#gid=949287277">here</a>.</p>
<h3>BETA FEATURES</h3>
<h4>[Beta] CuDNN backend for SDPA</h4>
<p>The cuDNN &quot;Fused Flash Attention&quot; backend was landed for
<code>torch.nn.functional.scaled_dot_product_attention</code>. On NVIDIA
H100 GPUs this can provide up to 75% speed-up over FlashAttentionV2.
This speedup is enabled by default for all users of SDPA on H100 or
newer GPUs.</p>
<h4>[Beta] <em>torch.compile</em> regional compilation without
recompilations</h4>
<p>Regional compilation without recompilations, via
<code>torch._dynamo.config.inline_inbuilt_nn_modules</code> which
default to True in 2.5+. This option allows users to compile a repeated
nn.Module (e.g. a transformer layer in LLM) without recompilations.
Compared to compiling the full model, this option can result in smaller
compilation latencies with 1%-5% performance degradation compared to
full model compilation.</p>
<p>See the <a
href="https://pytorch.org/tutorials/recipes/regional_compilation.html">tutorial</a>
for more information.</p>
<h4>[Beta] TorchInductor CPU backend optimization</h4>
<p>This feature advances Inductor’s CPU backend optimization, including
CPP backend code generation and FX fusions with customized CPU kernels.
The Inductor CPU backend supports vectorization of common data types and
all Inductor IR operations, along with the static and symbolic shapes.
It is compatible with both Linux and Windows OS and supports the default
Python wrapper, the CPP wrapper, and AOT-Inductor mode.</p>
<p>Additionally, it extends the max-autotune mode of the GEMM template
(prototyped in 2.5), offering further performance gains. The backend
supports various FX fusions, lowering to customized kernels such as
oneDNN for Linear/Conv operations and SDPA. The Inductor CPU backend
consistently achieves performance speedups across three benchmark
suites—TorchBench, Hugging Face, and timms—outperforming eager mode in
97.5% of the 193 models tested.</p>
<h3>PROTOTYPE FEATURES</h3>
<h4>[Prototype] FlexAttention</h4>
<p>We've introduced a flexible API that enables implementing various
attention mechanisms such as Sliding Window, Causal Mask, and PrefixLM
with just a few lines of idiomatic PyTorch code. This API leverages
torch.compile to generate a fused FlashAttention kernel, which
eliminates extra memory allocation and achieves performance comparable
to handwritten implementations. Additionally, we automatically generate
the backwards pass using PyTorch's autograd machinery. Furthermore, our
API can take advantage of sparsity in the attention mask, resulting in
significant improvements over standard attention implementations.</p>
<p>For more information and examples, please refer to the <a
href="https://pytorch.org/blog/flexattention/">official blog post</a>
and <a href="https://github.com/pytorch-labs/attention-gym">Attention
Gym</a>.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytorch/pytorch/commit/32f585d9346e316e554c8d9bf7548af9f62141fc"><code>32f585d</code></a>
[Release only] use triton 3.1.x from pypi (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137895">#137895</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/417a0763a7d69f6ce80719ac89c1d2deeee78163"><code>417a076</code></a>
[split build] move periodic split builds into own concurrency group (<a
href="https://redirect.github.com/pytorch/pytorch/issues/135510">#135510</a>)...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/119e7344d905f69d9b37734becba2ada12641d0c"><code>119e734</code></a>
[RELEASE-ONLY CHANGES] Fix dependency on filesystem on Linux (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137242">#137242</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/783a6a424c30869f4b8ea8c686b4ce4991415e5c"><code>783a6a4</code></a>
[MPS] Add regression test for <code>fft.fftfreq</code> (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137215">#137215</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/5375201dff598d2552b1c2f5ead027bd089415c6"><code>5375201</code></a>
[MPS] Add missing dispatch to rshift.Tensor (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137212">#137212</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/1de132ec9eab74d2a296002e4ce619e09abe2f43"><code>1de132e</code></a>
[MPS] Fix 5D+ reductions over negative dimentions (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137211">#137211</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/0b1b609ed7387a3e105c813b0d7e3f3c3df2bb36"><code>0b1b609</code></a>
[NCCL] Don't override <code>waitUntilInitialized</code>'s setting of
`comm-&gt;initialized_...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/0b45af9c10612bc94ce53b9fcc22504629148e7e"><code>0b45af9</code></a>
Fix addmm silent correctness on aarch64 (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137208">#137208</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/1a0b166ba22be249ace1de014932803c60a17774"><code>1a0b166</code></a>
[ONNX] Add assertion nodes to ignoring list (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137214">#137214</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/3a541ef8c27ba70eaef1f8612fd99fa4983cfcc7"><code>3a541ef</code></a>
Clarify that <code>libtorch</code> API is C++17 compatible (<a
href="https://redirect.github.com/pytorch/pytorch/issues/137206">#137206</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytorch/pytorch/compare/v2.4.1...v2.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=torch&package-manager=pip&previous-version=2.4.1&new-version=2.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2024-11-04 16:53:53 +00:00
dependabot[bot]andEvan Mattson 80bfb4ab23 Python: Update pyarrow requirement from <18.0,>=12.0 to >=12.0,<19.0 in /python (#9445)
Updates the requirements on [pyarrow](https://github.com/apache/arrow)
to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/apache/arrow/releases">pyarrow's
releases</a>.</em></p>
<blockquote>
<h2>Apache Arrow 18.0.0</h2>
<p>TODO</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/apache/arrow/commit/9105a4109a80a1c01eabb24ee4b9f7c94ee942cb"><code>9105a41</code></a>
MINOR: [Release] Update versions for 18.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/e47bf462c9146a1efe71ed9c33e225f7bf0ba48e"><code>e47bf46</code></a>
MINOR: [Release] Update .deb/.rpm changelogs for 18.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/8567163d017e5816aa6bb65916ad2ca5f204cf70"><code>8567163</code></a>
MINOR: [Release] Update CHANGELOG.md for 18.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/5d7987b94a4389e098461ae013522a64eb2fe6fe"><code>5d7987b</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44422">GH-44422</a>:
[Packaging][Release][Linux] Upload artifacts before test (<a
href="https://redirect.github.com/apache/arrow/issues/44425">#44425</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/70a2245b6046f95d8d87397d82074bdfd94cbb99"><code>70a2245</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44415">GH-44415</a>:
[Release][Ruby] Remove pins from glib section of release
verificati...</li>
<li><a
href="https://github.com/apache/arrow/commit/155a42ebeb7252e6174412ebf39859b1af55a710"><code>155a42e</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44342">GH-44342</a>:
[C++] Disable jemalloc by default on ARM (<a
href="https://redirect.github.com/apache/arrow/issues/44380">#44380</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/0e184c3543cd891adec1c02a699d909064b38cd2"><code>0e184c3</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44386">GH-44386</a>:
[Integration][Release] Pin Python 3.12 for Integration
verification...</li>
<li><a
href="https://github.com/apache/arrow/commit/9812ab77f78c5a27991750b77dc52e8b2c0dbfff"><code>9812ab7</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44381">GH-44381</a>:
[Ruby][Release] Pin not only glib but also python on verification
j...</li>
<li><a
href="https://github.com/apache/arrow/commit/71bd117b5f10d9dc3e74efddf6744f46cf4df232"><code>71bd117</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/43519">GH-43519</a>:
[Python][CI] Add Python 3.13 conda test build (<a
href="https://redirect.github.com/apache/arrow/issues/44192">#44192</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/a39090d1134447617f49b375f720ca41d89f4bc1"><code>a39090d</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/44373">GH-44373</a>:
[Packaging][Java] Fix brew link to Python 3.13 on macOS (<a
href="https://redirect.github.com/apache/arrow/issues/44374">#44374</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/apache/arrow/compare/go/v12.0.0...apache-arrow-18.0.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2024-11-04 16:53:38 +00:00
dependabot[bot]andEvan Mattson c9ed2b40c3 Python: Update motor requirement from <3.6.0,>=3.3.2 to >=3.3.2,<3.7.0 in /python (#9270)
Updates the requirements on [motor](https://github.com/mongodb/motor) to
permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/motor/releases">motor's
releases</a>.</em></p>
<blockquote>
<h2>Motor 3.6.0</h2>
<p>Community notes: <a
href="https://www.mongodb.com/community/forums/t/motor-3-6-0-released/297834">https://www.mongodb.com/community/forums/t/motor-3-6-0-released/297834</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/motor/blob/master/doc/changelog.rst">motor's
changelog</a>.</em></p>
<blockquote>
<h2>Motor 3.6.0</h2>
<ul>
<li>Add support for MongoDB 8.0 and PyMongo 4.9.</li>
<li>The length parameter in :meth:<code>MotorCursor.to_list</code> is
now optional.</li>
</ul>
<p>.. note::</p>
<p>This is the last planned minor version of Motor. We are sunsetting
Motor in favor of native
asyncio support in PyMongo 4.9+. We will continue to provide security
releases and bug fixes for
Motor, but it will not gain new features.</p>
<h2>Motor 3.5.1</h2>
<ul>
<li>Fix runtime behavior of Motor generic class typing, e.g.
<code>client: AsyncIOMotorClient[Dict[str, Any]]</code>.</li>
</ul>
<h2>Motor 3.5.0</h2>
<ul>
<li>Drop support for Python 3.7.</li>
<li>Switch to using Hatchling as a build backend and remove
<code>setup.py</code>.</li>
<li>Add Secure Software Development Life Cycle automation to release
process.
GitHub Releases for pymongocrypt now include a Software Bill of
Materials, and signature
files corresponding to the distribution files released on PyPI.</li>
</ul>
<h2>Motor 3.4.0</h2>
<ul>
<li>Type hint bug fixes and improvements. Added typings to classes in
<code>motor_tornado</code> and
<code>motor_asyncio</code>.</li>
</ul>
<h2>Motor 3.3.2</h2>
<ul>
<li>Fix incorrect type hints for the following:
:meth:<code>MotorCursor.to_list</code>,
:meth:<code>MotorCollection.name</code>,
:meth:<code>MotorDatabase.get_collection</code>,
:meth:<code>MotorClientSession.with_transaction</code></li>
<li>Fix a bug that caused application-supplied DriverInfo to be
overwritten.</li>
</ul>
<h2>Motor 3.3.1</h2>
<ul>
<li>Fix a bug in the type hint for
:meth:<code>MotorCursor.to_list</code>.</li>
</ul>
<h2>Motor 3.3.0</h2>
<ul>
<li>Add support for PyMongo 4.4+.</li>
<li>Add support for Python 3.12.</li>
<li>Add inline type hints for public APIs.</li>
<li>Added new helper methods for Atlas Search Index (requires MongoDB
Server 7.0+):</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mongodb/motor/commit/20015b458e37b02e58677e107a9c8e83233438f8"><code>20015b4</code></a>
BUMP 3.6.0</li>
<li><a
href="https://github.com/mongodb/motor/commit/cf7b4cfe530e052ea7af600a96241342f52561e5"><code>cf7b4cf</code></a>
MOTOR-1351 Bump minimum PyMongo version to 3.9 (<a
href="https://redirect.github.com/mongodb/motor/issues/308">#308</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/e13888b08e26800fbe579d7c385096c076e03c24"><code>e13888b</code></a>
MOTOR-1364 Add support for Python 3.13 (<a
href="https://redirect.github.com/mongodb/motor/issues/307">#307</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/5c77c38016b5527b1e21b804f5f6e6d6aeafb118"><code>5c77c38</code></a>
MOTOR-1177 Add documentation for Type Annotation Support (<a
href="https://redirect.github.com/mongodb/motor/issues/306">#306</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/2a9225d0ce83dd6142925a344d0b8236651bd8ad"><code>2a9225d</code></a>
MOTOR-1363 - Pass correct parameter to AsyncIOMotorClientEncryption (<a
href="https://redirect.github.com/mongodb/motor/issues/305">#305</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/7050d54dc474ef734f1b4fae26b041733214a370"><code>7050d54</code></a>
MOTOR-1362 Use furo theme in ReadTheDocs (<a
href="https://redirect.github.com/mongodb/motor/issues/304">#304</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/b652685be437c417c0ec3221bb156320e7383ddb"><code>b652685</code></a>
MOTOR-1360 Use AssumeRole for S3 Access in Evergreen Builds (<a
href="https://redirect.github.com/mongodb/motor/issues/303">#303</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/48f34cbe02ecc316a85eeb3ae9733e89debdc9de"><code>48f34cb</code></a>
MOTOR-1165 Add documentation for CSOT (<a
href="https://redirect.github.com/mongodb/motor/issues/302">#302</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/a08b1aff9c382eec9098d46dd3db28f0ad210998"><code>a08b1af</code></a>
MOTOR-1260 Add Projection with aggregation expressions example (<a
href="https://redirect.github.com/mongodb/motor/issues/301">#301</a>)</li>
<li><a
href="https://github.com/mongodb/motor/commit/00f27f3294a830e98828bb94db2d3972eb4b1ef6"><code>00f27f3</code></a>
MOTOR-940 Improved Bulk Write API (<a
href="https://redirect.github.com/mongodb/motor/issues/300">#300</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/motor/compare/3.3.2...3.6.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2024-11-04 16:52:58 +00:00
Evan Mattson 2fdd74e18d Python: Bump Python version to 1.13.0 for a release. (#9480)
### Motivation and Context

Bump Python version to 1.13.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.13.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-31 14:11:48 +00:00
Evan Mattson 5e632fd1b2 Python: Add parallel_tool_calls attribute to OpenAI chat prompt execution settings (#9479)
### Motivation and Context

OpenAI / Azure OpenAI released the ability to specify the
`parallel_tool_calls` = True | False boolean attribute on the prompt
execution settings in July. This was never brought into SK Python.

Further, there appears to be a pesky bug related to function calling
where enabling parallel tool calls can cause 500s. The only way to get
around this is to disable parallel function calling. This has been both
tested on the Azure Chat Completion and OpenAI Chat Completion code and
works well -- the chat history shows the synchronous function calls if
multiple tool calls are required.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Add the `parallel_tool_calls` attribute on the
OpenAIChatPromptExecutionExecution settings, which are also used by the
AzureChatCompletionClass.
- Closes #9478
- Adds unit tests for this prompt execution setting

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-30 22:31:54 +00:00
Evan Mattson 55596a9f89 Python: Allow caller to specify file ids that already exist when creating assistant (#9434)
### Motivation and Context

Today, when creating an OpenAI Assistant Agent, one can specify vector
store file names or code interpreter files names (paths to files) that
will be uploaded and used. If one wants to include a file ID that was
already uploaded, this isn't possible.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR allows for users to specify file IDs that were already uploaded.
- Closes #9159 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-25 19:34:06 +00:00
Tao ChenandEvan Mattson e6427a6a43 Python: Ollama tool call and image content (#9422)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Addresses:
https://github.com/orgs/microsoft/projects/866/views/59?sliceBy%5Bvalue%5D=python&pane=issue&itemId=72604972&issue=microsoft%7Csemantic-kernel%7C7539
Function calling has been added to Ollama. This PR adds support of the
feature to the Ollama AI connector.

> Note: streaming function calling is not supported by Ollama.

Image content support is also added.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Ollama function calling
2. Ollama image content

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-25 17:01:11 +00:00
Evan Mattson f14e4312cb Python: Increment Python version to 1.12.1. (#9431)
### Motivation and Context

Increment Python version to 1.12.1 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Increment Python version to 1.12.1 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-25 12:23:02 -04:00
Evan Mattson 6aa322975e Python: Add step03 getting started with processes samples. (#9427)
### Motivation and Context

Add step03 getting started with processes samples to show how to create
kernel processes related to food preparation and food ordering tasks.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Add step03 getting started with processes samples.
- Make `emit_event` async
- Simplify how one can create an event to emit by allowing the
process_event to be a string, along with kwargs:

```
await context.emit_event(process_event=CommonEvents.StartBRequested.value, data="Get Going B")
``` 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-25 15:01:17 +00:00
Emmanuel FerdmanandTao Chen 69c0640762 Python: Update skprompt.txt reference (#9307)
### Motivation and Context


### Description

Commit 5817c2b927 moved the location of
`skprompt.txt`. This PR adjusts sources to changes.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Signed-off-by: Emmanuel Ferdman <[email protected]>
Co-authored-by: Tao Chen <[email protected]>
2024-10-24 22:31:04 +00:00
Evan Mattson 20d8f3f374 Python: Bump Python version to 1.12.0 for a release. (#9423)
### Motivation and Context

Bump Python version to 1.12.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.12.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-24 17:53:02 +00:00
Evan Mattson 6eba848e91 Python: Add the Python process framework (#9363)
### Motivation and Context

An initial PR to add the foundational pieces of the Python Process
framework, which holds it design to be similar to dotnet in that step
types are added to a process builder, and later on, when the step is
run, it is first instantiated and the proper state is provided.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Adding the initial process framework components:
- Closes #9354 

**TODO**

- more unit tests will be added to increase the code coverage. Currently
there are several files with no (or low) code coverage.
- more samples will either be added to this PR or a subsequent PR

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-24 17:37:45 +00:00
Tao ChenandEvan Mattson c304c8beca Python: restructure integration tests (#9331)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Our integration tests for the embedding services and memory are not set
up in a way that makes it easy for developers to add test cases.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Restructure the tests so that it's easier to add new tests when a new
service is created.
2. Reduce duplicate code.
3. Add Ollama embedding service tests.

> Note: Besides the new Ollama tests, no other tests are added or
dropped.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-23 22:08:44 +00:00
Evan Mattson ae05f2cd0b Python: Fix cancelled typo (#9389)
### Motivation and Context

An agent terminal status was misspelled: canceled -> cancelled

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Fixing the spelling.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-23 12:16:51 -04:00
Evan Mattson a6d0425724 Python: Add ability to specify a default timeout for the polling operation. (#9386)
### Motivation and Context

With OpenAI assistants there is currently no way to specify a polling
timeout. For long running operations, or other ones that fail to
complete this can be dangerous as the polling code could run infinitely,
theoretically.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR adds the ability to specify a `run_polling_timeout` attribute as
part of the `run_polling_options`.
- Adds the `incomplete` status to the list of error states. 
- Adds a unit test for the run polling timeout as well as the incomplete
returned state.
- Closes #9364 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-22 14:48:32 -04:00
Evan Mattson 12a31daac8 Python: Return streaming tool call output to the caller (#9362)
### Motivation and Context

The streaming function call content, function result content, or code
interpreter output was not being streamed back to the caller chunk by
chunk.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR enabled yielding the proper chunks to the caller based on
handling the `thread.run.step.delta` event.
- Fixes #9352 
- Adds test coverage
- Fixes a separate mypy issue related to BinaryContent

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-22 13:20:27 -04:00
redblacktreeandEvan Mattson 2577cc9e51 Python: Fix typo in 06-memory-and-embeddings.ipynb notebook (#9257)
Fixes #9256

Fixes typo that prevents the notebook from running properly in the
OpenAI configuration.

---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/microsoft/semantic-kernel/issues/9256?shareId=90a652be-0710-499c-9bf9-bf8359ab7287).

Co-authored-by: Evan Mattson <[email protected]>
2024-10-18 17:50:20 +00:00
Tao Chen dbf18199e0 Python: Restructure connector unit tests (#9316)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Folder restructure for our connector unit tests to align with the source
folder structure. This makes it easier for developers to add future unit
tests.

No test cases are dropped or added. This PR only moves files around.

In addition, we notice that the sequential planner fails occasionally
with Azure OpenAI due to a new content policy. We decided to skip tests
related to the sequential planner since we are no longer supporting it.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-10-17 20:33:52 +00:00
Jerome TremblayandEvan Mattson 4c8e81e399 Python: Fix issue with default opentelemetry metric in pydantic base model (#9292)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
- This is fixing an issue with the default opentelemery metric in
KernelFunction. This issue is with SemanticKernel version >= 1.8
causing 
`TypeError: cannot pickle '_thread.RLock' object`
when importing SemanticKernel

- This is blocking us from updating to the latest SemanticKernel
version.

It is difficult to reproduce outside my application code. But is seems
to be the same issue mentioned in
#9057 and #9012 

changing to a Field with a default factory solve the issue.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

- Updating the default metrics value to use a Field with a
default_factory

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-10-17 18:00:42 +00:00
Tao ChenandEvan Mattson 0b96a81ab9 Python: Weaviate vector store (#9101)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Add Weaviate DB to Semantic Kernel with the new vector store and vector
collection interfaces.

Address: https://github.com/microsoft/semantic-kernel/issues/6553

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-17 17:46:11 +00:00
Elizabeth HalperandEvan Mattson ec9233cc34 Python: Fix AI Search Environment Variables (#9160)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Updating the AI Search environment variables to follow convention and
match the code as it was throwing an error and unable to connect to the
service as it was. It also loads in the environment properly using the
dotenv package.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-11 13:38:33 +00:00
Tao Chen 481d16a749 Python: Bedrock connector (#9100)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Add Amazon Bedrock AI to Semantic Kernel.

Amazon Bedrock is a platform on AWS that offers access to a wide range
to LLMs, including proprietary Amazon Titan models.

We are integrating it into Semantic Kernel as one of our AI connectors
to provide more options to developers.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. All interfaces implemented: chat completion (streaming +
non-streaming), text completion (streaming + non-streaming), and text
embedding.
2. Supports for function calling.
3. Supports for image content.
4. Supports for all models available on Bedrock.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-10-10 22:33:42 +00:00
b9e1133091 Python: #6761 Onnx Connector (#8106)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

 1. Why is this changed required ?
To enable Onnx Models with Semantic Kernel, there was the issue #6761 in
the Backlog to add a Onnx Connector
2. What problem does it solve ?
It solves the problem, that semantic kernel is not yet integrated with
Onnx Gen Ai Runtime
3. What scenario does it contribute to?
The scenario is to use different connector than HF,OpenAI or
AzureOpenAI. When User's want to use Onnx they can easliy integrate it
now
4. If it fixes an open issue, please link to the issue here.
#6761

### Description

The changes made are designed by my own based on other connectors, i
tried to stay as close as possible to the structure.
For the integration i installed the mistral python package in the
repository.

I added the following Classes :

- OnnxCompletionBase --> Responsible to control the inference
- OnnxTextCompletion --> Inherits from OnnxCompletionBase 
    - Support for Text Completion with and without Images
    - Ready for Multimodal Inference
    - Ready for Text Only Inference
- Supports all Models on
[onnxruntime-genai](https://github.com/microsoft/onnxruntime-genai)
- OnnxChatCompletion -->Inherits from OnnxCompletionBase
    - Support for Text Completion with and without Images
- The user needs to provide the corresponding chat template to use this
class
    - Ready for Multimodal Inference
    - Ready for Text Only Inference
- Supports all Models on
[onnxruntime-genai](https://github.com/microsoft/onnxruntime-genai)


What is integrated yet :

- [X] OnnxCompletionBase Class
- [x]  OnnxChatCompletionBase Class with Dynamic Template Support
- [x]  OnnxTextCompletionBase Class
- [x] Sample Multimodal Inference with Phi3-Vision
- [x] Sample of OnnxChatCompletions with Phi3
- [x] Sample of OnnxTextCompletions with Phi3
- [x]  Integration Tests
- [x]  Unit Tests


### Some Notes



### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Tao Chen <[email protected]>
Co-authored-by: Eduard van Valkenburg <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2024-10-10 17:41:21 +00:00
Nico JandEvan Mattson ac2c56ef46 Python: Update 05-using-the-planner.ipynb (#9142)
Fixing issue in the
`python/samples/getting_started/05-using-the-planner` notebook as it is
assigning the wrong variable to John's email example.

### Motivation and Context
If you run the stepwise planner sample, the logs will confirm that the
planner wasn't able to get john's email as the `get_email` function was
assigning the wrong variable and the response was empty

### Description

small change updating the variable assignment 

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-10-09 14:31:39 +00:00
ふぁーandEvan Mattson 4914d0a07b Python: Add 'low' Severity Level to ContentFilterResultSeverity Enum (#9103)
### Motivation and Context

I am submitting this pull request to address a missing definition in the
`ContentFilterResultSeverity` enumeration within the Azure OpenAI
content filtering framework. This omission has been causing an exception
when the content filter should detect certain conditions.

### Description

Currently, when a content filter exception is triggered, it results in a
`ValueError` due to the absence of a 'low' severity level in the
`ContentFilterResultSeverity` enum. The error traceback is as follows:

```bash
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                                             
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/chat_completion_client_base.py", line 139, in get_chat_message_contents                                                                                                                                                                                                  
    completions = await self._inner_get_chat_message_contents(chat_history, settings)                                                                                                                                                                                                                                                                                                          
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                          
  File ".venv/lib/python3.11/site-packages/semantic_kernel/utils/telemetry/model_diagnostics/decorators.py", line 83, in wrapper_decorator                                                                                                                                                                                                        
    return await completion_func(*args, **kwargs)                                                                                                                                                                                                                                                                                                                                              
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                              
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py", line 88, in _inner_get_chat_message_contents                                                                                                                                                                          
    response = await self._send_request(request_settings=settings)                                                                                                                                                                                                                                                                                                                             
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                             
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/open_ai/services/open_ai_handler.py", line 54, in _send_request                                                                                                                                                                                                          
    raise ContentFilterAIException(                                                                                                                                                                                                                                                                                                                                                            
          ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                                            
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/open_ai/exceptions/content_filter_ai_exception.py", line 87, in __init__                                                                                                                                                                                                 
    self.content_filter_result = {                                                                                                                                                                                                                                                                                                                                                             
                                ^                                                                                                                                                                                                                                                                                                                                                             
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/open_ai/exceptions/content_filter_ai_exception.py", line 88, in <dictcomp>                                                                                                                                                                                               
    key: ContentFilterResult.from_inner_error_result(values)                                                                                                                                                                                                                                                                                                                                   
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                   
  File ".venv/lib/python3.11/site-packages/semantic_kernel/connectors/ai/open_ai/exceptions/content_filter_ai_exception.py", line 43, in from_inner_error_result                                                                                                                                                                                  
    severity=ContentFilterResultSeverity(                                                                                                                                                                                                                                                                                                                                                      
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
ValueError: 'low' is not a valid ContentFilterResultSeverity 
```

In some cases, Azure OpenAI's Content Filter assigns a 'low' severity
level. For instance, the error message below indicates such a scenario:

```bash
openai.BadRequestError: Error code: 400 - {'error': {'message': "The response was filtered due to the prompt triggering Azure OpenAI's content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766", ... 'severity': 'low'}}}}
```

To resolve this issue, I have added 'LOW' as a valid severity level in
the ContentFilterResultSeverity enum as shown below:

```py
class ContentFilterResultSeverity(Enum):
    """The severity of the content filter result."""
    HIGH = "high"
    MEDIUM = "medium"
    SAFE = "safe"
    LOW = "low"  # Added this line
```

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-10-09 13:18:20 +00:00
ChrisandEvan Mattson 60d555e7e7 Python/.Net: Agent Resources for Learn-Site Update (#9104)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Learn Site Resources for Agent Framework docs 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Resources and code associated with examples

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-08 15:57:57 +00:00
Rob EmanueleandEvan Mattson 4cafb95198 Python: Add Vector Store to PostgreSQL connector (#8951)
### Motivation and Context

This PR updates the postgres memory connector to the new memory
architecture.

### Description

It adds a `PostgresStore` and `PostgresCollection` to
`semantickernel.connectors.memory.postgres`, along with unit tests,
integration tests, inclusion in the `new_memory.py` sample, and a
getting started notebook.

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2024-10-07 21:08:19 +00:00
Evan Mattson de80f8c1f4 Python: Include streaming code output for OpenAI Assistants (#9080)
### Motivation and Context

In the recent release of OpenAI Assistant streaming responses, there was
a gap related to not exposing code interpreter output, when available.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR closes that gap, and adds the ability to yield messages that
contain code input/output. A new concept sample was added to show this.
- Unit test coverage also added.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-03 15:08:47 +00:00
Evan Mattson 3e7ff12298 Python: Bump Python version to 1.11.0 for a release. (#9065)
### Motivation and Context

Bump Python version to 1.11.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.11.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-02 18:06:40 +00:00
Evan Mattson f08cf3c778 Python: Add support for streaming OpenAI assistants (#9055)
### Motivation and Context

OpenAI assistants were introduced several versions ago; however, there
was open work to support streaming for OpenAI assistants v2. Work to
support streaming assistants was also needed in Agent Group Chat
scenarios.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR introduces:
- Support for streaming with (Azure) OpenAI assistants
- Support for Agent Chat Scenarios that can now leverage a streaming
invoke instead of just a sync invoke.
- Unit tests to increase the test coverage to near 100% for the newly
added code
- Adds a few more OpenAI assistant agent samples
- Closes #7267 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-10-02 16:00:11 +00:00
ca17571da1 Python: Anthropic function calling update (#8943)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Add function calling support to Anthropic 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Override the base methods related to function calling in the chat
completion base, tested with samples file, added unit tests. Similar to
the `OpenAIChatCompletion` and `MistralAIChatCompletion`
implementations.

Anthropic supports `auto`, `any`, and `tool` options for `tool_choice`,
but SK doesn't implement `tool` behavior so that is not implemented in
this chat completion class.
https://docs.anthropic.com/en/docs/build-with-claude/tool-use#controlling-claudes-output.

Anthropic leverages chain of thought often when using tools and this
gets returned similar to other text content.

https://docs.anthropic.com/en/docs/build-with-claude/tool-use#chain-of-thought

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Tao Chen <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2024-10-02 14:07:55 +00:00
dependabot[bot]andEvan Mattson de734a2b71 Python: Bump torch from 2.2.2 to 2.4.1 in /python (#8650)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.2.2 to 2.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytorch/pytorch/releases">torch's
releases</a>.</em></p>
<blockquote>
<h2>PyTorch 2.4.1 Release, bug fix release</h2>
<p>This release is meant to fix the following issues (regressions /
silent correctness):</p>
<h3>Breaking Changes:</h3>
<ul>
<li>The pytorch/pytorch docker image now installs the PyTorch package
through pip and has switch its conda installation from miniconda to <a
href="https://github.com/conda-forge/miniforge">miniforge</a> (<a
href="https://redirect.github.com/pytorch/pytorch/pull/134274">#134274</a>)</li>
</ul>
<h3>Windows:</h3>
<ul>
<li>Fix performance regression on Windows related to MKL static linking
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/130619">#130619</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/pull/130697">#130697</a>)</li>
<li>Fix error during loading on Windows: [WinError 126] The specified
module could not be found. (<a
href="https://redirect.github.com/pytorch/pytorch/issues/131662">#131662</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/pull/130697">#130697</a>)</li>
</ul>
<h3>MPS:</h3>
<ul>
<li>Fix tensor.clamp produces wrong values (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130226">#130226</a>)</li>
<li>Fix Incorrect result from batch norm with sliced inputs (<a
href="https://redirect.github.com/pytorch/pytorch/pull/133610">#133610</a>)</li>
</ul>
<h3>ROCM:</h3>
<ul>
<li>Fix for launching kernel invalid config error when calling embedding
with large index (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130994">#130994</a>)</li>
<li>Added a check and a warning when attempting to use hipBLASLt on an
unsupported architecture (<a
href="https://redirect.github.com/pytorch/pytorch/pull/128753">#128753</a>)</li>
<li>Fix image corruption with Memory Efficient Attention when running
HuggingFace Diffusers Stable Diffusion 3 pipeline (<a
href="https://redirect.github.com/pytorch/pytorch/pull/133331">#133331</a>)</li>
</ul>
<h3>Distributed:</h3>
<ul>
<li>Fix FutureWarning when using torch.load internally (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130663">#130663</a>)</li>
<li>Fix FutureWarning when using torch.cuda.amp.autocast internally (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130660">#130660</a>)</li>
</ul>
<h3>Torch.compile:</h3>
<ul>
<li>Fix exception with torch compile when onnxruntime-training and
deepspeed packages are installed. (<a
href="https://redirect.github.com/pytorch/pytorch/pull/131194">#131194</a>)</li>
<li>Fix silent incorrectness with torch.library.custom_op with mutable
inputs and torch.compile (<a
href="https://redirect.github.com/pytorch/pytorch/pull/133452">#133452</a>)</li>
<li>Fix SIMD detection on Linux ARM (<a
href="https://redirect.github.com/pytorch/pytorch/pull/129075">#129075</a>)</li>
<li>Do not use C++20 features in cpu_inducotr code (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130816">#130816</a>)</li>
</ul>
<h3>Packaging:</h3>
<ul>
<li>Fix for exposing statically linked libstdc++ CXX11 ABI symbols (<a
href="https://redirect.github.com/pytorch/pytorch/pull/134494">#134494</a>)</li>
<li>Fix error while building pytorch from source due to not missing
QNNPACK module (<a
href="https://redirect.github.com/pytorch/pytorch/pull/133177">#131864</a>)</li>
<li>Make PyTorch buildable from source on PowerPC (<a
href="https://redirect.github.com/pytorch/pytorch/pull/129736">#129736</a>)</li>
<li>Fix XPU extension building (<a
href="https://redirect.github.com/pytorch/pytorch/pull/132847">#132847</a>)</li>
</ul>
<h3>Other:</h3>
<ul>
<li>Fix warning when using pickle on a nn.Module that contains tensor
attributes (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130246">#130246</a>)</li>
<li>Fix NaNs return in MultiheadAttention when need_weights=False (<a
href="https://redirect.github.com/pytorch/pytorch/pull/130014">#130014</a>)</li>
<li>Fix nested tensor MHA produces incorrect results (<a
href="https://redirect.github.com/pytorch/pytorch/issues/130196">#130196</a>)</li>
<li>Fix error when using torch.utils.flop_counter.FlopCounterMode (<a
href="https://redirect.github.com/pytorch/pytorch/pull/134467">#134467</a>)</li>
</ul>
<h3>Tracked Regressions:</h3>
<ul>
<li>The experimental remote caching feature for Inductor's autotuner
(enabled via TORCHINDUCTOR_AUTOTUNE_REMOTE_CACHE) is known to still be
broken in this release and actively worked on in main. Following Error
is generated: redis.exceptions.DataError: Invalid input of type: 'dict'.
Please use nightlies if you need this feature (reported and Fixed by PR:
<a
href="https://redirect.github.com/pytorch/pytorch/pull/134032">#134032</a>)</li>
</ul>
<p>Release tracker <a
href="https://redirect.github.com/pytorch/pytorch/issues/132400">#132400</a>
contains all relevant pull requests related to this release as well as
links to related issues.</p>
<h2>PyTorch 2.4: Python 3.12, AOTInductor freezing, libuv backend for
TCPStore</h2>
<h1>PyTorch 2.4 Release Notes</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytorch/pytorch/commit/ee1b6804381c57161c477caa380a840a84167676"><code>ee1b680</code></a>
[Doc] Fix rendering of the unicode characters (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134695">#134695</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/79c88679b9f0bf92ea0eaff774bf7a304dc52369"><code>79c8867</code></a>
Fix docstring for torch.signal.windows.nuttall (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134704">#134704</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/38b96d3399a695e704ed39b60dac733c3fbf20e2"><code>38b96d3</code></a>
Do not use <code>\&lt;filesystem&gt;</code> on Linux (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134494">#134494</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/134604">#134604</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/b84e8c684837f8b35832914f71ae39b03c3e5f3e"><code>b84e8c6</code></a>
Move module_tracker to logging for confused hierarchy (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134467">#134467</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/134501">#134501</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/6a79d4afcd0b244b88e144479ff46e9c9a5ead01"><code>6a79d4a</code></a>
[ROCm] Prevent accidental enablement of efficient attention. (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134531">#134531</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/e0ddbffbc33ef8a0f5a8cbdaded7b73ffd92a61a"><code>e0ddbff</code></a>
[Release Only] Disable flaky failing tests in release. Pin optree. Pin
sympy ...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/314f033e657be111d413f2617d1bb94afba46b88"><code>314f033</code></a>
Use ephemeral runners for windows nightly builds (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134463">#134463</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/134496">#134496</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/9c1f78e01830abb811021aa3e4b14089e31886b9"><code>9c1f78e</code></a>
[CD] Use ephemeral arm64 runners for nightly and docker builds (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134473">#134473</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/13">#13</a>...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/3675fc52ae797ed190ddab66f081fef9cbc2d12a"><code>3675fc5</code></a>
Use ephemeral runners for linux nightly builds (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134367">#134367</a>)
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/134492">#134492</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/920c023664baf3379c51a09d21d4b41c236044f3"><code>920c023</code></a>
docker: Use miniforge, install from pip (<a
href="https://redirect.github.com/pytorch/pytorch/issues/134497">#134497</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytorch/pytorch/compare/v2.2.2...v2.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=torch&package-manager=pip&previous-version=2.2.2&new-version=2.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2024-10-02 14:06:17 +00:00
dependabot[bot]andEvan Mattson d8eee17afe Python: Update pymilvus requirement from <2.4,>=2.3 to >=2.3,<2.5 in /python (#8383)
Updates the requirements on
[pymilvus](https://github.com/milvus-io/pymilvus) to permit the latest
version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/milvus-io/pymilvus/releases">pymilvus's
releases</a>.</em></p>
<blockquote>
<h2>PyMilvus 2.4.5 Release Notes</h2>
<h2>New features</h2>
<ul>
<li>feat: Support clustering compaction by <a
href="https://github.com/wayblink"><code>@​wayblink</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2220">milvus-io/pymilvus#2220</a></li>
</ul>
<h2>Enhancements</h2>
<ul>
<li>Export indexed rows for describe_index (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2148">#2148</a>)
by <a
href="https://github.com/xiaocai2333"><code>@​xiaocai2333</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2149">milvus-io/pymilvus#2149</a></li>
<li>Refine the error message for type mismatches during data insertion
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2156">#2156</a>)
by <a
href="https://github.com/xiaocai2333"><code>@​xiaocai2333</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2157">milvus-io/pymilvus#2157</a></li>
<li>Add database operations to MilvusClient (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2152">#2152</a>)
by <a href="https://github.com/ashkrisk"><code>@​ashkrisk</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2164">milvus-io/pymilvus#2164</a></li>
<li>enhance: Remove the logic to set replica_number=1 by default (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2163">#2163</a>)
by <a href="https://github.com/weiliu1031"><code>@​weiliu1031</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2167">milvus-io/pymilvus#2167</a></li>
<li>enhance: enable setting properties during create database (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2168">#2168</a>)
by <a href="https://github.com/weiliu1031"><code>@​weiliu1031</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2174">milvus-io/pymilvus#2174</a></li>
<li>enhance:expose reduce_stop_for_best to users(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2181">#2181</a>)
by <a
href="https://github.com/MrPresent-Han"><code>@​MrPresent-Han</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2188">milvus-io/pymilvus#2188</a></li>
<li>enhance: hide zero values ​​when printing by <a
href="https://github.com/SimFG"><code>@​SimFG</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2201">milvus-io/pymilvus#2201</a></li>
<li>Limit milvus-lite files to end with .db by <a
href="https://github.com/junjiejiangjjj"><code>@​junjiejiangjjj</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2216">milvus-io/pymilvus#2216</a></li>
<li>enhance: use info level for retry message by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2213">milvus-io/pymilvus#2213</a></li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>fix: Coding style by latest ruff by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2158">milvus-io/pymilvus#2158</a></li>
<li>fix: Edit setuptools upper version for py380 by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2180">milvus-io/pymilvus#2180</a></li>
<li>Don't export rows info in index params by <a
href="https://github.com/xiaocai2333"><code>@​xiaocai2333</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2191">milvus-io/pymilvus#2191</a></li>
<li>fix: remove limitation clustering key can not be primary key by <a
href="https://github.com/wayblink"><code>@​wayblink</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2196">milvus-io/pymilvus#2196</a></li>
<li>fix: unclear error msg for varchar field by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2209">milvus-io/pymilvus#2209</a></li>
<li>fix: select a single column consisting of a list of column names(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2210">#2210</a>)
by <a
href="https://github.com/smellthemoon"><code>@​smellthemoon</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2211">milvus-io/pymilvus#2211</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/milvus-io/pymilvus/compare/v2.4.4...v2.4.5">https://github.com/milvus-io/pymilvus/compare/v2.4.4...v2.4.5</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/afbd4204408c74fec8305f7da7f8a992d02eb627"><code>afbd420</code></a>
feat: [cherry-pick] Support clustering compaction (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2220">#2220</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/a44151686e954b3f7571e93fd3b0b85de84e4210"><code>a441516</code></a>
Update milvus-proto version (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2217">#2217</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/69d0e65ebb210e6af52345501db5ac4642d80f2d"><code>69d0e65</code></a>
enhance: use info level for retry message (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2213">#2213</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/730efef08ccdc6171f28160aa68ec74e3b96d7dc"><code>730efef</code></a>
[cherry-pick] Limit milvus-lite files to end with .db (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2216">#2216</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/5bf0a2447c5e1be8e3f754a4f3cb5c4e323c23e7"><code>5bf0a24</code></a>
fix: select a single column consisting of a list of column names(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2210">#2210</a>)
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2211">#2211</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/dc13969a041008fd04364ca71ff9b518105c241a"><code>dc13969</code></a>
fix: [2.4]unclear error msg for varchar field (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2209">#2209</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/ea4077c5bb85c7a60d0071ee0085d5491f5b26e2"><code>ea4077c</code></a>
enhance: hide zero values ​​when printing (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2201">#2201</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/029403a90508448e54e3860aaa4c01bf634951ef"><code>029403a</code></a>
fix: [cherry-pick] remove limitation clustering key can not be primary
key (#...</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/926c9aa29e7dfb3bb566e630b353760072a16dc8"><code>926c9aa</code></a>
[cherry-pick] Don't export rows info in index params (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2191">#2191</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/93be83a854d2aef3e22eb68d6d2d22157203e378"><code>93be83a</code></a>
enhance:expose reduce_stop_for_best to users(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2181">#2181</a>)
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2188">#2188</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/milvus-io/pymilvus/compare/v2.3.0...v2.4.5">compare
view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2024-10-01 21:00:28 +00:00
Tao Chen cdb2d5930b Python: Improve exception log message in streaming content merge item list (#9052)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Exceptions are expected to happen when merging the item lists from two
chat streaming contents. When all attempts fail, the new item will
simply be added to the end of the list.

The `WARN` log level is too high for this event.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Reduce the log level of the event to `DEBUG`.
2. Add an additional log message for the event when all attempts have
failed.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-10-01 17:17:27 +00:00
Evan Mattson 4c80c2f0e5 Python: Bump python version to 1.10.1 for a release. (#9033)
### Motivation and Context

Bump python version to 1.10.1 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump python version to 1.10.1 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-09-30 16:05:28 +00:00
Evan Mattson d53a6f2131 Python: Azure identity needs to be a default dependency (#9031)
### Motivation and Context

After introducing entra auth as an option for AzureChatCompletion and
AzureAI Inference, we need to make sure that the azure-identity library
is installed by default as a dependency.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

install azure-identity as a default dependency so that
AzureChatCompletion doesn't break.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-09-30 15:01:30 +00:00
ce6ccd7e86 Python: Guided Conversations Sample v0.1.0 (#6905)
### Motivation and Context

This is a Python sample/demo which highlights a framework for a pattern
of use agentic cases we refer to as guided conversations. These are
scenarios where an agent with a goal and constraints leads a
conversation. See the README for more details.

### Description

See README and sample notebooks.

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Natalie Isak <[email protected]>
Co-authored-by: natalie-isak <[email protected]>
2024-09-26 23:10:33 +00:00
Evan Mattson e82084b850 Python: Bump Python version to 1.10.0 from 1.9.0 for a release. (#9004)
### Motivation and Context

Bump Python version to 1.10.0 from 1.9.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.10.0 from 1.9.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-09-26 16:47:43 +00:00
Tao ChenandBen Thomas 5c5d761c6f Python: Streaming content for token usage (#8902)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
OpenAI recently starts providing token usage information on their
streaming chat completion API. This ADR opens the discussion on how we
should consume that information within our `StreamingChatMessageContent`
data structure.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

1. An ADR documenting 4 approaches.
2. Implementation of the selected approach.
3. Fix issues where data in the streaming contents are modified after
concatenation (`__add__`).
4. Add streaming to model diagnostics operation names so that we can
distinguish streaming and non-streaming operations.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Ben Thomas <[email protected]>
2024-09-26 00:03:42 +00:00