-
Notifications
You must be signed in to change notification settings - Fork 911
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
675 changed files
with
93,922 additions
and
63,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: test | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
core-version: | ||
- ">=0.2.39,<0.3.0" | ||
- "latest" | ||
|
||
defaults: | ||
run: | ||
working-directory: libs/langgraph | ||
name: "test #${{ matrix.python-version }} (langchain-core: ${{ matrix.core-version }})" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }} | ||
uses: "./.github/actions/poetry_setup" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
cache-key: test-langgraph | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
poetry install --with dev | ||
if [ "${{ matrix.core-version }}" != "latest" ]; then | ||
poetry run pip install "langchain-core${{ matrix.core-version }}" | ||
fi | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
make test | ||
- name: Ensure the tests did not create any additional files | ||
shell: bash | ||
run: | | ||
set -eu | ||
STATUS="$(git status)" | ||
echo "$STATUS" | ||
# grep will exit non-zero if the target message isn't found, | ||
# and `set -e` above will cause the step to fail. | ||
echo "$STATUS" | grep 'nothing to commit, working tree clean' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: test | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.11" | ||
- "3.12" | ||
|
||
defaults: | ||
run: | ||
working-directory: libs/scheduler-kafka | ||
name: "test #${{ matrix.python-version }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }} | ||
uses: "./.github/actions/poetry_setup" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
cache-key: test-scheduler-kafka | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
poetry install --with dev | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
make test | ||
- name: Ensure the tests did not create any additional files | ||
shell: bash | ||
run: | | ||
set -eu | ||
STATUS="$(git status)" | ||
echo "$STATUS" | ||
# grep will exit non-zero if the target message isn't found, | ||
# and `set -e` above will cause the step to fail. | ||
echo "$STATUS" | grep 'nothing to commit, working tree clean' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: baseline | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "libs/**" | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
|
||
jobs: | ||
benchmark: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: libs/langgraph | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: SHA=$(git rev-parse HEAD) && echo "SHA=$SHA" >> $GITHUB_ENV | ||
- name: Set up Python 3.11 + Poetry ${{ env.POETRY_VERSION }} | ||
uses: "./.github/actions/poetry_setup" | ||
with: | ||
python-version: "3.11" | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
cache-key: bench | ||
- name: Install dependencies | ||
run: poetry install --with dev | ||
- name: Run benchmarks | ||
run: OUTPUT=out/benchmark-baseline.json make -s benchmark | ||
- name: Save outputs | ||
uses: actions/cache/save@v4 | ||
with: | ||
key: ${{ runner.os }}-benchmark-baseline-${{ env.SHA }} | ||
path: | | ||
libs/langgraph/out/benchmark-baseline.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: bench | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "libs/**" | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
|
||
jobs: | ||
benchmark: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: libs/langgraph | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: files | ||
name: Get changed files | ||
uses: Ana06/get-changed-files@v2.3.0 | ||
with: | ||
format: json | ||
- name: Set up Python 3.11 + Poetry ${{ env.POETRY_VERSION }} | ||
uses: "./.github/actions/poetry_setup" | ||
with: | ||
python-version: "3.11" | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
cache-key: bench | ||
- name: Install dependencies | ||
run: poetry install --with dev | ||
- name: Download baseline | ||
uses: actions/cache/restore@v4 | ||
with: | ||
key: ${{ runner.os }}-benchmark-baseline | ||
restore-keys: | | ||
${{ runner.os }}-benchmark-baseline- | ||
fail-on-cache-miss: true | ||
path: | | ||
libs/langgraph/out/benchmark-baseline.json | ||
- name: Run benchmarks | ||
id: benchmark | ||
run: | | ||
{ | ||
echo 'OUTPUT<<EOF' | ||
make -s benchmark | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
- name: Compare benchmarks | ||
id: compare | ||
run: | | ||
{ | ||
echo 'OUTPUT<<EOF' | ||
mv out/benchmark-baseline.json out/main.json | ||
mv out/benchmark.json out/changes.json | ||
poetry run pyperf compare_to out/main.json out/changes.json --table --group-by-speed | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
- name: Annotation | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const file = JSON.parse(`${{ steps.files.outputs.added_modified_renamed }}`)[0] | ||
core.notice(`${{ steps.benchmark.outputs.OUTPUT }}`, { | ||
title: 'Benchmark results', | ||
file, | ||
}) | ||
core.notice(`${{ steps.compare.outputs.OUTPUT }}`, { | ||
title: 'Comparison against main', | ||
file, | ||
}) |
Oops, something went wrong.