Skip to content

Commit

Permalink
Revert "Python: .Net Ollama (Merge main) (#7231)"
Browse files Browse the repository at this point in the history
This reverts commit 2def240.
  • Loading branch information
RogerBarreto authored Jul 12, 2024
1 parent 2def240 commit 86f8d09
Show file tree
Hide file tree
Showing 221 changed files with 4,039 additions and 10,996 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_graduation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ about: Plan the graduation of an experimental feature

Checklist to be completed when graduating an experimental feature

- [ ] Notify PM's and EM's that feature is ready for graduation
- [ ] Notify PM's and EM's that feature is read for graduation
- [ ] Contact PM for list of sample use cases
- [ ] Verify there are sample implementations​ for each of the use cases
- [ ] Verify telemetry and logging are complete
- [ ] ​Verify API docs are complete and arrange to have them published
- [ ] Make appropriate updates to Learn docs​
- [ ] Make appropriate updates to Concept samples
- [ ] Make appropriate updates to Blog posts
- [ ] Male appropriate updates to Blog posts
- [ ] Verify there are no serious open Issues​​
- [ ] Update table in EXPERIMENTS.md
- [ ] Remove SKEXP​ flag from the experimental code
4 changes: 0 additions & 4 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ jobs:
AZURE_KEY_VAULT_CLIENT_ID: ${{secrets.AZURE_KEY_VAULT_CLIENT_ID}}
AZURE_KEY_VAULT_CLIENT_SECRET: ${{secrets.AZURE_KEY_VAULT_CLIENT_SECRET}}
ACA_POOL_MANAGEMENT_ENDPOINT: ${{secrets.ACA_POOL_MANAGEMENT_ENDPOINT}}
MISTRALAI_API_KEY: ${{secrets.MISTRALAI_API_KEY}}
MISTRALAI_CHAT_MODEL_ID: ${{ vars.MISTRALAI_CHAT_MODEL_ID }}
run: |
if ${{ matrix.os == 'ubuntu-latest' }}; then
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
Expand Down Expand Up @@ -165,8 +163,6 @@ jobs:
AZURE_KEY_VAULT_CLIENT_ID: ${{secrets.AZURE_KEY_VAULT_CLIENT_ID}}
AZURE_KEY_VAULT_CLIENT_SECRET: ${{secrets.AZURE_KEY_VAULT_CLIENT_SECRET}}
ACA_POOL_MANAGEMENT_ENDPOINT: ${{secrets.ACA_POOL_MANAGEMENT_ENDPOINT}}
MISTRALAI_API_KEY: ${{secrets.MISTRALAI_API_KEY}}
MISTRALAI_CHAT_MODEL_ID: ${{ vars.MISTRALAI_CHAT_MODEL_ID }}
run: |
if ${{ matrix.os == 'ubuntu-latest' }}; then
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/python-samples-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# This workflow will run all python samples tests.
#

name: Python Samples Tests

on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 0" # Run at 1AM UTC daily on Sunday

jobs:
python-samples-tests:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
service: ['AzureOpenAI']
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Run samples Tests
id: run_tests
shell: bash
env: # Set Azure credentials secret as an input
GLOBAL_LLM_SERVICE: ${{ matrix.service }}
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME }}
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT_NAME }}
AZURE_OPENAI_TEXT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_TEXT_DEPLOYMENT_NAME }}
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
BING_API_KEY: ${{ secrets.BING_API_KEY }}
OPENAI_CHAT_MODEL_ID: ${{ vars.OPENAI_CHAT_MODEL_ID }}
OPENAI_TEXT_MODEL_ID: ${{ vars.OPENAI_TEXT_MODEL_ID }}
OPENAI_EMBEDDING_MODEL_ID: ${{ vars.OPENAI_EMBEDDING_MODEL_ID }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE__APIKEY }}
POSTGRES_CONNECTION_STRING: ${{secrets.POSTGRES__CONNECTIONSTR}}
AZURE_AI_SEARCH_API_KEY: ${{secrets.AZURE_AI_SEARCH_API_KEY}}
AZURE_AI_SEARCH_ENDPOINT: ${{secrets.AZURE_AI_SEARCH_ENDPOINT}}
MONGODB_ATLAS_CONNECTION_STRING: ${{secrets.MONGODB_ATLAS_CONNECTION_STRING}}
run: |
cd python
poetry run pytest ./tests/samples -v
38 changes: 20 additions & 18 deletions .github/workflows/python-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,59 @@ on:
types:
- in_progress

env:
PYTHON_VERSION: "3.10"
RUN_OS: ubuntu-latest

jobs:
python-tests-coverage:
runs-on: ubuntu-latest
continue-on-error: true
name: Create Test Coverage Messages
runs-on: ${{ matrix.os }}
permissions:
pull-requests: write
contents: read
actions: read
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest]
steps:
- name: Wait for unit tests to succeed
continue-on-error: true
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Python Unit Tests (${{ env.PYTHON_VERSION }}, ${{ env.RUN_OS }}, false)'
check-name: 'Python Unit Tests (${{ matrix.python-version}}, ${{ matrix.os }})'
repo-token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
wait-interval: 90
wait-interval: 10
allowed-conclusions: success
- uses: actions/checkout@v4
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}-${{ env.RUN_OS }}-${{ env.PYTHON_VERSION }}" >> $GITHUB_ENV
- name: Download coverage
continue-on-error: true
uses: dawidd6/action-download-artifact@v3
with:
name: python-coverage-${{ env.FILE_ID }}.txt
name: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
workflow: python-unit-tests.yml
search_artifacts: true
if_no_artifact_found: warn
- name: Download pytest
continue-on-error: true
uses: dawidd6/action-download-artifact@v3
with:
name: pytest-${{ env.FILE_ID }}.xml
name: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
workflow: python-unit-tests.yml
search_artifacts: true
if_no_artifact_found: warn
- name: Pytest coverage comment
continue-on-error: true
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
github-token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
pytest-coverage-path: python-coverage.txt
pytest-coverage-path: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
coverage-path-prefix: "python/"
title: "Python ${{ env.PYTHON_VERSION }} Test Coverage Report"
badge-title: "Py${{ env.PYTHON_VERSION }} Test Coverage"
title: "Python ${{ matrix.python-version }} Test Coverage Report"
badge-title: "Py${{ matrix.python-version }} Test Coverage"
report-only-changed-files: true
junitxml-title: "Python ${{ env.PYTHON_VERSION }} Unit Test Overview"
junitxml-path: pytest.xml
junitxml-title: "Python ${{ matrix.python-version }} Unit Test Overview"
junitxml-path: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
default-branch: "main"
unique-id-for-comment: python-${{ env.PYTHON_VERSION }}
unique-id-for-comment: python-${{ matrix.python-version }}
27 changes: 8 additions & 19 deletions .github/workflows/python-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,15 @@ jobs:
python-unit-tests:
name: Python Unit Tests
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false]
include:
- python-version: "3.13.0-beta.3"
os: "ubuntu-latest"
experimental: true
permissions:
contents: write
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}-${{ matrix.os }}-${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -38,20 +27,20 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: poetry install --with unit-tests
run: cd python && poetry install --with unit-tests
- name: Test with pytest
run: poetry run pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
run: cd python && poetry run pytest -q --junitxml=pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: python-coverage-${{ env.FILE_ID }}.txt
path: python/python-coverage.txt
name: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
path: python/python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
overwrite: true
retention-days: 1
retention-days: 1
- name: Upload pytest.xml
uses: actions/upload-artifact@v4
with:
name: pytest-${{ env.FILE_ID }}.xml
path: python/pytest.xml
name: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
path: python/pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
overwrite: true
retention-days: 1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.4.5
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is an SDK that integrates Large Language Models (LLMs) like
[Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service),
and [Hugging Face](https://huggingface.co/)
with conventional programming languages like C#, Python, and Java. Semantic Kernel achieves this
by allowing you to define [plugins](https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugins)
by allowing you to define [plugins](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/plugins)
that can be chained together
in just a [few lines of code](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/chaining-functions?tabs=Csharp#using-the-runasync-method-to-simplify-your-code).

Expand Down
6 changes: 3 additions & 3 deletions docs/decisions/0046-kernel-content-graduation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Pros:
- With no deferred content we have simpler API and a single responsibility for contents.
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` reference property, which is common for specialized contexts.
- Fully serializable.
- Fully serializeable.

Check warning on line 88 in docs/decisions/0046-kernel-content-graduation.md

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"serializeable" should be "serializable".
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Data Uri and Data can be dynamically generated
Expand Down Expand Up @@ -197,7 +197,7 @@ Pros:
- Can be used as a `BinaryContent` type
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` dedicated for referenced location.
- Fully serializable.
- Fully serializeable.

Check warning on line 200 in docs/decisions/0046-kernel-content-graduation.md

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"serializeable" should be "serializable".
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Can be retrieved
Expand Down Expand Up @@ -254,7 +254,7 @@ Pros:
- Can be used as a `BinaryContent` type
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` dedicated for referenced location.
- Fully serializable.
- Fully serializeable.

Check warning on line 257 in docs/decisions/0046-kernel-content-graduation.md

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"serializeable" should be "serializable".
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Can be retrieved
Expand Down
12 changes: 6 additions & 6 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<ItemGroup>
<PackageVersion Include="Azure.AI.ContentSafety" Version="1.0.0" />
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.17" />
<PackageVersion Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.4" />
<PackageVersion Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.3" />
<PackageVersion Include="Azure.Identity" Version="1.12.0" />
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.3.0" />
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.2.0" />
<PackageVersion Include="Azure.Search.Documents" Version="11.5.1" />
<PackageVersion Include="Handlebars.Net.Helpers" Version="2.4.1.5" />
<PackageVersion Include="Markdig" Version="0.37.0" />
Expand All @@ -28,13 +28,13 @@
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime" Version="1.18.1" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime" Version="1.18.0" />
<PackageVersion Include="FastBertTokenizer" Version="1.0.28" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.Memory.Data" Version="8.0.0" />
<PackageVersion Include="System.Numerics.Tensors" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="System.Text.Json" Version="8.0.2" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="OllamaSharp" Version="2.0.6" />
Expand All @@ -52,7 +52,7 @@
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.2.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
Expand All @@ -72,7 +72,7 @@
<!-- Plugins -->
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.0.2" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.2" />
<PackageVersion Include="DuckDB.NET.Data.Full" Version="1.0.1" />
<PackageVersion Include="DuckDB.NET.Data.Full" Version="1.0.0" />
<PackageVersion Include="DuckDB.NET.Data" Version="1.0.1" />
<PackageVersion Include="MongoDB.Driver" Version="2.25.0" />
<PackageVersion Include="Microsoft.Graph" Version="[4.51.0, 5)" />
Expand Down
Loading

0 comments on commit 86f8d09

Please sign in to comment.