Update tokenizers, centos7_2024.2.0.dev #52
This file contains 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: genai_python_lib | |
on: pull_request | |
jobs: | |
ubuntu_genai_python_lib: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- run: mkdir ./ov/ | |
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.2.0-15484-4b8641ee3f4/l_openvino_toolkit_centos7_2024.2.0.dev20240523_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz # Install CentOS7 instead of Ubuntu to match PyPI distribution ABI | |
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh | |
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ | |
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j | |
- run: python -m pip install --pre openvino --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly # Can't load CentOS libraries from the archive | |
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal | |
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts. | |
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt | |
- run: PYTHONPATH=./src/python/ python -c "from openvino_genai import LLMPipeline" | |
- run: source ./ov/setupvars.sh && CMAKE_BUILD_PARALLEL_LEVEL="" python -m pip install --pre . --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly | |
- run: python -c "from openvino_genai import LLMPipeline" | |
- name: GenAI Python API tests | |
run: | | |
source ./ov/setupvars.sh | |
cd ./tests/python_tests/ | |
python -m pip install -r requirements.txt | |
models=$(python list_test_models.py) | |
echo "$models" | while read -r model_name model_path; do | |
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model "$model_name" "$model_path" | |
done | |
python -m pytest test_generate_api.py | |
windows_genai_python_lib: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.2.0-15349-765302e0de1/w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64.zip | |
- run: unzip ov.zip | |
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ | |
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && cmake --build ./build/ --config Release -j | |
- run: python -m pip install "numpy<1.27" | |
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal | |
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts. | |
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt | |
- run: set "PYTHONPATH=./src/python;" && call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -c "from openvino_genai import LLMPipeline" # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that. | |
- run: set CMAKE_BUILD_PARALLEL_LEVEL=&& call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -m pip install . | |
- run: python -c "from openvino_genai import LLMPipeline" |