sendnn-inference 2.0.0rc11__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.
Files changed (180) hide show
  1. sendnn_inference-2.0.0rc11/.github/CODEOWNERS +27 -0
  2. sendnn_inference-2.0.0rc11/.github/ISSUE_TEMPLATE/bug-report.yml +46 -0
  3. sendnn_inference-2.0.0rc11/.github/ISSUE_TEMPLATE/config.yml +13 -0
  4. sendnn_inference-2.0.0rc11/.github/ISSUE_TEMPLATE/feature-request.yml +46 -0
  5. sendnn_inference-2.0.0rc11/.github/ISSUE_TEMPLATE/rfc.yml +27 -0
  6. sendnn_inference-2.0.0rc11/.github/actions/free-up-disk-space/action.yml +46 -0
  7. sendnn_inference-2.0.0rc11/.github/pull_request_template.md +21 -0
  8. sendnn_inference-2.0.0rc11/.github/workflows/add_label_automerge.yml +26 -0
  9. sendnn_inference-2.0.0rc11/.github/workflows/build_and_publish.yaml +30 -0
  10. sendnn_inference-2.0.0rc11/.github/workflows/build_docker.yml +98 -0
  11. sendnn_inference-2.0.0rc11/.github/workflows/check_uv_lock.yml +48 -0
  12. sendnn_inference-2.0.0rc11/.github/workflows/lint_scripts.yml +37 -0
  13. sendnn_inference-2.0.0rc11/.github/workflows/matchers/ruff.json +17 -0
  14. sendnn_inference-2.0.0rc11/.github/workflows/pre-commit.yml +35 -0
  15. sendnn_inference-2.0.0rc11/.github/workflows/publish_to_test_pypi.yaml +35 -0
  16. sendnn_inference-2.0.0rc11/.github/workflows/reminder_comment.yml +23 -0
  17. sendnn_inference-2.0.0rc11/.github/workflows/stale.yml +52 -0
  18. sendnn_inference-2.0.0rc11/.github/workflows/test.yml +275 -0
  19. sendnn_inference-2.0.0rc11/.gitignore +202 -0
  20. sendnn_inference-2.0.0rc11/.pre-commit-config.yaml +48 -0
  21. sendnn_inference-2.0.0rc11/.readthedocs.yaml +17 -0
  22. sendnn_inference-2.0.0rc11/.shellcheckrc +9 -0
  23. sendnn_inference-2.0.0rc11/.yapfignore +4 -0
  24. sendnn_inference-2.0.0rc11/CODE_OF_CONDUCT.md +3 -0
  25. sendnn_inference-2.0.0rc11/CONTRIBUTING.md +3 -0
  26. sendnn_inference-2.0.0rc11/DCO +34 -0
  27. sendnn_inference-2.0.0rc11/LICENSE +201 -0
  28. sendnn_inference-2.0.0rc11/PKG-INFO +50 -0
  29. sendnn_inference-2.0.0rc11/README.md +35 -0
  30. sendnn_inference-2.0.0rc11/RELEASING.md +25 -0
  31. sendnn_inference-2.0.0rc11/_local_envs_for_test.sh +19 -0
  32. sendnn_inference-2.0.0rc11/docker/.senlib.json +14 -0
  33. sendnn_inference-2.0.0rc11/docker/Dockerfile.amd64 +102 -0
  34. sendnn_inference-2.0.0rc11/docker/simple_vllm_serve.sh +9 -0
  35. sendnn_inference-2.0.0rc11/docs/.nav.yml +40 -0
  36. sendnn_inference-2.0.0rc11/docs/README.md +21 -0
  37. sendnn_inference-2.0.0rc11/docs/contributing/README.md +234 -0
  38. sendnn_inference-2.0.0rc11/docs/contributing/architecture.md +38 -0
  39. sendnn_inference-2.0.0rc11/docs/contributing/images/vllm_v1.svg +4 -0
  40. sendnn_inference-2.0.0rc11/docs/contributing/images/vllm_v1_spyre.svg +4 -0
  41. sendnn_inference-2.0.0rc11/docs/contributing/maintaining.md +137 -0
  42. sendnn_inference-2.0.0rc11/docs/contributing/multimodal/adding_new_models.md +77 -0
  43. sendnn_inference-2.0.0rc11/docs/deploying/docker.md +54 -0
  44. sendnn_inference-2.0.0rc11/docs/deploying/k8s.md +181 -0
  45. sendnn_inference-2.0.0rc11/docs/deploying/rhoai.md +97 -0
  46. sendnn_inference-2.0.0rc11/docs/getting_started/installation.md +195 -0
  47. sendnn_inference-2.0.0rc11/docs/mkdocs/hooks/generate_examples.py +164 -0
  48. sendnn_inference-2.0.0rc11/docs/mkdocs/hooks/generate_model_tables.py +188 -0
  49. sendnn_inference-2.0.0rc11/docs/mkdocs/hooks/url_schemes.py +53 -0
  50. sendnn_inference-2.0.0rc11/docs/mkdocs/overrides/main.html +5 -0
  51. sendnn_inference-2.0.0rc11/docs/requirements-docs.txt +8 -0
  52. sendnn_inference-2.0.0rc11/docs/roadmaps/q3-2025.md +31 -0
  53. sendnn_inference-2.0.0rc11/docs/user_guide/configuration.md +179 -0
  54. sendnn_inference-2.0.0rc11/docs/user_guide/env_vars.md +7 -0
  55. sendnn_inference-2.0.0rc11/docs/user_guide/supported_features.md +30 -0
  56. sendnn_inference-2.0.0rc11/docs/user_guide/supported_models.md +51 -0
  57. sendnn_inference-2.0.0rc11/examples/offline_inference/long_context.py +186 -0
  58. sendnn_inference-2.0.0rc11/examples/offline_inference/text_inference.py +151 -0
  59. sendnn_inference-2.0.0rc11/examples/offline_inference/vision_inference.py +301 -0
  60. sendnn_inference-2.0.0rc11/examples/online_inference/openai_spyre_text.py +110 -0
  61. sendnn_inference-2.0.0rc11/examples/online_inference/openai_spyre_vision.py +120 -0
  62. sendnn_inference-2.0.0rc11/examples/online_inference/spyre_vllm_benchmark.py +438 -0
  63. sendnn_inference-2.0.0rc11/examples/online_inference/spyre_vllm_setup_container.sh +89 -0
  64. sendnn_inference-2.0.0rc11/format.sh +28 -0
  65. sendnn_inference-2.0.0rc11/mkdocs.yaml +111 -0
  66. sendnn_inference-2.0.0rc11/pyproject.toml +247 -0
  67. sendnn_inference-2.0.0rc11/sendnn_inference/__init__.py +58 -0
  68. sendnn_inference-2.0.0rc11/sendnn_inference/_version.py +24 -0
  69. sendnn_inference-2.0.0rc11/sendnn_inference/argparse_utils.py +210 -0
  70. sendnn_inference-2.0.0rc11/sendnn_inference/compat_utils.py +24 -0
  71. sendnn_inference-2.0.0rc11/sendnn_inference/compilation_utils.py +227 -0
  72. sendnn_inference-2.0.0rc11/sendnn_inference/config/README.md +436 -0
  73. sendnn_inference-2.0.0rc11/sendnn_inference/config/__init__.py +0 -0
  74. sendnn_inference-2.0.0rc11/sendnn_inference/config/configurators/__init__.py +7 -0
  75. sendnn_inference-2.0.0rc11/sendnn_inference/config/configurators/model_configurator.py +255 -0
  76. sendnn_inference-2.0.0rc11/sendnn_inference/config/model_config.py +309 -0
  77. sendnn_inference-2.0.0rc11/sendnn_inference/config/model_configs.yaml +322 -0
  78. sendnn_inference-2.0.0rc11/sendnn_inference/config/model_matcher.py +133 -0
  79. sendnn_inference-2.0.0rc11/sendnn_inference/config/model_registry.py +388 -0
  80. sendnn_inference-2.0.0rc11/sendnn_inference/envs.py +157 -0
  81. sendnn_inference-2.0.0rc11/sendnn_inference/model_executor/__init__.py +0 -0
  82. sendnn_inference-2.0.0rc11/sendnn_inference/model_executor/model_loader/__init__.py +0 -0
  83. sendnn_inference-2.0.0rc11/sendnn_inference/model_executor/model_loader/spyre.py +566 -0
  84. sendnn_inference-2.0.0rc11/sendnn_inference/model_executor/model_loader/spyre_setup.py +16 -0
  85. sendnn_inference-2.0.0rc11/sendnn_inference/multimodal/__init__.py +36 -0
  86. sendnn_inference-2.0.0rc11/sendnn_inference/multimodal/mm_mappings/__init__.py +5 -0
  87. sendnn_inference-2.0.0rc11/sendnn_inference/multimodal/mm_mappings/base.py +106 -0
  88. sendnn_inference-2.0.0rc11/sendnn_inference/multimodal/mm_mappings/llava_next.py +174 -0
  89. sendnn_inference-2.0.0rc11/sendnn_inference/multimodal/mm_mappings/mistral3.py +161 -0
  90. sendnn_inference-2.0.0rc11/sendnn_inference/perf_metrics.py +56 -0
  91. sendnn_inference-2.0.0rc11/sendnn_inference/platform.py +789 -0
  92. sendnn_inference-2.0.0rc11/sendnn_inference/utils.py +47 -0
  93. sendnn_inference-2.0.0rc11/sendnn_inference/v1/__init__.py +1 -0
  94. sendnn_inference-2.0.0rc11/sendnn_inference/v1/core/__init__.py +0 -0
  95. sendnn_inference-2.0.0rc11/sendnn_inference/v1/core/scheduler.py +630 -0
  96. sendnn_inference-2.0.0rc11/sendnn_inference/v1/metrics/__init__.py +3 -0
  97. sendnn_inference-2.0.0rc11/sendnn_inference/v1/metrics/stats_logger.py +219 -0
  98. sendnn_inference-2.0.0rc11/sendnn_inference/v1/sample/golden_token_injector.py +206 -0
  99. sendnn_inference-2.0.0rc11/sendnn_inference/v1/sample/spyre_logits_processor.py +116 -0
  100. sendnn_inference-2.0.0rc11/sendnn_inference/v1/worker/__init__.py +0 -0
  101. sendnn_inference-2.0.0rc11/sendnn_inference/v1/worker/spyre_input_batch.py +742 -0
  102. sendnn_inference-2.0.0rc11/sendnn_inference/v1/worker/spyre_model_runner.py +1722 -0
  103. sendnn_inference-2.0.0rc11/sendnn_inference/v1/worker/spyre_worker.py +815 -0
  104. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/PKG-INFO +50 -0
  105. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/SOURCES.txt +178 -0
  106. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/dependency_links.txt +1 -0
  107. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/entry_points.txt +2 -0
  108. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/requires.txt +5 -0
  109. sendnn_inference-2.0.0rc11/sendnn_inference.egg-info/top_level.txt +1 -0
  110. sendnn_inference-2.0.0rc11/setup.cfg +4 -0
  111. sendnn_inference-2.0.0rc11/tests/aftu/graph_compare_utils.py +209 -0
  112. sendnn_inference-2.0.0rc11/tests/aftu/test_compare_graphs.py +171 -0
  113. sendnn_inference-2.0.0rc11/tests/config/__init__.py +3 -0
  114. sendnn_inference-2.0.0rc11/tests/config/conftest.py +117 -0
  115. sendnn_inference-2.0.0rc11/tests/config/fixtures/test_error_handling_models.yaml +30 -0
  116. sendnn_inference-2.0.0rc11/tests/config/test_env_config_path.py +113 -0
  117. sendnn_inference-2.0.0rc11/tests/config/test_error_handling.py +242 -0
  118. sendnn_inference-2.0.0rc11/tests/config/test_integration.py +223 -0
  119. sendnn_inference-2.0.0rc11/tests/config/test_model_config.py +480 -0
  120. sendnn_inference-2.0.0rc11/tests/config/test_model_configurator.py +471 -0
  121. sendnn_inference-2.0.0rc11/tests/config/test_model_matcher.py +314 -0
  122. sendnn_inference-2.0.0rc11/tests/config/test_model_registry.py +511 -0
  123. sendnn_inference-2.0.0rc11/tests/conftest.py +366 -0
  124. sendnn_inference-2.0.0rc11/tests/download_model_configs.py +64 -0
  125. sendnn_inference-2.0.0rc11/tests/e2e/test_chunked_prefill.py +350 -0
  126. sendnn_inference-2.0.0rc11/tests/e2e/test_chunked_prefill_tkv_steps.py +420 -0
  127. sendnn_inference-2.0.0rc11/tests/e2e/test_logits_processors.py +153 -0
  128. sendnn_inference-2.0.0rc11/tests/e2e/test_profiler.py +73 -0
  129. sendnn_inference-2.0.0rc11/tests/e2e/test_sampling_params.py +519 -0
  130. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_async_llm.py +131 -0
  131. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_basic.py +187 -0
  132. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_cp_scheduler_steps.py +1132 -0
  133. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_embeddings.py +133 -0
  134. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_mm.py +121 -0
  135. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_online.py +68 -0
  136. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_pc_scheduler_steps.py +1726 -0
  137. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_scoring.py +58 -0
  138. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_seed.py +150 -0
  139. sendnn_inference-2.0.0rc11/tests/e2e/test_spyre_stagger_basic.py +59 -0
  140. sendnn_inference-2.0.0rc11/tests/e2e/test_stats_logger.py +38 -0
  141. sendnn_inference-2.0.0rc11/tests/e2e/test_structured_outputs.py +269 -0
  142. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/BAAI/bge-reranker-large/config.json +33 -0
  143. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/BAAI/bge-reranker-v2-m3/config.json +33 -0
  144. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-ai-platform/micro-g3.3-8b-instruct-1b/config.json +32 -0
  145. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-3.3-8b-instruct/config.json +32 -0
  146. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-3.3-8b-instruct-FP8/config.json +74 -0
  147. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-4-8b-dense/config.json +31 -0
  148. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-4-8b-dense-hybrid/config.json +90 -0
  149. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-embedding-125m-english/config.json +27 -0
  150. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/ibm-granite/granite-embedding-278m-multilingual/config.json +26 -0
  151. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/intfloat/multilingual-e5-large/config.json +27 -0
  152. sendnn_inference-2.0.0rc11/tests/fixtures/model_configs/sentence-transformers/all-roberta-large-v1/config.json +26 -0
  153. sendnn_inference-2.0.0rc11/tests/hf_cache.json +1207 -0
  154. sendnn_inference-2.0.0rc11/tests/hf_result_cache.py +146 -0
  155. sendnn_inference-2.0.0rc11/tests/llm_cache.py +516 -0
  156. sendnn_inference-2.0.0rc11/tests/llm_cache_util.py +290 -0
  157. sendnn_inference-2.0.0rc11/tests/multimodal/test_llava_next.py +170 -0
  158. sendnn_inference-2.0.0rc11/tests/multimodal/test_mistral3.py +160 -0
  159. sendnn_inference-2.0.0rc11/tests/output_util.py +519 -0
  160. sendnn_inference-2.0.0rc11/tests/precompilation/test_disable_compilation.py +180 -0
  161. sendnn_inference-2.0.0rc11/tests/scheduling_utils.py +497 -0
  162. sendnn_inference-2.0.0rc11/tests/spyre_util.py +653 -0
  163. sendnn_inference-2.0.0rc11/tests/utils/bge_copy/config.json +34 -0
  164. sendnn_inference-2.0.0rc11/tests/utils/test_cli_args.py +117 -0
  165. sendnn_inference-2.0.0rc11/tests/utils/test_envs.py +43 -0
  166. sendnn_inference-2.0.0rc11/tests/utils/test_golden_token_injector.py +127 -0
  167. sendnn_inference-2.0.0rc11/tests/utils/test_platform_validation.py +417 -0
  168. sendnn_inference-2.0.0rc11/tests/utils/test_spyre_model_list.py +23 -0
  169. sendnn_inference-2.0.0rc11/tests/utils/test_upstream_compatibility.py +17 -0
  170. sendnn_inference-2.0.0rc11/tests/v1/core/test_scheduler_structured_outputs.py +203 -0
  171. sendnn_inference-2.0.0rc11/tests/v1/worker/mock_model.py +292 -0
  172. sendnn_inference-2.0.0rc11/tests/v1/worker/test_prefix_caching_worker.py +457 -0
  173. sendnn_inference-2.0.0rc11/tests/v1/worker/test_scheduler_tkv_limits.py +82 -0
  174. sendnn_inference-2.0.0rc11/tests/v1/worker/test_spyre_input_batch.py +282 -0
  175. sendnn_inference-2.0.0rc11/tests/v1/worker/test_spyre_worker_profile.py +81 -0
  176. sendnn_inference-2.0.0rc11/tools/check_aiu.sh +39 -0
  177. sendnn_inference-2.0.0rc11/tools/check_repo.sh +14 -0
  178. sendnn_inference-2.0.0rc11/tools/download_model.py +33 -0
  179. sendnn_inference-2.0.0rc11/tools/lint_scripts.sh +25 -0
  180. sendnn_inference-2.0.0rc11/uv.lock +5149 -0
@@ -0,0 +1,27 @@
1
+ # See https://help.github.com/articles/about-codeowners/
2
+ # for more info about CODEOWNERS file
3
+
4
+ # These owners will be the default owners for everything in the repo
5
+ # and will be requested for review when someone opens a pull request
6
+ # unless a later match takes precedence
7
+ * @joerunde @prashantgupta24
8
+
9
+ # This lists cover the "core" components of SenDNN-Inference that require careful review
10
+ /sendnn_inference @yannicks1 @tdoublep @nikolaospapandreou @sducouedic
11
+
12
+ # TODO: separate code into different packages:
13
+ # /sendnn_inference/v1/worker/continuous_batching @nikolaospapandreou
14
+ # /sendnn_inference/v1/worker/static_batching ...
15
+
16
+ # Tests
17
+ /tests @rafvasq @prashantgupta24 @sducouedic
18
+
19
+ # Examples
20
+ /examples @yannicks1 @prashantgupta24 @sducouedic
21
+
22
+ # Docs
23
+ /docs @rafvasq
24
+ mkdocs.yaml @rafvasq
25
+
26
+ # CI
27
+ /.github @joerunde @ckadner @rafvasq
@@ -0,0 +1,46 @@
1
+ name: 🐛 Bug report
2
+ description: Report a bug in SenDNN Inference
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Before submitting, please search [existing issues](https://github.com/torch-spyre/sendnn-inference/issues) to avoid duplicates.
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: Describe the bug
15
+ description: A clear and concise description of what the bug is.
16
+ validations:
17
+ required: true
18
+
19
+ - type: textarea
20
+ attributes:
21
+ label: How to reproduce
22
+ description: |
23
+ Steps to reproduce the behavior. Include a minimal code example if possible.
24
+
25
+ placeholder: |
26
+ ```
27
+ # Your code here
28
+ ```
29
+ 1. Run command '...'
30
+ 2. See error
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ attributes:
36
+ label: Additional context
37
+ description: Any other context, logs, etc. of the problem.
38
+
39
+ - type: checkboxes
40
+ attributes:
41
+ label: Checklist
42
+ options:
43
+ - label: I have searched for similar issues.
44
+ required: true
45
+
46
+ # Made with Bob
@@ -0,0 +1,13 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: 📖 Documentation
4
+ url: https://docs.vllm.ai/projects/spyre/
5
+ about: Read the SenDNN-Inference documentation
6
+ - name: 💬 Discussions
7
+ url: https://inviter.co/vllm-slack
8
+ about: Ask questions and discuss in the `#sig-spyre` channel.
9
+ - name: 🤝 Contributing Guide
10
+ url: https://docs.vllm.ai/projects/spyre/en/latest/contributing
11
+ about: Learn how to contribute to SenDNN-Inference
12
+
13
+ # Made with Bob
@@ -0,0 +1,46 @@
1
+ name: 🚀 Feature request
2
+ description: Suggest a new feature for SenDNN Inference
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Before submitting, please search [existing issues](https://github.com/torch-spyre/sendnn-inference/issues) to avoid duplicates.
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: Feature description
15
+ description: |
16
+ A clear and concise description of the feature you'd like to see.
17
+
18
+ validations:
19
+ required: true
20
+
21
+ - type: textarea
22
+ attributes:
23
+ label: Motivation and context
24
+ description: |
25
+ Why is this feature important? How would it benefit SenDNN Inference users?
26
+
27
+ Is this related to a specific problem or limitation?
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ attributes:
33
+ label: Proposed solution
34
+ description: |
35
+ If you have ideas on how this could be implemented, share them here.
36
+
37
+ Include any relevant examples, APIs, or resources.
38
+
39
+ - type: checkboxes
40
+ attributes:
41
+ label: Checklist
42
+ options:
43
+ - label: I have searched for similar feature requests
44
+ required: true
45
+
46
+ # Made with Bob
@@ -0,0 +1,27 @@
1
+ name: 💭 Request for comments
2
+ description: Start a discussion for larger changes related to SenDNN Inference
3
+ title: "[RFC]: "
4
+ labels: []
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Before submitting, please search [existing issues](https://github.com/torch-spyre/sendnn-inference/issues) to avoid duplicates.
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: To discuss
15
+ description: |
16
+ Describe what you want to discuss or get feedback on. Consider covering
17
+ the motivation, your proposed approach, and any alternatives you considered.
18
+ validations:
19
+ required: true
20
+
21
+ - type: checkboxes
22
+ attributes:
23
+ label: Checklist
24
+ options:
25
+ - label: I have searched for similar feature requests or RFCs.
26
+ required: true
27
+
@@ -0,0 +1,46 @@
1
+ name: "Free up disk space"
2
+ description: "Removes non-essential tools, libraries and cached files from GitHub action runner node"
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: "Remove non-essential tools and libraries"
8
+ shell: bash
9
+ run: |
10
+ # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
11
+ echo "Disk usage before cleanup:"
12
+ df -h
13
+ echo "Removing non-essential tools and libraries ..."
14
+ sudo rm -rf /opt/ghc
15
+ sudo rm -rf /usr/local/.ghcup
16
+ sudo rm -rf /usr/share/dotnet
17
+ # sudo rm -rf /usr/local/share/boost
18
+ echo "Deleting libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G) ..."
19
+ sudo rm -rf /usr/local/lib/android
20
+ sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL"
21
+ sudo rm -rf /usr/local/share/powershell
22
+ sudo rm -rf /usr/share/swift
23
+ # ref: https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
24
+ echo "Deleting some larger apt packages:"
25
+ sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
26
+ sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
27
+ sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
28
+ sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
29
+ sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
30
+ sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
31
+ sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
32
+ sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
33
+ sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
34
+ sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
35
+ sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."
36
+ echo "Disk usage after cleanup:"
37
+ df -h
38
+
39
+ - name: "Prune docker images"
40
+ shell: bash
41
+ run: |
42
+ echo "Pruning docker images ..."
43
+ docker image prune -a -f
44
+ docker system df
45
+ echo "Disk usage after pruning docker images:"
46
+ df -h
@@ -0,0 +1,21 @@
1
+ <!-- markdownlint-disable -->
2
+
3
+ ## Description
4
+
5
+ <!-- Provide a clear description of your changes. -->
6
+
7
+ ## Related Issues
8
+
9
+ <!-- Link related issues, e.g., `Fixes #` or `Relates to #456` -->
10
+
11
+ ## Test Plan
12
+
13
+ <!-- Describe how you tested your changes. Include commands or steps to reproduce. -->
14
+
15
+ ## Checklist
16
+
17
+ - [ ] I have read the [contributing guidelines](https://docs.vllm.ai/projects/spyre/en/latest/contributing)
18
+ - [ ] My code follows the project's code style (run `bash format.sh`)
19
+ - [ ] I have added tests for my changes (if applicable)
20
+ - [ ] I have updated the documentation (if applicable)
21
+ - [ ] My commits include a `Signed-off-by:` line (DCO compliance)
@@ -0,0 +1,26 @@
1
+ name: Add label on auto-merge enabled
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - auto_merge_enabled
7
+
8
+ jobs:
9
+ add-label-on-auto-merge:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ issues: write
13
+ pull-requests: write
14
+ steps:
15
+ - name: Add label
16
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
17
+ with:
18
+ script: |
19
+ github.rest.issues.addLabels({
20
+ owner: context.repo.owner,
21
+ repo: context.repo.repo,
22
+ issue_number: context.issue.number,
23
+ labels: ['ready']
24
+ })
25
+ env:
26
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,30 @@
1
+ name: Build and Publish sendnn-inference Library
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ # Only run for sendnn-inference releases (v* tags).
10
+ if: startsWith(github.ref, 'refs/tags/v')
11
+ runs-on: ubuntu-latest
12
+
13
+ environment:
14
+ name: pypi
15
+ permissions:
16
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ version: "latest"
26
+ python-version: "3.12"
27
+ - name: Build package
28
+ run: uv build
29
+ - name: Publish package distributions to PyPI
30
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,98 @@
1
+ name: "Build Docker"
2
+
3
+ # Manual dispatch only for now
4
+ on:
5
+ workflow_dispatch:
6
+
7
+ defaults:
8
+ run:
9
+ shell: bash
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ env:
15
+ CACHE_IMAGE: "ghcr.io/torch-spyre/sendnn-inference:build-cache"
16
+ QUAY_REPOSITORY: "quay.io/ibm-aiu/sendnn-inference"
17
+
18
+ permissions:
19
+ packages: write
20
+ contents: read
21
+
22
+ steps:
23
+ - name: "Checkout"
24
+ uses: actions/checkout@v4
25
+ # We need to fetch history and tags so that we can correctly version the
26
+ # sendnn-inference package, since it uses setuptools_scm to version based on
27
+ # git tags.
28
+ with:
29
+ fetch-depth: 0
30
+
31
+ - name: "Free up disk space"
32
+ uses: ./.github/actions/free-up-disk-space
33
+
34
+ - name: "Set up QEMU"
35
+ uses: docker/setup-qemu-action@v3
36
+
37
+ - name: "Set up Docker Buildx"
38
+ uses: docker/setup-buildx-action@v3
39
+
40
+ - name: "Log in to Github Container registry"
41
+ uses: docker/login-action@v3
42
+ if: github.event_name != 'pull_request'
43
+ with:
44
+ registry: ghcr.io
45
+ username: ${{ github.actor }}
46
+ password: ${{ secrets.GITHUB_TOKEN }}
47
+
48
+ - name: "Log in to quay"
49
+ uses: docker/login-action@v3
50
+ if: github.event_name != 'pull_request'
51
+ with:
52
+ registry: quay.io
53
+ username: ibm-aiu+aiu_pusher_bot
54
+ password: ${{ secrets.IBM_AIU_QUAY_TOKEN }}
55
+
56
+ - name: "Set build cache target"
57
+ run: |
58
+ # For push to `main` (PR merged), push a new cache image with all layers (cache-mode=max).
59
+ # For PR builds, use GitHub action cache which isolates cached layers by PR/branch.
60
+ # to optimize builds for subsequent pushes to the same PR/branch.
61
+ # Do not set a cache-to image for PR builds to not overwrite the `main` cache image and
62
+ # to not ping-pong cache images for two or more different PRs.
63
+ # Do not push cache images for each PR or multiple branches to not exceed GitHub package
64
+ # usage and traffic limitations.
65
+ # UPDATE 2024/02/26: GHA cache appears to have issues, cannot use `cache-to: gha,mode=min`
66
+ # if `cache-from: reg...,mode=max` but `cache-to: gha,mode=max` takes longer than uncached
67
+ # build and exhausts GHA cache size limits, so use cache `type=inline` (no external cache).
68
+ if [ "${{ github.event_name }}" == "pull_request" ]
69
+ then
70
+ #CACHE_TO="type=gha,mode=min"
71
+ CACHE_TO="type=inline"
72
+ else
73
+ CACHE_TO="type=registry,ref=${{ env.CACHE_IMAGE }},mode=max"
74
+ fi
75
+ echo "CACHE_TO=$CACHE_TO" >> "$GITHUB_ENV"
76
+
77
+ - name: "Generate tags"
78
+ id: meta
79
+ uses: docker/metadata-action@v5
80
+ with:
81
+ images: |
82
+ ${{ env.QUAY_REPOSITORY }}
83
+ tags: |
84
+ type=raw,value=latest.amd64
85
+ type=semver,pattern={{version}}.amd64
86
+
87
+ - name: "Build and push"
88
+ uses: docker/build-push-action@v5
89
+ with:
90
+ context: .
91
+ file: docker/Dockerfile.amd64
92
+ target: release
93
+ provenance: false
94
+ tags: ${{ steps.meta.outputs.tags }}
95
+ cache-from: type=registry,ref=${{ env.CACHE_IMAGE }}
96
+ cache-to: ${{ env.CACHE_TO }}
97
+ push: ${{ github.event_name != 'pull_request' }}
98
+ platforms: linux/amd64
@@ -0,0 +1,48 @@
1
+ name: Check uv.lock
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - 'pyproject.toml'
7
+ - 'uv.lock'
8
+ push:
9
+ branches: [main]
10
+ paths:
11
+ - 'pyproject.toml'
12
+ - 'uv.lock'
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.ref }}
16
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ check-lock:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26
+
27
+ - name: "Get changed files"
28
+ id: changed-files
29
+ uses: tj-actions/changed-files@v46
30
+ with:
31
+ files_yaml: |
32
+ root:
33
+ - pyproject.toml
34
+ - uv.lock
35
+
36
+ - name: "Set up Python 3.12"
37
+ if: steps.changed-files.outputs.root_any_changed == 'true' || steps.changed-files.outputs.next_any_changed == 'true'
38
+ uses: astral-sh/setup-uv@v5
39
+ with:
40
+ python-version: "3.12"
41
+ enable-cache: true
42
+ ignore-nothing-to-cache: true
43
+ cache-dependency-glob: |
44
+ pyproject.toml
45
+
46
+ - name: "Check root uv.lock is up to date"
47
+ if: steps.changed-files.outputs.root_any_changed == 'true'
48
+ run: uv lock --check
@@ -0,0 +1,37 @@
1
+ name: Lint Scripts
2
+
3
+ on:
4
+ # Don't use pull_request.paths filter since this workflow is required for
5
+ # all pull requests on main irrespective of file type or location
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ push:
10
+ branches:
11
+ - main
12
+ paths:
13
+ - '**/*.sh'
14
+ - '.github/workflows/lint_scripts.yml'
15
+
16
+ env:
17
+ LC_ALL: en_US.UTF-8
18
+
19
+ defaults:
20
+ run:
21
+ shell: bash
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ lint-scripts:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: "Checkout"
31
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32
+ with:
33
+ fetch-depth: 0
34
+
35
+ - name: "Check shell scripts"
36
+ run: |
37
+ tools/lint_scripts.sh
@@ -0,0 +1,17 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "owner": "ruff",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^(.+?):(\\d+):(\\d+): (\\w+): (.+)$",
8
+ "file": 1,
9
+ "line": 2,
10
+ "column": 3,
11
+ "code": 4,
12
+ "message": 5
13
+ }
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,35 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ pre-commit:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
+
21
+ # Need to pull real deps from cache so that `ty` can type check against vllm
22
+ - name: "Set up Python 3.12"
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ python-version: "3.12"
26
+ enable-cache: true
27
+ ignore-nothing-to-cache: true
28
+ cache-dependency-glob: |
29
+ pyproject.toml
30
+ - name: "Install dependencies"
31
+ run: VLLM_TARGET_DEVICE=empty uv sync --frozen
32
+ - run: echo "::add-matcher::.github/workflows/matchers/ruff.json"
33
+ - uses: j178/prek-action@v1
34
+ with:
35
+ extra_args: --all-files --hook-stage manual
@@ -0,0 +1,35 @@
1
+ # This tests the publication process for sendnn-inference by pushing a pre-release to test.pypi.org
2
+ # on all main commits
3
+ name: Test publication on test.pypi.org
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+
14
+ environment:
15
+ name: testpypi
16
+ url: https://test.pypi.org/p/sendnn-inference
17
+ permissions:
18
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ with:
23
+ # Fetch all history for setuptools_scm to work correctly
24
+ fetch-depth: 0
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+ with:
28
+ version: "latest"
29
+ python-version: "3.12"
30
+ - name: Build package
31
+ run: uv build
32
+ - name: Publish package distributions to test PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,23 @@
1
+ name: PR Reminder Comment Bot
2
+ on:
3
+ pull_request_target:
4
+ types: [opened]
5
+
6
+ jobs:
7
+ pr_reminder:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ pull-requests: write
11
+ steps:
12
+ - name: Remind to run full CI on PR
13
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
14
+ with:
15
+ script: |
16
+ github.rest.issues.createComment({
17
+ owner: context.repo.owner,
18
+ repo: context.repo.repo,
19
+ issue_number: context.issue.number,
20
+ body: "👋 Hi! Thank you for contributing.\n Just a reminder: Make sure that your code passes all the linting checks, otherwise your PR won't be able to be merged. To do so, run `./format.sh`. \nNow you are good to go 🚀.\n\nWe also recommend installing prek and configuring it to check your code before every local commit."
21
+ })
22
+ env:
23
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,52 @@
1
+ name: Close inactive issues and PRs
2
+
3
+ on:
4
+ schedule:
5
+ # Daily at 1:30 AM UTC
6
+ - cron: '30 1 * * *'
7
+
8
+ jobs:
9
+ close-issues-and-pull-requests:
10
+ permissions:
11
+ issues: write
12
+ pull-requests: write
13
+ actions: write
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
17
+ with:
18
+ # Increasing this value ensures that changes to this workflow
19
+ # propagate to all issues and PRs in days rather than months
20
+ operations-per-run: 1000
21
+
22
+ exempt-draft-pr: true
23
+ exempt-issue-labels: 'keep-open'
24
+ exempt-pr-labels: 'keep-open'
25
+
26
+ labels-to-add-when-unstale: 'unstale'
27
+ labels-to-remove-when-stale: 'unstale'
28
+
29
+ days-before-issue-stale: 90
30
+ days-before-issue-close: 30
31
+ stale-issue-label: 'stale'
32
+ stale-issue-message: >
33
+ This issue has been automatically marked as stale because it has not
34
+ had any activity within 90 days. It will be automatically closed if no
35
+ further activity occurs within 30 days. Leave a comment if
36
+ you feel this issue should remain open. Thank you!
37
+ close-issue-message: >
38
+ This issue has been automatically closed due to inactivity. Please
39
+ feel free to reopen if you feel it is still relevant. Thank you!
40
+
41
+ days-before-pr-stale: 90
42
+ days-before-pr-close: 30
43
+ stale-pr-label: 'stale'
44
+ stale-pr-message: >
45
+ This pull request has been automatically marked as stale because it
46
+ has not had any activity within 90 days. It will be automatically
47
+ closed if no further activity occurs within 30 days. Leave a comment
48
+ if you feel this pull request should remain open. Thank you!
49
+ close-pr-message: >
50
+ This pull request has been automatically closed due to inactivity.
51
+ Please feel free to reopen if you intend to continue working on it.
52
+ Thank you!