[CI] optimize lint term (#5986)
### What this PR does / why we need it?
This patch purpose to optimize the lint check term. The main idea is to
reduce unnecessary installation time.
1. The installation of vllm is not must, only append the path of vllm
src to the `PATHONPATH` is effective
2. This installation of `requirements-dev.txt` is not must, we have a
pre-built image `quay.io/ascend-ci/vllm-ascend:lint` with all the
requirements installed in advance.
**NOTE**: the conditions for triggering image builds are: 1).Daily
scheduled build; 2) Build when requirements are modified; 3) Manual
build. This ensures that the dependencies in our image are up-to-date to
the greatest extent possible.
3. The `mypy` was separated from the `pre-commit` hook for performance
reasons; we found that integrating `mypy` into the `pre-commit` hook
resulted in poor performance.
4. Reduce the CPU core consumption from 16 -> 8
### Does this PR introduce _any_ user-facing change?
The end-to-end lint time was optimized from 20min/per PR to 8min/per PR
### How was this patch tested?
- vLLM version: v0.13.0
- vLLM main:
2c24bc6996
---------
Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ from vllm.distributed import (get_ep_group,
|
||||
from vllm.forward_context import get_forward_context
|
||||
from vllm.logger import logger
|
||||
from vllm.sequence import IntermediateTensors
|
||||
from xlite._C import (AttnMHA, Model, ModelAttnMeta, ModelConfig, Runtime,
|
||||
from xlite._C import (AttnMHA, Model, ModelAttnMeta, ModelConfig, Runtime, # type: ignore[attr-defined]
|
||||
ScoringFuncSoftmax)
|
||||
|
||||
import vllm_ascend.envs as envs_ascend
|
||||
@@ -214,10 +214,10 @@ class QwenMoeXliteModel(LlamaXliteModel):
|
||||
config.def_dp_size = vllm_config.parallel_config.data_parallel_size
|
||||
config.moe_ep_size = ep_group.world_size if vllm_config.parallel_config.enable_expert_parallel else 1
|
||||
config.moe_tp_size = 1 if vllm_config.parallel_config.enable_expert_parallel else ep_group.world_size
|
||||
config.experts_weight_transpose = True
|
||||
config.experts_weight_transpose = True # type: ignore
|
||||
config.moe_intermediate_size = hf_config.moe_intermediate_size
|
||||
config.norm_topk_prob = hf_config.norm_topk_prob
|
||||
config.scoring_func = ScoringFuncSoftmax
|
||||
config.norm_topk_prob = hf_config.norm_topk_prob # type: ignore
|
||||
config.scoring_func = ScoringFuncSoftmax # type: ignore
|
||||
return config
|
||||
|
||||
def _build_model(self, runnable: nn.Module, vllm_config: VllmConfig,
|
||||
|
||||
Reference in New Issue
Block a user