downshift-server 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- downshift_server-0.4.0/.gitattributes +5 -0
- downshift_server-0.4.0/.github/workflows/ci.yml +72 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/.github/workflows/compatibility-matrix.yml +34 -32
- downshift_server-0.4.0/.github/workflows/release.yml +96 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/.gitignore +49 -48
- downshift_server-0.4.0/CHANGELOG.md +462 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/LICENSE +21 -21
- downshift_server-0.4.0/PKG-INFO +454 -0
- downshift_server-0.4.0/README.md +405 -0
- downshift_server-0.4.0/docs/code-docs/README.md +60 -0
- downshift_server-0.4.0/docs/code-docs/adapters.md +250 -0
- downshift_server-0.4.0/docs/code-docs/cli.md +230 -0
- downshift_server-0.4.0/docs/code-docs/http-api.md +477 -0
- downshift_server-0.4.0/docs/code-docs/python-api.md +428 -0
- downshift_server-0.4.0/docs/code-docs/serving.md +408 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/docs/compatibility.md +27 -25
- downshift_server-0.4.0/docs/production.md +289 -0
- downshift_server-0.4.0/pyproject.toml +111 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/scripts/gen_matrix.py +163 -135
- downshift_server-0.4.0/src/downshift/__init__.py +112 -0
- downshift_server-0.4.0/src/downshift/__main__.py +3 -0
- downshift_server-0.4.0/src/downshift/_imports.py +38 -0
- downshift_server-0.4.0/src/downshift/_version.py +4 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/adapters/_flatten.py +40 -40
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/adapters/base.py +56 -47
- downshift_server-0.4.0/src/downshift/adapters/embedding.py +189 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/adapters/generic.py +95 -99
- downshift_server-0.4.0/src/downshift/adapters/hf.py +108 -0
- downshift_server-0.4.0/src/downshift/adapters/pooling.py +15 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/adapters/pyg.py +121 -120
- downshift_server-0.4.0/src/downshift/adapters/registry.py +140 -0
- downshift_server-0.4.0/src/downshift/adapters/text.py +70 -0
- downshift_server-0.4.0/src/downshift/cli/main.py +498 -0
- downshift_server-0.4.0/src/downshift/cli/options.py +208 -0
- downshift_server-0.4.0/src/downshift/cli/render.py +382 -0
- downshift_server-0.4.0/src/downshift/cli/runtime.py +314 -0
- downshift_server-0.4.0/src/downshift/core/capture.py +148 -0
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/inputs.py +25 -25
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/manifest.py +98 -89
- downshift_server-0.4.0/src/downshift/core/phase.py +48 -0
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/prevalidated.py +113 -70
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/shapes.py +99 -61
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/verdict.py +324 -211
- downshift_server-0.4.0/src/downshift/core/verify.py +435 -0
- downshift_server-0.4.0/src/downshift/demo/__init__.py +2 -0
- downshift_server-0.4.0/src/downshift/demo/clean_mlp.py +28 -0
- downshift_server-0.4.0/src/downshift/demo/data_dependent_branch.py +29 -0
- downshift_server-0.4.0/src/downshift/demo/scatter_include_self_false.py +30 -0
- downshift_server-0.4.0/src/downshift/hf_repo.py +152 -0
- downshift_server-0.4.0/src/downshift/loading.py +232 -0
- downshift_server-0.4.0/src/downshift/logs.py +73 -0
- downshift_server-0.4.0/src/downshift/serve/__init__.py +91 -0
- downshift_server-0.4.0/src/downshift/serve/app.py +537 -0
- downshift_server-0.4.0/src/downshift/serve/backends.py +375 -0
- downshift_server-0.4.0/src/downshift/serve/codec.py +28 -0
- downshift_server-0.4.0/src/downshift/serve/describe.py +270 -0
- downshift_server-0.4.0/src/downshift/serve/engine.py +568 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/serve/middleware.py +24 -24
- downshift_server-0.4.0/src/downshift/serve/options.py +48 -0
- downshift_server-0.4.0/src/downshift/serve/predict.py +273 -0
- downshift_server-0.4.0/src/downshift/serve/schemas.py +390 -0
- downshift_server-0.4.0/src/downshift/settings.py +102 -0
- downshift_server-0.4.0/src/downshift/sources.py +70 -0
- downshift_server-0.4.0/tests/conftest.py +134 -0
- downshift_server-0.4.0/tests/models/bf16_weights.py +28 -0
- downshift_server-0.4.0/tests/models/broken_factory.py +7 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/clean_mlp.py +27 -27
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/custom_autograd.py +40 -40
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/data_dependent_branch.py +27 -27
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/dict_input.py +32 -32
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/dropout_model.py +25 -25
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/gnn_gat.py +39 -37
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/gnn_gcn.py +30 -30
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/gnn_sage.py +30 -30
- downshift_server-0.4.0/tests/models/hf_repo.py +86 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/scatter_include_self_false.py +34 -34
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/tied_weights.py +27 -27
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/tiny_bert.py +23 -23
- downshift_server-0.4.0/tests/test_adapter_discovery_gating.py +56 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_adapters.py +494 -406
- downshift_server-0.4.0/tests/test_capture.py +48 -0
- downshift_server-0.4.0/tests/test_cli.py +559 -0
- downshift_server-0.4.0/tests/test_cli_startup.py +46 -0
- downshift_server-0.4.0/tests/test_demo.py +41 -0
- downshift_server-0.4.0/tests/test_describe.py +191 -0
- downshift_server-0.4.0/tests/test_embedding.py +470 -0
- downshift_server-0.4.0/tests/test_engine.py +444 -0
- downshift_server-0.4.0/tests/test_export.py +161 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_export_pyg.py +42 -40
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_fixtures.py +45 -43
- downshift_server-0.4.0/tests/test_gen_matrix.py +13 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_hf.py +67 -37
- downshift_server-0.4.0/tests/test_hf_text.py +383 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_inputs.py +2 -2
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_loading.py +198 -210
- downshift_server-0.4.0/tests/test_logs.py +214 -0
- downshift_server-0.4.0/tests/test_main_module.py +18 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_manifest.py +95 -95
- downshift_server-0.4.0/tests/test_package.py +24 -0
- downshift_server-0.4.0/tests/test_path_privacy.py +140 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_prevalidated.py +65 -47
- downshift_server-0.4.0/tests/test_render.py +488 -0
- downshift_server-0.4.0/tests/test_review3_misc.py +350 -0
- downshift_server-0.4.0/tests/test_schemas.py +82 -0
- downshift_server-0.4.0/tests/test_serve.py +748 -0
- downshift_server-0.4.0/tests/test_serve_boot.py +96 -0
- downshift_server-0.4.0/tests/test_serve_hardening.py +522 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_settings.py +32 -5
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/test_shapes.py +93 -78
- downshift_server-0.4.0/tests/test_verify_internals.py +404 -0
- downshift_server-0.2.0/.github/workflows/ci.yml +0 -25
- downshift_server-0.2.0/PKG-INFO +0 -265
- downshift_server-0.2.0/README.md +0 -224
- downshift_server-0.2.0/docs/blog/your-gnn-exports-cleanly.md +0 -74
- downshift_server-0.2.0/examples/01_check_a_model.ipynb +0 -243
- downshift_server-0.2.0/examples/01_check_a_model.py +0 -153
- downshift_server-0.2.0/examples/02_export_and_manifest.ipynb +0 -193
- downshift_server-0.2.0/examples/02_export_and_manifest.py +0 -117
- downshift_server-0.2.0/examples/03_serve_and_query.ipynb +0 -219
- downshift_server-0.2.0/examples/03_serve_and_query.py +0 -133
- downshift_server-0.2.0/examples/04_pyg_graph_neural_networks.ipynb +0 -155
- downshift_server-0.2.0/examples/04_pyg_graph_neural_networks.py +0 -89
- downshift_server-0.2.0/examples/05_huggingface_encoder.ipynb +0 -149
- downshift_server-0.2.0/examples/05_huggingface_encoder.py +0 -83
- downshift_server-0.2.0/examples/06_custom_adapter.ipynb +0 -207
- downshift_server-0.2.0/examples/06_custom_adapter.py +0 -146
- downshift_server-0.2.0/examples/07_cli_walkthrough.ipynb +0 -178
- downshift_server-0.2.0/examples/07_cli_walkthrough.py +0 -103
- downshift_server-0.2.0/examples/README.md +0 -43
- downshift_server-0.2.0/examples/_build_notebooks.py +0 -97
- downshift_server-0.2.0/pyproject.toml +0 -93
- downshift_server-0.2.0/src/downshift/__init__.py +0 -60
- downshift_server-0.2.0/src/downshift/adapters/hf.py +0 -95
- downshift_server-0.2.0/src/downshift/adapters/registry.py +0 -116
- downshift_server-0.2.0/src/downshift/cli/main.py +0 -428
- downshift_server-0.2.0/src/downshift/cli/render.py +0 -174
- downshift_server-0.2.0/src/downshift/export/capture.py +0 -93
- downshift_server-0.2.0/src/downshift/export/verify.py +0 -162
- downshift_server-0.2.0/src/downshift/loading.py +0 -166
- downshift_server-0.2.0/src/downshift/serve/app.py +0 -93
- downshift_server-0.2.0/src/downshift/serve/backends.py +0 -181
- downshift_server-0.2.0/src/downshift/serve/engine.py +0 -154
- downshift_server-0.2.0/src/downshift/serve/schemas.py +0 -124
- downshift_server-0.2.0/src/downshift/settings.py +0 -69
- downshift_server-0.2.0/tests/conftest.py +0 -47
- downshift_server-0.2.0/tests/test_capture.py +0 -28
- downshift_server-0.2.0/tests/test_cli.py +0 -255
- downshift_server-0.2.0/tests/test_engine.py +0 -204
- downshift_server-0.2.0/tests/test_export.py +0 -87
- downshift_server-0.2.0/tests/test_render.py +0 -188
- downshift_server-0.2.0/tests/test_schemas.py +0 -38
- downshift_server-0.2.0/tests/test_serve.py +0 -184
- downshift_server-0.2.0/tests/test_verify_internals.py +0 -35
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/adapters/__init__.py +0 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/src/downshift/cli/__init__.py +0 -0
- {downshift_server-0.2.0/src/downshift/export → downshift_server-0.4.0/src/downshift/core}/__init__.py +0 -0
- /downshift_server-0.2.0/src/downshift/serve/__init__.py → /downshift_server-0.4.0/src/downshift/py.typed +0 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/__init__.py +0 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/__init__.py +0 -0
- {downshift_server-0.2.0 → downshift_server-0.4.0}/tests/models/dynamic_batch_cnn.py +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
cache: pip
|
|
21
|
+
- run: pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
22
|
+
- run: pip install -e ".[dev,gnn,hf,fast]"
|
|
23
|
+
- run: ruff check .
|
|
24
|
+
- run: ruff format --check .
|
|
25
|
+
- run: mypy src
|
|
26
|
+
- run: pytest -q --cov=src/downshift --cov-report=term-missing --cov-fail-under=95
|
|
27
|
+
|
|
28
|
+
floor:
|
|
29
|
+
# Pins the oldest torch the dynamo exporter supports (report= on torch.onnx.export is a
|
|
30
|
+
# 2.5 feature) plus the oldest onnx/onnxruntime/onnxscript verified locally to actually
|
|
31
|
+
# export+run against it: onnx 1.14 (the previous floor) fails to even install alongside
|
|
32
|
+
# onnxscript's own onnx>=1.16 requirement, and onnxscript below 0.5 hits a real bug in
|
|
33
|
+
# torch 2.5's type-promotion pass on plain dynamic-batch Conv2d - neither is specific to
|
|
34
|
+
# this project's code. onnxruntime 1.17 needs numpy<2 for its ABI.
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: "3.12"
|
|
41
|
+
cache: pip
|
|
42
|
+
- run: pip install "torch==2.5.1" --index-url https://download.pytorch.org/whl/cpu
|
|
43
|
+
- run: pip install "onnx==1.16.0" "onnxruntime==1.17.0" "onnxscript==0.5.0" "numpy<2"
|
|
44
|
+
- run: pip install -e ".[dev,gnn,hf,fast]"
|
|
45
|
+
- run: ruff check .
|
|
46
|
+
- run: ruff format --check .
|
|
47
|
+
- run: mypy src
|
|
48
|
+
- name: pytest
|
|
49
|
+
# Even at the newest transformers/torch-geometric releases compatible with these
|
|
50
|
+
# pins, torch 2.5.1's dynamo tracer can't export a from-scratch BertModel with a
|
|
51
|
+
# dynamic sequence axis, or a few PyG message-passing patterns (ConstraintViolationError /
|
|
52
|
+
# "Unsupported: call_method" from torch itself, not from this project's code, and not
|
|
53
|
+
# fixed by any onnx/onnxruntime/onnxscript combination tried). Those tests carry
|
|
54
|
+
# `@pytest.mark.needs_torch_26`; conftest.py skips them here based on torch.__version__
|
|
55
|
+
# until the floor moves past 2.5.x. Every other test, including the rest of the hf and
|
|
56
|
+
# gnn suites, runs and passes.
|
|
57
|
+
run: pytest -q
|
|
58
|
+
|
|
59
|
+
windows:
|
|
60
|
+
runs-on: windows-latest
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v4
|
|
63
|
+
- uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.12"
|
|
66
|
+
cache: pip
|
|
67
|
+
- run: pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
68
|
+
- run: pip install -e ".[dev,gnn,hf,fast]"
|
|
69
|
+
- run: ruff check .
|
|
70
|
+
- run: ruff format --check .
|
|
71
|
+
- run: mypy src
|
|
72
|
+
- run: pytest -q --cov=src/downshift --cov-report=term-missing --cov-fail-under=95
|
{downshift_server-0.2.0 → downshift_server-0.4.0}/.github/workflows/compatibility-matrix.yml
RENAMED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
name: Compatibility matrix
|
|
2
|
-
|
|
3
|
-
# The matrix is the project's core claim. A stale one is worse than none, so it is
|
|
4
|
-
# regenerated weekly against current torch/onnxruntime and opened as a PR when it changes.
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
schedule:
|
|
8
|
-
- cron: "0 6 * * 1" # Mondays 06:00 UTC
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
regenerate:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
permissions:
|
|
15
|
-
contents: write
|
|
16
|
-
pull-requests: write
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: actions/setup-python@v5
|
|
20
|
-
with:
|
|
21
|
-
python-version: "3.12"
|
|
22
|
-
cache: pip
|
|
23
|
-
- run: pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
24
|
-
- run: pip install -e ".[dev,gnn,hf]"
|
|
25
|
-
- run: python scripts/gen_matrix.py
|
|
26
|
-
- uses: peter-evans/create-pull-request@v7
|
|
27
|
-
with:
|
|
28
|
-
commit-message: "docs: regenerate compatibility matrix"
|
|
29
|
-
title: "Weekly compatibility matrix refresh"
|
|
30
|
-
body: "Automated run of `scripts/gen_matrix.py` against current torch / onnxruntime."
|
|
31
|
-
branch: ci/compatibility-matrix
|
|
32
|
-
add-paths:
|
|
1
|
+
name: Compatibility matrix
|
|
2
|
+
|
|
3
|
+
# The matrix is the project's core claim. A stale one is worse than none, so it is
|
|
4
|
+
# regenerated weekly against current torch/onnxruntime and opened as a PR when it changes.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 6 * * 1" # Mondays 06:00 UTC
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
regenerate:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
pull-requests: write
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: pip
|
|
23
|
+
- run: pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
24
|
+
- run: pip install -e ".[dev,gnn,hf]"
|
|
25
|
+
- run: python scripts/gen_matrix.py
|
|
26
|
+
- uses: peter-evans/create-pull-request@v7
|
|
27
|
+
with:
|
|
28
|
+
commit-message: "docs: regenerate compatibility matrix"
|
|
29
|
+
title: "Weekly compatibility matrix refresh"
|
|
30
|
+
body: "Automated run of `scripts/gen_matrix.py` against current torch / onnxruntime."
|
|
31
|
+
branch: ci/compatibility-matrix
|
|
32
|
+
add-paths: |
|
|
33
|
+
docs/compatibility.md
|
|
34
|
+
README.md
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishing a GitHub Release is the trigger: the tag on that release must match the
|
|
4
|
+
# version in pyproject.toml, the tests must pass on it, and only then does the sdist +
|
|
5
|
+
# wheel go to PyPI. workflow_dispatch runs the build and test gates only, publishing nothing.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
cache: pip
|
|
24
|
+
|
|
25
|
+
- run: pip install build twine
|
|
26
|
+
|
|
27
|
+
# A release tagged v0.1.9 that ships 0.2.0 is unrecoverable — PyPI never lets a
|
|
28
|
+
# version be re-uploaded — so fail here rather than after the upload.
|
|
29
|
+
- name: Check tag matches pyproject version
|
|
30
|
+
if: github.event_name == 'release'
|
|
31
|
+
run: |
|
|
32
|
+
project_version=$(python -c "import tomllib,pathlib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']['version'])")
|
|
33
|
+
tag_version="${GITHUB_REF_NAME#v}"
|
|
34
|
+
echo "pyproject: $project_version / tag: $tag_version"
|
|
35
|
+
if [ "$project_version" != "$tag_version" ]; then
|
|
36
|
+
echo "::error::Tag $GITHUB_REF_NAME does not match pyproject.toml version $project_version"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
- run: python -m build
|
|
41
|
+
- run: twine check --strict dist/*
|
|
42
|
+
|
|
43
|
+
- uses: actions/upload-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: dist
|
|
46
|
+
path: dist/
|
|
47
|
+
|
|
48
|
+
test:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
strategy:
|
|
51
|
+
matrix:
|
|
52
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
cache: pip
|
|
59
|
+
- run: pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
60
|
+
- run: pip install -e ".[dev,gnn,hf,fast]"
|
|
61
|
+
- run: ruff check .
|
|
62
|
+
- run: ruff format --check .
|
|
63
|
+
- run: mypy src
|
|
64
|
+
- run: pytest -q --cov=src/downshift --cov-report=term-missing --cov-fail-under=95
|
|
65
|
+
|
|
66
|
+
publish-pypi:
|
|
67
|
+
if: github.event_name == 'release'
|
|
68
|
+
needs: [build, test]
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
environment:
|
|
71
|
+
name: pypi
|
|
72
|
+
url: https://pypi.org/p/downshift-server
|
|
73
|
+
permissions:
|
|
74
|
+
id-token: write # OIDC token for PyPI trusted publishing
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/download-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
name: dist
|
|
79
|
+
path: dist/
|
|
80
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
81
|
+
|
|
82
|
+
attach-to-release:
|
|
83
|
+
if: github.event_name == 'release'
|
|
84
|
+
needs: publish-pypi
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
permissions:
|
|
87
|
+
contents: write
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/download-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: dist
|
|
92
|
+
path: dist/
|
|
93
|
+
- name: Upload sdist and wheel to the GitHub Release
|
|
94
|
+
env:
|
|
95
|
+
GH_TOKEN: ${{ github.token }}
|
|
96
|
+
run: gh release upload "$GITHUB_REF_NAME" dist/* --clobber --repo "$GITHUB_REPOSITORY"
|
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
# Python
|
|
2
|
-
__pycache__/
|
|
3
|
-
*.py[cod]
|
|
4
|
-
*$py.class
|
|
5
|
-
*.so
|
|
6
|
-
.Python
|
|
7
|
-
*.egg-info/
|
|
8
|
-
dist/
|
|
9
|
-
build/
|
|
10
|
-
|
|
11
|
-
# Virtual environments
|
|
12
|
-
.venv/
|
|
13
|
-
venv/
|
|
14
|
-
ENV/
|
|
15
|
-
env/
|
|
16
|
-
|
|
17
|
-
# IDEs
|
|
18
|
-
.vscode/
|
|
19
|
-
.idea/
|
|
20
|
-
*.swp
|
|
21
|
-
*.swo
|
|
22
|
-
*~
|
|
23
|
-
|
|
24
|
-
# Testing
|
|
25
|
-
.pytest_cache/
|
|
26
|
-
.mypy_cache/
|
|
27
|
-
.ruff_cache/
|
|
28
|
-
htmlcov/
|
|
29
|
-
.coverage
|
|
30
|
-
|
|
31
|
-
# OS
|
|
32
|
-
.DS_Store
|
|
33
|
-
Thumbs.db
|
|
34
|
-
|
|
35
|
-
# Project-specific
|
|
36
|
-
*.onnx
|
|
37
|
-
*.onnx.data
|
|
38
|
-
artifacts/
|
|
39
|
-
tmp/
|
|
40
|
-
|
|
41
|
-
# Local tooling config
|
|
42
|
-
.claude/
|
|
43
|
-
.docs/
|
|
44
|
-
|
|
45
|
-
# Local pre-publish validation: hits test.pypi.org/pypi.org and builds a throwaway venv;
|
|
46
|
-
# not part of the package or CI, kept out of version control on purpose.
|
|
47
|
-
scripts/validate_pypi_release.py
|
|
48
|
-
scripts/.validation/
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
ENV/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# IDEs
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# Testing
|
|
25
|
+
.pytest_cache/
|
|
26
|
+
.mypy_cache/
|
|
27
|
+
.ruff_cache/
|
|
28
|
+
htmlcov/
|
|
29
|
+
.coverage
|
|
30
|
+
|
|
31
|
+
# OS
|
|
32
|
+
.DS_Store
|
|
33
|
+
Thumbs.db
|
|
34
|
+
|
|
35
|
+
# Project-specific
|
|
36
|
+
*.onnx
|
|
37
|
+
*.onnx.data
|
|
38
|
+
artifacts/
|
|
39
|
+
tmp/
|
|
40
|
+
|
|
41
|
+
# Local tooling config
|
|
42
|
+
.claude/
|
|
43
|
+
.docs/
|
|
44
|
+
|
|
45
|
+
# Local pre-publish validation: hits test.pypi.org/pypi.org and builds a throwaway venv;
|
|
46
|
+
# not part of the package or CI, kept out of version control on purpose.
|
|
47
|
+
scripts/validate_pypi_release.py
|
|
48
|
+
scripts/.validation/
|
|
49
|
+
bench/
|