Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches: [main]
types: [opened, synchronize, reopened, closed]
workflow_dispatch:
inputs:
bootstrap:
description: Bootstrap a new model repository and publish the result
type: boolean
default: false

permissions:
contents: read
Expand Down Expand Up @@ -52,7 +57,7 @@ jobs:
cancel-in-progress: false
env:
HF_TOKEN: ${{ secrets.HF_READ_TOKEN }}
BOOTSTRAP: ${{ github.event_name == 'workflow_dispatch' && '--bootstrap' || '' }}
BOOTSTRAP: ${{ github.event_name == 'workflow_dispatch' && inputs.bootstrap && '--bootstrap' || '' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -77,7 +82,7 @@ jobs:
PYTHONPATH: src/api/src
run: uv run --project model/benchmark --locked --extra cuda --extra data --python 3.12 pytest model/benchmark/tests
- name: Evaluate accepted model with current benchmark
if: github.event_name != 'workflow_dispatch'
if: github.event_name != 'workflow_dispatch' || !inputs.bootstrap
run: >-
uv run --project model/benchmark --locked --extra cuda --extra data --python 3.12
python model/ci.py evaluate --directory "$RUN_DIR"
Expand Down Expand Up @@ -157,7 +162,7 @@ jobs:

bootstrap:
needs: [evaluate, model-quality]
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && inputs.bootstrap
runs-on: ubuntu-24.04
timeout-minutes: 10
environment: model-publishing
Expand Down