-
Notifications
You must be signed in to change notification settings - Fork 66
JAX inference offloading bridge #1775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f9d26d9
JAX-vLLM inference offloading bridge
yhtang b27a0e7
add basic CI
yhtang 79afb97
fix typo
yhtang fd17865
merge latest git-clone.sh
yhtang c5d7e59
update README
yhtang 08dcac4
fix CI
yhtang efda639
Update jax-inference-offloading/jax_inference_offloading/controller/r…
yhtang 02130b8
address Copilot comments
yhtang 019a215
address Copilot comments
yhtang 2e775c6
reduce GRPO example script LOC
yhtang ce2cd94
fix container build
yhtang 318b0ec
use 'draft' status
yhtang c82d96b
fix CI
yhtang e4b6aeb
fix CI
yhtang 2c46bf6
fix CI
yhtang cb4ddab
fix CI
yhtang a3cc037
CI debug
yhtang 2d530b4
CI debug
yhtang fe51df8
CI debug
yhtang eb5e1ea
CI debug
yhtang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,91 @@ | ||
| name: JAX Inference Offloading | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '30 9 * * *' # Pacific Time 01:30 AM in UTC | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - ready_for_review | ||
| - synchronize | ||
| paths: | ||
| - '.github/workflows/jio.yaml' | ||
| - 'jax-inference-offloading/**' | ||
| workflow_dispatch: | ||
| inputs: | ||
| PUBLISH: | ||
| type: boolean | ||
| description: Publish dated images and update the 'latest' tag? | ||
| default: false | ||
| required: false | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| permissions: | ||
| contents: read # to fetch code | ||
| actions: write # to cancel previous workflows | ||
| packages: write # to upload containers | ||
|
|
||
| jobs: | ||
| metadata: | ||
| runs-on: ubuntu-22.04 | ||
| outputs: | ||
| BUILD_DATE: ${{ steps.date.outputs.BUILD_DATE }} | ||
| PUBLISH: ${{ steps.if-publish.outputs.PUBLISH }} | ||
| steps: | ||
| - name: Cancel workflow run if the trigger is a draft PR | ||
| id: cancel-if-draft | ||
| if: github.event_name == 'pull_request' && github.event.pull_request.draft == true | ||
| run: | | ||
| echo "Cancelling workflow for draft PR" | ||
| curl -X POST -H "Authorization: token ${{ github.token }}" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel" | ||
| while true; do sleep 1; done # blocks execution in case workflow cancellation takes time | ||
|
|
||
| - name: Set build date | ||
| id: date | ||
| shell: bash -x -e {0} | ||
| run: | | ||
| BUILD_DATE=$(TZ='US/Los_Angeles' date '+%Y-%m-%d') | ||
| echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Determine whether results will be 'published' | ||
| id: if-publish | ||
| shell: bash -x -e {0} | ||
| run: | | ||
| echo "PUBLISH=${{ github.event_name == 'schedule' || inputs.PUBLISH }}" >> $GITHUB_OUTPUT | ||
|
|
||
| build: | ||
| needs: metadata | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| ARCHITECTURE: [amd64, arm64] | ||
| runs-on: [self-hosted, "${{ matrix.ARCHITECTURE }}", "small"] | ||
yhtang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Build container | ||
| id: build-container | ||
| uses: ./.github/actions/build-container | ||
| with: | ||
| ARCHITECTURE: ${{ matrix.ARCHITECTURE }} | ||
| ARTIFACT_NAME: artifact-jio-build | ||
| BADGE_FILENAME: badge-jio-build | ||
| BUILD_DATE: ${{ needs.metadata.outputs.BUILD_DATE }} | ||
| CONTAINER_NAME: jio | ||
| DOCKERFILE: jax-inference-offloading/dockerfile/oss.dockerfile | ||
| RUNNER_SIZE: small | ||
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
| ssh-known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| # EXTRA_BUILD_ARGS: | | ||
| # URLREF_TUNIX=${{ fromJson(inputs.SOURCE_URLREFS).TUNIX }} | ||
yhtang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| outputs: | ||
| DOCKER_TAG_MEALKIT: ${{ steps.build-container.outputs.DOCKER_TAG_MEALKIT }} | ||
| DOCKER_TAG_FINAL: ${{ steps.build-container.outputs.DOCKER_TAG_FINAL }} | ||
This file contains hidden or 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,26 @@ | ||
| [flake8] | ||
yhtang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| indent-size = 2 | ||
| max-line-length = 120 | ||
| extend-ignore = E203,W503 # match Black / NumPy convention | ||
|
|
||
| # -------- Plugins ------------- | ||
| # Activate popular extra rule-sets; install alongside flake8: | ||
| # pip install flake8-bugbear flake8-docstrings flake8-import-order flake8-builtins | ||
| select = C,E,F,W,B,B950,D,I | ||
| # C (mccabe), E/W (pycodestyle), F (pyflakes), B (bugbear), B950 (long line hint), | ||
| # D (pydocstyle), I (import order) | ||
|
|
||
| # -------- Per‑file tweaks ------ | ||
| per-file-ignores = | ||
| __init__.py:F401 # allow re‑exported symbols | ||
| tests/*:D # relax docstring rules in test helpers | ||
|
|
||
| # -------- Exclusions ----------- | ||
| exclude = | ||
| .git, | ||
| __pycache__, | ||
| build, | ||
| dist, | ||
| .venv, | ||
| notebooks, | ||
|
|
||
This file contains hidden or 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,8 @@ | ||
| *.swp | ||
yhtang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| *.swo | ||
| *.swn | ||
| __pycache__ | ||
| .nfs* | ||
| *.egg-info | ||
| build | ||
| .env | ||
This file contains hidden or 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,16 @@ | ||
| # Signing Your Work | ||
|
|
||
| * We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. | ||
|
|
||
| * Any contribution which contains commits that are not Signed-Off will not be accepted. | ||
|
|
||
| * To sign off on a commit you simply use the `--signoff` (or `-s`) option when committing your changes: | ||
| ```bash | ||
| $ git commit -s -m "Add cool feature." | ||
| ``` | ||
| This will append the following to your commit message: | ||
| ``` | ||
| Signed-off-by: Your Name <[email protected]> | ||
| ``` | ||
|
|
||
| * Full text of the DCO can be found [here](DCO) |
This file contains hidden or 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,34 @@ | ||
| Developer Certificate of Origin | ||
| Version 1.1 | ||
|
|
||
| Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
|
|
||
| Everyone is permitted to copy and distribute verbatim copies of this | ||
| license document, but changing it is not allowed. | ||
|
|
||
|
|
||
| Developer's Certificate of Origin 1.1 | ||
|
|
||
| By making a contribution to this project, I certify that: | ||
|
|
||
| (a) The contribution was created in whole or in part by me and I | ||
| have the right to submit it under the open source license | ||
| indicated in the file; or | ||
|
|
||
| (b) The contribution is based upon previous work that, to the best | ||
| of my knowledge, is covered under an appropriate open source | ||
| license and I have the right under that license to submit that | ||
| work with modifications, whether created in whole or in part | ||
| by me, under the same open source license (unless I am | ||
| permitted to submit under a different license), as indicated | ||
| in the file; or | ||
|
|
||
| (c) The contribution was provided directly to me by some other | ||
| person who certified (a), (b) or (c) and I have not modified | ||
| it. | ||
|
|
||
| (d) I understand and agree that this project and the contribution | ||
| are public and that a record of the contribution (including all | ||
| personal information I submit with it, including my sign-off) is | ||
| maintained indefinitely and may be redistributed consistent with | ||
| this project or the open source license(s) involved. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.