Optimum neuron / Test CPU Only #104
This file contains hidden or 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: Optimum neuron / Test CPU Only | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'pyproject.toml' | |
| - 'optimum/commands/export/neuronx.py' | |
| - 'optimum/commands/neuron/cache.py' | |
| - 'optimum/neuron/modeling_traced.py' | |
| - 'optimum/neuron/modeling_seq2seq.py' | |
| - 'optimum/neuron/cache/**.py' | |
| - 'optimum/neuron/configuration_utils.py' | |
| - 'optimum/neuron/models/inference/backend/config.py' | |
| - 'optimum/neuron/vllm/**.py' | |
| - 'optimum/exporters/neuron/**.py' | |
| - 'tests/decoder/test_cache_cleanup.py' | |
| - 'tests/decoder/test_cache_sync_retry.py' | |
| - 'tests/decoder/test_decoder_config.py' | |
| - 'tests/decoder/test_fused_logits_warper.py' | |
| - 'tests/decoder/test_cli.py' | |
| - 'tests/exporters/test_cpu_compilation.py' | |
| - 'tests/vllm/test_server_manager.py' | |
| - 'tests/vllm/test_serve_ports.py' | |
| - '.github/workflows/test_cpu_only.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'pyproject.toml' | |
| - 'optimum/commands/export/neuronx.py' | |
| - 'optimum/commands/neuron/cache.py' | |
| - 'optimum/neuron/modeling_traced.py' | |
| - 'optimum/neuron/modeling_seq2seq.py' | |
| - 'optimum/neuron/cache/**.py' | |
| - 'optimum/neuron/configuration_utils.py' | |
| - 'optimum/neuron/models/inference/backend/config.py' | |
| - 'optimum/neuron/vllm/**.py' | |
| - 'optimum/exporters/neuron/**.py' | |
| - 'tests/decoder/test_cache_cleanup.py' | |
| - 'tests/decoder/test_cache_sync_retry.py' | |
| - 'tests/decoder/test_decoder_config.py' | |
| - 'tests/decoder/test_fused_logits_warper.py' | |
| - 'tests/decoder/test_cli.py' | |
| - 'tests/exporters/test_cpu_compilation.py' | |
| - 'tests/vllm/test_server_manager.py' | |
| - 'tests/vllm/test_serve_ports.py' | |
| - '.github/workflows/test_cpu_only.yml' | |
| schedule: | |
| - cron: "0 5 * * 1-5" # 5 AM UTC, Monday-Friday | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| sanity: | |
| name: Sanity | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run sanity check | |
| uses: ./.github/actions/sanity-check | |
| with: | |
| hf_token: ${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CACHE }} | |
| test-cpu: | |
| name: Run CPU Only Tests | |
| needs: sanity | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Neuronx runtime | |
| uses: ./.github/actions/install_neuronx_runtime | |
| - name: Setup virtual environment | |
| uses: ./.github/actions/setup_venv | |
| - name: Setup PATH | |
| run: echo "/home/ubuntu/.local/bin" >> $GITHUB_PATH | |
| - name: Run decoder CLI tests | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest -sv tests/decoder/test_cli.py | |
| - name: Run decoder config tests | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest -sv tests/decoder/test_decoder_config.py | |
| - name: Run fused logits warper tests | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest -sv tests/decoder/test_fused_logits_warper.py | |
| - name: Install diffusers dependencies | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| uv pip install ".[diffusers]" | |
| - name: Run cache unit tests | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest tests/decoder/test_cache_cleanup.py tests/decoder/test_cache_sync_retry.py -v --tb=short | |
| - name: Run CPU compilation tests | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest tests/exporters/test_cpu_compilation.py -v --tb=short | |
| - name: Install vLLM dependencies | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| uv pip install .[vllm,vllm-tests] | |
| - name: Run vLLM CPU tests | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| pytest -sv tests/vllm/test_server_manager.py | |
| pytest -sv tests/vllm/test_serve_ports.py |