WIP quick ci test #249
This file contains 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
name: Optimum TPU / Test TGI on TPU | |
on: | |
push: | |
branches: [ quick-ci-test ] | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "text-generation-inference/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
do-the-job: | |
name: Run TGI tests | |
runs-on: optimum-tpu | |
container: | |
# Use a nightly image that works with TPU (release was not working) | |
image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.4.0_3.10_tpuvm | |
options: --shm-size "16gb" --ipc host --privileged | |
env: | |
PJRT_DEVICE: TPU | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: quick test | |
run: | | |
python -m pip install huggingface_hub | |
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_TPU_CI }} python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='google/gemma-2b', allow_patterns='*.json')" | |