fix qwen-vl failed with FSDP #126
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: Code Formatting Check | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- r[0-9]+.[0-9]+ | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- run: pip install yapf==0.30.0 | |
- name: Run yapf | |
shell: bash | |
run: | | |
git_status=$(git status --porcelain) | |
if [[ $git_status ]]; then | |
echo "Checkout code is not clean" | |
echo "${git_status}" | |
exit 1 | |
fi | |
yapf -i -r *.py tests/ torchacc/ benchmarks/ | |
git_status=$(git status --porcelain) | |
if [[ $git_status ]]; then | |
git diff | |
echo "Python format failed." | |
echo "Running `yapf -i -r *.py tests/ torchacc/ benchmarks/`" | |
exit 1 | |
else | |
echo "Python format passed." | |
fi |