Divide iree_utils and do module imports on function calls.

This commit is contained in:
Prashant Kumar
2022-06-22 11:13:17 +05:30
parent 08eda2ce35
commit e8aa105b2a
147 changed files with 4705 additions and 2662 deletions

View File

@@ -53,7 +53,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest yapf toml
python -m pip install flake8 pytest toml
if [ -f requirements.txt ]; then pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f https://github.com/llvm/torch-mlir/releases -f https://github.com/nod-ai/SHARK-Runtime/releases; fi
- name: Lint with flake8
run: |
@@ -61,7 +61,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude shark.venv,lit.cfg.py
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude shark.venv,lit.cfg.py
yapf -i --style .style.yapf shark/*.py
- name: Build and validate the package
run: |

15
.github/workflows/python-format.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: black-formatter
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10.5
- name: Install Black
run: pip install black
- name: Run formatter check on the entire project.
run: black --line-length 80 --check .

View File

@@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest yapf toml
python -m pip install flake8 pytest toml
- name: Lint with flake8
run: |
@@ -45,7 +45,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude lit.cfg.py
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude lit.cfg.py
yapf -i --style .style.yapf shark/*.py
- name: Validate Models
run: |