Skip to content

fix: suggested fixes for FMT #3732

fix: suggested fixes for FMT

fix: suggested fixes for FMT #3732

name: Forward Model checks
# This file is for checking that models generated from newer VW code do not cause crashes when loaded into older VW code
# Generate a model using latest wheel and load the same model using the latest vw master branch
on:
push:
branches:
- master
- 'releases/**'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
python-build:
name: Build latest python wheel
container:
image: vowpalwabbit/manylinux2010-build:latest
runs-on: ubuntu-latest
steps:
# v1 must be used because newer versions require a node.js version that will not run on this old image.
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Build wheel
shell: bash
run: |
/opt/python/cp310-cp310/bin/pip wheel . -w wheel_output/ --global-option --cmake-options="-DSTATIC_LINK_VW_JAVA=On;-DPython_INCLUDE_DIR='/opt/python/cp310-cp310/include/python3.10/'" --verbose
auditwheel repair wheel_output/*whl -w audit_output/
- name: Upload built wheel
uses: actions/upload-artifact@v4
with:
name: test_manylinux_amd64_3.10
path: audit_output/
generate-latest-model:
name: Generate model using latest artifact
needs: python-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: test_manylinux_amd64_3.10
path: built_wheel
- name: Build recent-models
shell: bash
run: |
pip install built_wheel/*.whl
python ./test/run_tests_model_gen_and_load.py --generate_models --skip_pr_tests "${{ github.event.pull_request.title }}"
- name: Upload generated file
uses: actions/upload-artifact@v4
with:
name: vw_generated_models
path: ~/.vw_runtests_model_gen_working_dir/*
if-no-files-found: error
test-latest-model:
name: Test latest model with current master
container:
image: vowpalwabbit/manylinux2010-build:latest
needs: generate-latest-model
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/download-artifact@v1
with:
name: vw_generated_models
path: .vw_runtests_model_gen_working_dir
- name: Test loading model with current master
shell: bash
run: |
mv .vw_runtests_model_gen_working_dir ~
git clone --recursive https://github.com/VowpalWabbit/vowpal_wabbit.git
cd vowpal_wabbit
/opt/python/cp310-cp310/bin/pip wheel . -w wheel_last_commit/ --global-option --cmake-options="-DSTATIC_LINK_VW_JAVA=On;-DPython_INCLUDE_DIR='/opt/python/cp310-cp310/include/python3.10/'" --verbose
auditwheel repair wheel_last_commit/*whl -w audit_last_commit/
/opt/python/cp310-cp310/bin/python3.10 -m pip install wheel_last_commit/*.whl
cd ..
/opt/python/cp310-cp310/bin/python3.10 ./test/run_tests_model_gen_and_load.py --load_models --skip_missing_args --skip_pr_tests "${{ github.event.pull_request.title }}"