1. Fix missing `this.` and `Async` suffix
2. Fix some indentation, spacing, etc.
3. Enable these rules and format accordingly:
IDE0001: Simplify name
IDE0005: Remove unnecessary using directives
IDE0009: Add this or Me qualification
IDE0011: Add braces
IDE0018: Inline variable declaration
IDE0032: Use auto-implemented property
IDE0034: Simplify 'default' expression
IDE0035: Remove unreachable code
IDE0040: Add accessibility modifiers
IDE0049: Use language keywords instead of framework type names for type
references
IDE0050: Convert anonymous type to tuple
IDE0051: Remove unused private member
IDE0055: Formatting rule
IDE0060: Remove unused parameter
IDE0070: Use 'System.HashCode.Combine'
IDE0071: Simplify interpolation
IDE0073: Require file header
IDE0082: Convert typeof to nameof
IDE0090: Simplify new expression
IDE0161: Use file-scoped namespace
### Motivation and Context
Python integration tests were failing consistently for 2 reasons. First,
all ubuntu system tests were failing due to missing shared object files
related to cuda. Second, macOS + python 3.11 tests were failing due to
hsnwlib unable to install on native hardware.
See https://github.com/microsoft/semantic-kernel/pull/1066 for
description of changes to integration test code to condense test code,
make better use of pytest fixtures, and reduce the number of calls to
external APIs (OpenAI, AOAI)
### Description
- Integration tests were failing on Linux due to a regression in python
torch=2.0.1. Downgrading the version to 2.0.0 resolved these failures.
- For MacOS + 3.11 specifically, setting the environment variable
`HNSWLIB_NO_NATIVE=1` ensures that the hnswlib wheel can be built and
installed properly on M1 hardware.
- Python integration tests reliably and consistently passing:
https://github.com/microsoft/semantic-kernel/actions/runs/5035748596
Add support for Chroma https://docs.trychroma.com/
> Chroma is the open-source embedding database. Chroma makes it easy to
build LLM apps by making knowledge, facts, and skills pluggable for
LLMs.
### Motivation and Context
* #403 Support for Chroma embedding database
* #426 Python: feat: add chroma memory store
* #449 Python: feat: add chroma memory store
---------
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
New SDKs raise warnings about our SDK including prerelease dependencies
in a stable package.
_warning NU5104: A stable release of a package should not have a
prerelease dependency. Either modify the version spec of dependency
"Azure.Search.Documents [11.5.0-beta.2, )" or update the version field
in the nuspec._
### Description
Marking as "-pre" so that the builds know that we are a prerelease
package too. This will not affect the names of the builds we ship, as
those are overridden when packaging.
Currently we have a matrix of 12 test sets, running in parallel, that
keep failing even when using a retry and exponential backoff.
Change python integration tests parallelism to 1 to reduce failures
caused by OpenAI and Azure OpenAI throttling.
### Motivation and Context
The release of Python SK from 0.2.4 -> 0.2.6 significantly increased the
size of the pip package. The dependencies causing this are not core to
the kernel, so this PR establishes a pattern for SK connector
dependencies (ex: Hugging Face, memory storage)
### Description
- Added a poetry group called hugging_face - this is the same name as
the connectors namespace in the code.
- Added dependency installs to the Hugging Face sample notebook.
- removed Hugging Face dependencies from requirements.txt.
- Added import errors for torch, transformers, and sentence-transformers
in the hugging_face connector classes.
- Added command `--with hugging_face` to integration test setup.
This check is extremely slow, and is now running on any PRs with changes under samples/, including most unrelated dotnet changes. Restricting to samples/apps, which is where all the node projects live.
### Motivation and Context
Run python integration tests on every push to main, and every 12 hours.
These integration tests will run on every push to main as well as twice
a day. At the time of this PR, we are seeing ~3 PRs to the python SK per
day. Each Integration test run will make ~32 AI requests. For each PR,
12 runs will be made: 3 each for python 3.8, 3.9, 3.10, and 3.11 for a
total of ~400 calls per push to main.
We should re-evaluate the trigger on pushes to main if PRs to the python
SK significantly increase.
### Description
- add workflow definition for integration tests
- Example run:
https://github.com/microsoft/semantic-kernel/actions/runs/4874609026/jobs/8695771345?pr=763
- For push triggers, add path checks for dotnet/** or python/**
depending on the type of workflow
- pinned requirements.txt dependencies to the versions pinned in the
pyproject.toml file to ensure parity between pip package dependencies
and local code
**Note**: Integration tests are failing on windows with python 3.8 -
already captured a task to address the problem
### Motivation and Context
This PR introduces the ability to run formal integration tests for
python using pytest - separated from unit tests for easier automation.
### Description
- moved `python/tests/end-to-end` directory to
`python/tests/integration`
- renamed integration tests to test_* pattern so pytest will detect them
- import `GenerationConfig` for hugging face completions - according to
logs, this is the recommended practice
### Motivation and Context
Integration tests have stopped running due to #596
### Description
This updates the yml to properly include any projects of the form
`*IntegrationTests.csproj`
There are failing tests due to changes recently that were not caught.
Will fix those separately.
This commit simplifies the labeler rules for the kernel label by using
the any and all operators instead of a list of patterns. This makes the
rules more readable and easier to maintain and ensures `kernel` label is
used as appropriate. The logic of the rules still exclude the
SemanticKernel and SemanticKernel.Abstractions projects from the kernel
label but will now include if only non-core kernel changes are made.