forked from jackgerrits/vowpal_wabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (85 loc) · 3.38 KB
/
backward_model_load_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Backward Model checks
# This file is for checking that models generated from the current VW master do not cause crashes when loaded into newer VW code
# Generate a model using the latest vw master branch and load the same model using the latest wheel
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 previous master 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: |
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
cd ..
auditwheel repair vowpal_wabbit/wheel_last_commit/*whl -w audit_last_commit/
- name: Upload built wheel
uses: actions/upload-artifact@v1
with:
name: test_manylinux_amd64_3.10
path: audit_last_commit/
generate-latest-model:
name: Generate model using previous python wheel
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_missing_args --skip_pr_tests "${{ github.event.pull_request.title }}"
- name: Upload generated file
uses: actions/upload-artifact@v2
with:
name: vw_generated_models
path: ~/.vw_runtests_model_gen_working_dir/*
if-no-files-found: error
test-latest-model:
name: Test previous master model with newest wheel
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 ~
/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/
/opt/python/cp310-cp310/bin/python3.10 -m pip install wheel_output/*.whl
/opt/python/cp310-cp310/bin/python3.10 ./test/run_tests_model_gen_and_load.py --load_models --skip_pr_tests "${{ github.event.pull_request.title }}"