Skip to content

feat: per-dataset max_new_tokens override #1625

feat: per-dataset max_new_tokens override

feat: per-dataset max_new_tokens override #1625

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
python-version-file: .python-version
- name: Install dependencies
run: uv sync --frozen --extra test
- name: Run tests
run: uv run pytest -xv -m "not slow and not performance" --cov=src --cov-report=xml --cov-report=html
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage.xml
htmlcov/
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
python-version-file: .python-version
- name: Build wheel
run: uv build
- name: Install from wheel and smoke test
run: |
uv venv /tmp/smoke-test
uv pip install --python /tmp/smoke-test/bin/python dist/*.whl
/tmp/smoke-test/bin/inference-endpoint --help
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
python-version-file: .python-version
- name: Install dependencies
run: uv sync --frozen --extra dev --extra test --extra performance
- name: Audit dependencies for known vulnerabilities
run: uv run pip-audit
schema-updated:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
python-version-file: .python-version
- name: Check for schema changes
id: schema
run: |
CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- \
'src/inference_endpoint/config/schema.py' \
'src/inference_endpoint/endpoint_client/config.py' \
'src/inference_endpoint/commands/benchmark/cli.py' \
'scripts/regenerate_templates.py' \
'src/inference_endpoint/config/templates/*.yaml')
echo "changed=$([[ -n "$CHANGED" ]] && echo true || echo false)" >> "$GITHUB_OUTPUT"
- name: Run schema fuzz tests
if: steps.schema.outputs.changed == 'true'
run: uv run --frozen --extra test pytest -xv -m schema_fuzz
- name: Check YAML templates are up to date
if: steps.schema.outputs.changed == 'true'
run: uv run --frozen python scripts/regenerate_templates.py --check