Skip to content

examples

examples #50

Workflow file for this run

name: examples
on:
workflow_dispatch:
schedule:
# At 05:00 UTC on Tuesdays
- cron: "0 5 * * 2"
env:
MINIMIZE_FOR_CI: "false" # change to "false" to run notebooks with full output
GALILEO_USERNAME: ${{ secrets.GALILEO_USERNAME }}
GALILEO_PASSWORD: ${{ secrets.GALILEO_PASSWORD }}
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
jobs:
mltc-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator_cuda.py::run --notebook-path examples/multi_label_text_classification/Multi_Label_Text_Classification_using_Pytorch_and_🔭_Galileo_Simple.ipynb
ner-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator_cuda.py::run --notebook-path examples/named_entity_recognition/Named_Entity_Recognition_with_Pytorch_and_🔭_Galileo_Simple.ipynb
tc-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator_cuda.py::run --notebook-path examples/text_classification/Text_Classification_using_PyTorch_and_🔭_Galileo_Simple.ipynb
ic-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator_cuda.py::run --notebook-path examples/image_classification/Image_Classification_using_PyTorch_and_🔭_Galileo.ipynb
od-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator.py::run_gpu --notebook-path examples/object_detection/Object_Detection_using_Ultralytics_and_🔭_Galileo.ipynb
semseg-example:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
fail-fast: false
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements-ci.txt
pip install -r requirements-dev.txt
- name: run notebook
env:
GALILEO_MODAL_TOKEN_ID: ${{ secrets.GALILEO_MODAL_TOKEN_ID }}
GALILEO_MODAL_TOKEN_SECRET: ${{ secrets.GALILEO_MODAL_TOKEN_SECRET }}
run: |
modal token set --token-id ${{ env.GALILEO_MODAL_TOKEN_ID }} --token-secret ${{ env.GALILEO_MODAL_TOKEN_SECRET }}
modal run ./scripts/populator_cuda.py::run --notebook-path examples/semantic_segmentation/Semantic_Segmentation_Using_🔭_Galileo.ipynb
send-slack-notification:
runs-on: ubuntu-latest
needs: [mltc-example, ner-example, tc-example, ic-example, od-example]
permissions:
contents: "read"
id-token: "write"
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: construct footer url
id: footer_url
run: |
SLACK_FOOTER_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "slack_footer_url=${SLACK_FOOTER_URL}" >> $GITHUB_OUTPUT
- name: report status to slack
if: always()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.ML_TEAM_EXAMPLES_WEBHOOK }}
SLACK_USERNAME: "Example Runs Root Content Populator"
SLACK_ICON_EMOJI: ":telescope:"
SLACK_COLOR: ${{ ((needs.mltc-example.result == 'success') && (needs.ner-example.result == 'success') && (needs.tc-example.result == 'success') && (needs.ic-example.result == 'success') && (needs.od-example.result == 'success') && 'success') || 'failure' }}
SLACK_TITLE: "Example Runs Root Content Populator"
SLACK_MESSAGE: "Click the link in the footer to investigate any broken example notebooks."
SLACK_FOOTER: ${{ steps.footer_url.outputs.slack_footer_url }}