-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into clem_doc_readme
- Loading branch information
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 |
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
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 . |
Git LFS file not shown
Git LFS file not shown