From e63be8e46c34d81151856dbb1b8920214babbc7f Mon Sep 17 00:00:00 2001 From: AlpinDale Date: Mon, 2 Sep 2024 16:14:00 +0000 Subject: [PATCH] minor CI fixes --- .github/workflows/clang-format.yml | 5 +++++ .github/workflows/ruff.yml | 11 +++++++---- .github/workflows/yapf.yml | 2 +- pyproject.toml | 26 +++++++++++--------------- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 36814184c..d25aa3bb9 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -36,6 +36,11 @@ jobs: 'kernels/punica/bgmv/vec_dtypes.cuh' 'kernels/punica/punica_ops.cu' 'kernels/punica/type_convert.h' + 'kernels/quantization/gguf/ggml-common.h' + 'kernels/quantization/gguf/dequantize.cuh' + 'kernels/quantization/gguf/vecdotq.cuh' + 'kernels/quantization/gguf/mmq.cuh' + 'kernels/quantization/gguf/mmvq.cuh' ) find kernels/ \( -name '*.h' -o -name '*.cpp' -o -name '*.cu' -o -name '*.cuh' \) -print \ | grep -vFf <(printf "%s\n" "${EXCLUDES[@]}") \ diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 38735df5c..525493b6c 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -25,10 +25,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff==0.1.5 codespell==2.2.6 tomli==2.0.1 + pip install ruff==0.1.5 codespell==2.3.0 tomli==2.0.1 isort==5.13.2 - name: Analysing the code with ruff run: | - ruff aphrodite tests + ruff . - name: Spelling check with codespell run: | - codespell --toml pyproject.toml \ No newline at end of file + codespell --toml pyproject.toml + - name: Run isort + run: | + isort . --check-only \ No newline at end of file diff --git a/.github/workflows/yapf.yml b/.github/workflows/yapf.yml index 831ff1aec..a4a4e4eea 100644 --- a/.github/workflows/yapf.yml +++ b/.github/workflows/yapf.yml @@ -28,4 +28,4 @@ jobs: pip install toml==0.10.2 - name: Running yapf run: | - yapf --diff --recursive aphrodite tests \ No newline at end of file + yapf --diff --recursive aphrodite \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d81769fc2..b96afbd5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,9 @@ build-backend = "setuptools.build_meta" [tool.ruff] # Allow lines to be as long as 80. line-length = 80 +exclude = [ + "examples/fp8/quantizer/quantize.py" +] [tool.ruff.lint] select = [ @@ -28,28 +31,21 @@ select = [ "SIM", # isort # "I", + "G", ] ignore = [ - # wildcard imports + # star imports "F405", "F403", # lambda expression assignment "E731", - # .strip() with multi-character strings - "B005", # Loop control variable not used within loop body "B007", ] -[tool.mypy] -python_version = "3.8" - -ignore_missing_imports = true - -files = "aphrodite" -# TODO: Include the code from Megatron and HuggingFace. -exclude = "aphrodite/modeling/models/|aphrodite/endpoints/kobold/klite.embd" - - [tool.codespell] -ignore-words-list = "dout, te, indicies, ist" -skip = "./aphrodite/endpoints/kobold/klite.embd,./kernels/" +ignore-words-list = "dout, te, indicies, ist, subtile" +skip = "./tests/,./aphrodite/endpoints/kobold/klite.embd,./kernels/" + +[tool.isort] +use_parentheses = true +skip_gitignore = true