Skip to content

Commit

Permalink
Merge branch 'main' into clem_doc_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
clefourrier committed Jan 26, 2024
2 parents 4c671bb + c968089 commit 1100cff
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Quality

on:
push:
branches:
- main
- v*-release
pull_request:
branches:
- main

jobs:

check_code_quality:
name: Check code quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff==v0.1.2
- name: Code quality
run: |
make quality
43 changes: 43 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Quality

on:
push:
branches:
- main
- v*-release
pull_request:
branches:
- main

jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: 'true'
ref: ${{ github.event.pull_request.head.sha }} # we want to test against our branch not against a merge commit
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install lighteval in editable mode
run: |
pip install -e .[accelerate]
- name: Get cached files
uses: actions/cache@v2
id: get-cache
with:
path: "cache"
key: test-cache-HF
- name: Test
run: | # PYTHONPATH="${PYTHONPATH}:src" HF_DATASETS_CACHE="cache/datasets" HF_HOME="cache/models"
python -m pytest --disable-pytest-warnings
- name: Write cache
uses: actions/cache@v2
with:
path: "cache"
key: test-cache-HF
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: style format


style:
ruff format .
ruff check --fix .


quality:
ruff format --check .
ruff check .
3 changes: 3 additions & 0 deletions tests/reference_scores/harness_metrics.json
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/reference_scores/harness_prompts.json
Git LFS file not shown

0 comments on commit 1100cff

Please sign in to comment.