Skip to content

Commit

Permalink
Merge branch 'feature_agent_serialization' of https://github.com/micr…
Browse files Browse the repository at this point in the history
…osoft/semantic-kernel into feature_agent_serialization
  • Loading branch information
crickman committed Nov 8, 2024
2 parents f3c5869 + e275908 commit 3899430
Show file tree
Hide file tree
Showing 880 changed files with 45,637 additions and 9,162 deletions.
1 change: 1 addition & 0 deletions .github/_typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extend-exclude = [
"PopulationByCountry.csv",
"PopulationByAdmin1.csv",
"WomensSuffrage.txt",
"SK-dotnet.sln.DotSettings"
]

[default.extend-words]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ jobs:
dotnet test -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx --collect:"XPlat Code Coverage" --results-directory:"TestResults/Coverage/" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute
done
- name: Run AOT Unit Tests
shell: pwsh
run: .github/workflows/test-aot-compatibility.ps1 ${{ matrix.dotnet }}

- name: Azure CLI Login
if: github.event_name != 'pull_request' && matrix.integration-tests
uses: azure/login@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
done
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dotnet-testresults-${{ matrix.configuration }}
path: ./TestResults
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
done
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dotnet-testresults-${{ matrix.configuration }}
path: ./TestResults
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
done
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dotnet-testresults-${{ matrix.configuration }}
path: ./TestResults
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-gatekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 3600
interval: 30
ignored: "python-tests-coverage"
ignored: python-tests-coverage
11 changes: 7 additions & 4 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
UV_PYTHON: "3.10"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
uses: astral-sh/setup-uv@v3
with:
version: "0.4.30"
enable-cache: true
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
- name: Check version
run: |
echo "Building and uploading Python package version: ${{ github.event.release.tag_name }}"
Expand Down
300 changes: 169 additions & 131 deletions .github/workflows/python-integration-tests.yml

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,22 @@ jobs:
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
- name: Restore uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
version: "0.4.30"
enable-cache: true
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- uses: pre-commit/[email protected]
name: Run Pre-Commit Hooks
with:
extra_args: --config python/.pre-commit-config.yaml
extra_args: --config python/.pre-commit-config.yaml --all-files
- name: Run Mypy
run: uv run mypy -p semantic_kernel --config-file mypy.ini
- name: Minimize uv cache
run: uv cache prune --ci
60 changes: 28 additions & 32 deletions .github/workflows/python-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ jobs:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false]
include:
- python-version: "3.13.0-beta.4"
os: "ubuntu-latest"
experimental: true
# include:
# - python-version: "3.13"
# os: "ubuntu-latest"
# experimental: true
# - python-version: "3.13t"
# os: "ubuntu-latest"
# experimental: true
# gil: 0
# - python-version: "3.13t"
# os: "ubuntu-latest"
# experimental: true
# gil: 1
env:
UV_PYTHON: ${{ matrix.python-version }}
permissions:
contents: write
defaults:
Expand All @@ -32,28 +42,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up uv
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up uv
if: ${{ matrix.os == 'windows-latest' }}
run: irm https://astral.sh/uv/install.ps1 | iex
shell: powershell
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Restore uv cache
id: cache
uses: actions/cache@v4
uses: astral-sh/setup-uv@v3
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
version: "0.4.30"
enable-cache: true
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with pytest
run: uv run pytest --junitxml=pytest.xml ./tests/unit
env:
PYTHON_GIL: ${{ matrix.gil }}
run: uv run --frozen pytest --junitxml=pytest.xml ./tests/unit
- name: Surface failing tests
if: always()
if: ${{ !matrix.experimental }}
uses: pmeier/pytest-results-action@main
with:
path: python/pytest.xml
Expand All @@ -73,26 +74,21 @@ jobs:
run:
working-directory: python
env:
PYTHON_VERSION: "3.10"
UV_PYTHON: "3.10"
steps:
- uses: actions/checkout@v4
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}" >> $GITHUB_ENV
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore uv cache
uses: actions/cache@v4
uses: astral-sh/setup-uv@v3
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/uv.lock') }}
version: "0.4.30"
enable-cache: true
cache-suffix: ${{ runner.os }}-${{ env.UV_PYTHON }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with pytest
run: uv run pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
run: uv run --frozen pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-aot-compatibility.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
param([string]$targetNetFramework)

$targetNetFramework = "net$targetNetFramework"

$rootDirectory = Get-Location

Write-Host "Publishing the SemanticKernel.AotTests application."

dotnet publish $rootDirectory/dotnet/src/SemanticKernel.AotTests/SemanticKernel.AotTests.csproj --framework $targetNetFramework | Tee-Object -Variable publishOutput

$warningFound = $false

if ($LastExitCode -ne 0)
{
Write-Host "Errors were detected while publishing the application. See the output for more details."
Exit $LastExitCode
}
elseif ($publishOutput -like "*analysis warning IL*" -or $publishOutput -like "*analysis error IL*")
{
Write-Host "Native AOT analysis warnings were detected while publishing the application. See the output for more details."
Exit 1
}

Write-Host "The application was published successfully."

$runtime = $IsWindows ? "win-x64" : "linux-x64"

$appPublishDirectory = Join-Path -Path $rootDirectory -ChildPath dotnet/src/SemanticKernel.AotTests/bin/Release/$targetNetFramework/$runtime/publish

$appFileName = $IsWindows ? "SemanticKernel.AotTests.exe" : "SemanticKernel.AotTests"

$app = Join-Path -Path $appPublishDirectory -ChildPath $appFileName

Write-Host "Executing the SemanticKernel.AotTests application."

& $app

if ($LastExitCode -ne 0)
{
$testPassed = 1
Write-Host "There was an error while executing the application. The Last Exit Code is: $LastExitCode"
}
else
{
Write-Host "The application was executed successfully."
}

Exit $testPassed
3 changes: 1 addition & 2 deletions TRANSPARENCY_FAQS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ The intended uses of Microsoft Semantic Kernel include:


## How was Microsoft Semantic Kernel evaluated? What metrics are used to measure performance?
Microsoft Semantic Kernel was reviewed for reliability and performance metrics that include:
- Accuracy: Evaluated based on the correctness of the outputs generated against known facts.
Microsoft Semantic Kernel metrics include:
- Integration Speed: Assessed by the time taken to integrate AI models and initiate functional outputs based on telemetry.
- Performance Consistency: Measurements taken to verify the system's reliability based on telemetry.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
status: accepted
status: superseded by [ADR-0062](0062-open-api-payload.md)
contact: SergeyMenshykh
date: 2023-08-15
deciders: shawncal
Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/0054-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,4 @@ The following packages will be created for Processes:
In validation of the proposed solution, two runtimes were created, one for the local/server scenario and one for the distributed actor scenario using Orleans. Both of these implementation were based on the [Pregel Algorithm](https://kowshik.github.io/JPregel/pregel_paper.pdf) for large-scale graph processing. This algorithm is well tested and well suited for single machine scenarios as well as distributed systems. More information on how the Pregel algorithm works can be found in the following links.

- [Pregel - The Morning Paper](https://blog.acolyer.org/2015/05/26/pregel-a-system-for-large-scale-graph-processing/)
- [Pregel - Distributed Algorithms and Optimization](https://web.stanford.edu/~rezab/classes/cme323/S15/notes/lec8.pdf)
<!-- [Pregel - Distributed Algorithms and Optimization](https://web.stanford.edu/~rezab/classes/cme323/S15/notes/lec8.pdf) -->
Loading

0 comments on commit 3899430

Please sign in to comment.