From 1d67e04d67251ad85016fe094a0edbf4934b2064 Mon Sep 17 00:00:00 2001 From: Shaojun Liu <61072813+liu-shaojun@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:07:01 +0800 Subject: [PATCH] Update llm_unit_tests.yml --- .github/workflows/llm_unit_tests.yml | 39 +++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/llm_unit_tests.yml b/.github/workflows/llm_unit_tests.yml index 942ab06558e..25d577f7cb5 100644 --- a/.github/workflows/llm_unit_tests.yml +++ b/.github/workflows/llm_unit_tests.yml @@ -215,9 +215,46 @@ jobs: - name: Run LLM cli test (Linux) if: runner.os == 'Linux' uses: ./.github/actions/llm/cli-test-linux + + - name: Setup Python Path + if: runner.os == 'Windows' + shell: bash + run: | + # Get Python interpreter path + python_path=$(python -c 'import sys; print(sys.executable)') + python_dir=$(dirname "$python_path") + scripts_dir="$python_dir/Scripts" + + # Set environment variables + echo "PYTHON_PATH=$python_path" >> $GITHUB_ENV + echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV + echo "SCRIPTS_DIR=$scripts_dir" >> $GITHUB_ENV + - name: Run LLM cli test (Windows) if: runner.os == 'Windows' - uses: ./.github/actions/llm/cli-test-windows + shell: powershell + run: | + # Retrieve environment variables + $pythonPath = $env:PYTHON_PATH + $pythonDir = $env:PYTHON_DIR + $scriptsDir = $env:SCRIPTS_DIR + + # Update PATH + $env:PATH = "$pythonDir;$scriptsDir;$env:PATH" + + # Print PATH and verify Python + echo "Current PATH: $env:PATH" + & $pythonPath --version + & $pythonPath -m pip --version + pip list + + # Run tests + llm-cli.ps1 -t $env:THREAD_NUM -n 256 -x llama -m $env:LLAMA_INT4_CKPT_PATH -p 'Once upon a time,' + llm-cli.ps1 -t $env:THREAD_NUM -n 256 -x gptneox -m $env:GPTNEOX_INT4_CKPT_PATH -p 'Once upon a time,' + llm-cli.ps1 -t $env:THREAD_NUM -n 256 -x bloom -m $env:BLOOM_INT4_CKPT_PATH -p 'Once upon a time,' + # llm-cli.ps1 -t $env:THREAD_NUM -x starcoder -m $env:STARCODER_INT4_CKPT_PATH -p 'def check_odd(' + + - name: Run LLM inference test shell: bash run: |