Skip to content

Commit

Permalink
feat(streamlit): add streamlit (#14529)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao committed Feb 13, 2024
1 parent 5af9473 commit 7d0aee9
Show file tree
Hide file tree
Showing 10 changed files with 1,441 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/.static-type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.classify-mnist
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.predict-diabetes
poetry run poe static-type-check-python -- --package=machine-learning.hm-rasa
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.map
poetry run poe static-type-check-python -- --package=machine-learning.hm-supervision.detect-objects
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
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
national-instruments-hm-pyvisa: ${{ steps.filter.outputs.national-instruments-hm-pyvisa }}
national-instruments-hm-tdms: ${{ steps.filter.outputs.national-instruments-hm-tdms }}
hm-gradio-classify-image: ${{ steps.filter.outputs.hm-gradio-classify-image }}
hm-streamlit-map: ${{ steps.filter.outputs.hm-streamlit-map }}
hm-kubeflow-calculate: ${{ steps.filter.outputs.hm-kubeflow-calculate }}
hm-kubeflow-classify-mnist: ${{ steps.filter.outputs.hm-kubeflow-classify-mnist }}
hm-langchain-chat-pdf: ${{ steps.filter.outputs.hm-langchain-chat-pdf }}
Expand Down Expand Up @@ -231,6 +232,9 @@ jobs:
hm-spark-recommend-movies:
- '.github/workflows/test.yml'
- 'data-processing/hm-spark/applications/recommend-movies/**'
hm-streamlit-map:
- '.github/workflows/test.yml'
- 'machine-learning/hm-streamlit/applications/map/**'
hm-supervision-detect-objects:
- '.github/workflows/test.yml'
- 'machine-learning/hm-supervision/detect-objects/**'
Expand Down Expand Up @@ -1096,6 +1100,38 @@ jobs:
with:
directory: machine-learning/hm-gradio/applications/classify-image

streamlit-map:
name: Streamlit (map) | Test
needs: detect-changes
if: ${{ needs.detect-changes.outputs.hm-streamlit-map == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version-file: machine-learning/hm-streamlit/applications/map/pyproject.toml
cache: poetry
cache-dependency-path: machine-learning/hm-streamlit/applications/map/poetry.lock
- name: Install dependencies
working-directory: machine-learning/hm-streamlit/applications/map
run: |
poetry install --no-root
- name: Test
working-directory: machine-learning/hm-streamlit/applications/map
run: |
poetry run poe test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
directory: machine-learning/hm-streamlit/applications/map

kubeflow-calculate-test:
name: Kubeflow (calculate) | Test
needs: detect-changes
Expand Down
3 changes: 3 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ pull_request_rules:
- or:
- check-success=Gradio (classify-image) | Test
- check-skipped=Gradio (classify-image) | Test
- or:
- check-success=Streamlit (map) | Test
- check-skipped=Streamlit (map) | Test
- or:
- check-success=Kubeflow (calculate) | Test
- check-skipped=Kubeflow (calculate) | Test
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ static-type-check-python:
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.classify-mnist
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.predict-diabetes
poetry run poe static-type-check-python -- --package=machine-learning.hm-rasa
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.map
poetry run poe static-type-check-python -- --package=machine-learning.hm-supervision.detect-objects
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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ make kubernetes-clean
- **PyTorch Geometric** - PyTorch geometric deep learning extension
- **TorchServe** - PyTorch models serving
- **Gradio** - Machine learning web application building
- **Streamlit** - Data web application building
- **Lightning** - Deep Learning framework
- **LangChain** - Large language model (LLM) framework
- **NeuralForecast** - Neural forecasting
Expand Down
13 changes: 13 additions & 0 deletions machine-learning/hm-streamlit/applications/map/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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

0 comments on commit 7d0aee9

Please sign in to comment.