Skip to content

Commit

Permalink
feat(triton): add triton client (#16918)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored May 25, 2024
1 parent e3b8394 commit bed82a1
Show file tree
Hide file tree
Showing 25 changed files with 1,302 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/.static-type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:
poetry install --no-root
- name: Static type check Python
run: |
poetry run poe static-type-check-python -- --package=aerospace.hm-aerosandbox
poetry run poe static-type-check-python -- --package=aerospace.hm-openaerostruct
poetry run poe static-type-check-python -- --package=api-python
poetry run poe static-type-check-python -- --package=authorization.hm-opal-client
poetry run poe static-type-check-python -- --package=cloud-computing.hm-ray.applications.greet
Expand Down Expand Up @@ -143,6 +145,7 @@ jobs:
poetry run poe static-type-check-python -- --package=machine-learning.hugging-face
poetry run poe static-type-check-python -- --package=machine-learning.neural-forecasting.forecast-air-passenger-number
poetry run poe static-type-check-python -- --package=machine-learning.reinforcement-learning.cart-pole
poetry run poe static-type-check-python -- --package=machine-learning.triton.amazon-sagamaker-triton-resnet-50.client
poetry run poe static-type-check-python -- --package=quantum-computing
static-type-check-terraform-development-aws:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
pull-requests: read
outputs:
amazon-sagemaker-pytorch-mnist: ${{ steps.filter.outputs.amazon-sagemaker-pytorch-mnist }}
amazon-sagamaker-triton-resnet-50-client: ${{ steps.filter.outputs.amazon-sagamaker-triton-resnet-50-client }}
api-go: ${{ steps.filter.outputs.api-go }}
api-node: ${{ steps.filter.outputs.api-node }}
api-python: ${{ steps.filter.outputs.api-python }}
Expand Down Expand Up @@ -98,6 +99,9 @@ jobs:
amazon-sagemaker-pytorch-mnist:
- '.github/workflows/test.yml'
- 'cloud-platform/aws/amazon-sagemaker/pytorch-mnist/**'
amazon-sagamaker-triton-resnet-50-client:
- '.github/workflows/test.yml'
- 'machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/**'
api-go:
- '.github/workflows/test.yml'
- 'api-go/**'
Expand Down Expand Up @@ -776,6 +780,38 @@ jobs:
with:
directory: cloud-platform/aws/amazon-sagemaker/pytorch-mnist

amazon-sagamaker-triton-resnet-50-client-test:
name: Amazon SageMaker Triton ResNet 50 Client | Test
needs: detect-changes
if: ${{ needs.detect-changes.outputs.amazon-sagamaker-triton-resnet-50-client == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/[email protected]
with:
python-version-file: machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/pyproject.toml
cache: poetry
cache-dependency-path: machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/poetry.lock
- name: Install dependencies
working-directory: machine-learning/triton/amazon-sagamaker-triton-resnet-50/client
run: |
poetry install --no-root
- name: Test
working-directory: machine-learning/triton/amazon-sagamaker-triton-resnet-50/client
run: |
poetry run poe test-coverage
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
directory: machine-learning/triton/amazon-sagamaker-triton-resnet-50/client

aws-glue-spark-scripts-test:
name: AWS Glue (spark-scripts) | Test
needs: detect-changes
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
1 change: 1 addition & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"machine-learning/hm-rasa/story_graph.dot",
"machine-learning/hm-supervision/*/data",
"machine-learning/neural-forecasting/*/lightning_logs",
"machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data",
"mobile/mobile-android/.gradle",
"mobile/mobile-android/app/build",
"mobile/mobile-android/build",
Expand Down
3 changes: 3 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ pull_request_rules:
- or:
- check-success=Amazon SageMaker (pytorch-mnist) | Test
- check-skipped=Amazon SageMaker (pytorch-mnist) | Test
- or:
- check-success=Amazon SageMaker Triton ResNet 50 Client | Test
- check-skipped=Amazon SageMaker Triton ResNet 50 Client | Test
- or:
- check-success=AWS Glue (spark-scripts) | Test
- check-skipped=AWS Glue (spark-scripts) | Test
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ AllCops:
- 'machine-learning/hm-rasa/story_graph.dot'
- 'machine-learning/hm-supervision/*/data/**/*'
- 'machine-learning/neural-forecasting/*/lightning_logs/**/*'
- 'machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data/**/*'
- 'mobile/mobile-android/.gradle/**/*'
- 'mobile/mobile-android/app/build/**/*'
- 'mobile/mobile-android/build/**/*'
Expand Down
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ exclude = [
"machine-learning/hm-rasa/story_graph.dot",
"machine-learning/hm-supervision/*/data",
"machine-learning/neural-forecasting/*/lightning_logs",
"machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data",
"mobile/mobile-android/.gradle",
"mobile/mobile-android/app/build",
"mobile/mobile-android/build",
Expand Down
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
1 change: 1 addition & 0 deletions .sqlfluffignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ machine-learning/hm-rasa/results
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
1 change: 1 addition & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ ignore: |
machine-learning/hm-rasa/story_graph.dot
machine-learning/hm-supervision/*/data
machine-learning/neural-forecasting/*/lightning_logs
machine-learning/triton/amazon-sagamaker-triton-resnet-50/client/data
mobile/mobile-android/.gradle
mobile/mobile-android/app/build
mobile/mobile-android/build
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ lint-yaml:

# Static type check
static-type-check-python:
poetry run poe static-type-check-python -- --package=aerospace.hm-aerosandbox
poetry run poe static-type-check-python -- --package=aerospace.hm-openaerostruct
poetry run poe static-type-check-python -- --package=api-python
poetry run poe static-type-check-python -- --package=authorization.hm-opal-client
poetry run poe static-type-check-python -- --package=cloud-computing.hm-ray.applications.greet
Expand Down Expand Up @@ -348,6 +350,7 @@ static-type-check-python:
poetry run poe static-type-check-python -- --package=machine-learning.hugging-face
poetry run poe static-type-check-python -- --package=machine-learning.neural-forecasting.forecast-air-passenger-number
poetry run poe static-type-check-python -- --package=machine-learning.reinforcement-learning.cart-pole
poetry run poe static-type-check-python -- --package=machine-learning.triton.amazon-sagamaker-triton-resnet-50.client
poetry run poe static-type-check-python -- --package=quantum-computing
static-type-check-terraform:
cd cloud-infrastructure/terraform/environments/development/aws && terraform validate
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
poetry-env-use:
poetry env use python3.12
poetry-update-lock-file:
poetry lock --no-update
poetry-install:
poetry install --no-root

poetry-run-dev:
poetry run poe dev
poetry-run-test:
poetry run poe test
poetry-run-test-coverage:
poetry run poe test-coverage

curl-download-dog:
curl https://i.ibb.co/bLvrvRV/shiba-inu-dog.jpg > data/dog.jpg
Empty file.
Loading

0 comments on commit bed82a1

Please sign in to comment.