Skip to content

Commit

Permalink
merge in master
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmang committed Nov 7, 2023
2 parents dc49acd + a541d85 commit 45a41a2
Show file tree
Hide file tree
Showing 1,380 changed files with 165,673 additions and 49,999 deletions.
19 changes: 17 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
{
"Checks": "-*,readability-*,modernize-*,performance-*,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-init-variables,-modernize-use-trailing-return-type,-readability-uppercase-literal-suffix",
"Checks": "-*,readability-*,modernize-*,performance-*,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-init-variables,readability-identifier-naming,-modernize-use-trailing-return-type,-readability-magic-numbers,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-uppercase-literal-suffix",
"FormatStyle": "file",
"WarningsAsErrors": "-*,performance-*,modernize-use-using,readability-braces-around-statements",
"CheckOptions": [
{
"key": "performance-move-const-arg.CheckTriviallyCopyableMove",
"value": "0"
}
},
{"key": "readability-identifier-naming.NamespaceCase", "value": "lower_case"},
{"key": "readability-identifier-naming.ClassCase", "value": "lower_case"},
{"key": "readability-identifier-naming.StructCase", "value": "lower_case"},
{"key": "readability-identifier-naming.MemberCase", "value": "lower_case"},
{"key": "readability-identifier-naming.PrivateMemberPrefix", "value": "_"},
{"key": "readability-identifier-naming.ProtectedMemberPrefix", "value": "_"},
{"key": "readability-identifier-naming.FunctionCase", "value": "lower_case"},
{"key": "readability-identifier-naming.MethodCase", "value": "lower_case"},
{"key": "readability-identifier-naming.VariableCase", "value": "lower_case" },
{"key": "readability-identifier-naming.MacroDefinitionCase", "value": "UPPER_CASE"},
{"key": "readability-identifier-naming.EnumCase", "value": "lower_case"},
{"key": "readability-identifier-naming.ScopedEnumConstantCase", "value": "UPPER_CASE"},
{"key": "readability-identifier-naming.EnumConstantCase", "value": "UPPER_CASE"},
{"key": "readability-identifier-naming.GlobalConstantCase", "value": "UPPER_CASE"},
{"key": "readability-identifier-naming.StaticConstantCase", "value": "UPPER_CASE"}
]
}
54 changes: 33 additions & 21 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

env:
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_binary_cache

jobs:
test_with_sanitizers:
strategy:
Expand All @@ -31,37 +34,39 @@ jobs:
UBSAN_OPTIONS: "print_stacktrace=1"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup MSVC Developer Command Prompt
if: ${{ startsWith(matrix.os, 'windows') }}
uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@main
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV
shell: bash
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- uses: actions/cache@v3
env:
cache-name: vcpkg-cache
with:
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg'
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/*
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}"
- uses: lukka/run-cmake@v10
env:
VCPKG_ROOT: ${{github.workspace}}/ext_libs/vcpkg
with:
cmakeListsTxtPath: "${{ github.workspace }}/CMakeLists.txt"
configurePreset: "${{ matrix.preset }}"
- name: Build
run: cmake --build build
- name: Run unit tests
run: |
cd build
ctest --verbose --output-on-failure
- name: Run python test script - Windows
# separate case needed for windows because of test 67
if: ${{ startsWith(matrix.os, 'windows') && (success() || failure()) }}
run: python3 test/run_tests.py -f --clean_dirty -E 0.001 --include_flatbuffers --skip_test 67 --jobs 1
- name: Run python test script - Unix
if: ${{ !startsWith(matrix.os, 'windows') && (success() || failure()) }}
run: python3 test/run_tests.py -f --clean_dirty -E 0.001 --include_flatbuffers
working-directory: build
run: ctest --output-on-failure --no-tests=error --exclude-regex WIterations --label-regex VWTestList
- name: Run python test script
if: ${{ success() || failure() }}
run: python3 test/run_tests.py -f --clean_dirty -E 0.001 --include_flatbuffers --jobs 1

test_ubsan_minimal:
# To avoid running out of disk space, build only VW executables and Boost unit tests on Linux
# To avoid running out of disk space, build only VW executables and some unit tests on Linux
strategy:
fail-fast: false
matrix:
Expand All @@ -73,22 +78,29 @@ jobs:
UBSAN_OPTIONS: "print_stacktrace=1"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@main
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV
shell: bash
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- uses: actions/cache@v3
env:
cache-name: vcpkg-cache
with:
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg'
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/*
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}"
- uses: lukka/run-cmake@v10
env:
VCPKG_ROOT: ${{github.workspace}}/ext_libs/vcpkg
with:
cmakeListsTxtPath: "${{ github.workspace }}/CMakeLists.txt"
configurePreset: "${{ matrix.preset }}"
- name: Build
run: cmake --build build --target vw_cli_bin spanning_tree vw-unit-test.out
run: cmake --build build -t vw_cli_bin vw_spanning_tree vw_spanning_tree_bin vw_core_test
- name: Run unit tests
run: ./build/test/unit_test/vw-unit-test.out
run: ./build/vowpalwabbit/core/vw_core_test --gtest_filter=-\*WIiterations
- name: Run python test script
if: ${{ success() || failure() }}
run: python3 test/run_tests.py -f --clean_dirty -E 0.001 --include_flatbuffers
89 changes: 89 additions & 0 deletions .github/workflows/backward_model_load_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}"
28 changes: 9 additions & 19 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,23 @@ on:
- published
workflow_dispatch:

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
cpp:
container:
image: vowpalwabbit/ubuntu1804-build:latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
cmake .. -DBUILD_DOCS=On
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- name: Build docs
run: |
cd build
make doc
run: nix build --print-build-logs .#vw-cpp-docs
- name: Upload built docs
uses: actions/upload-artifact@v1
with:
name: cxx_docs
path: doc/html/
path: result/html/
dump-options-build:
container:
image: vowpalwabbit/ubuntu1804-build:latest
Expand Down Expand Up @@ -71,11 +61,11 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
- run: echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
- run: echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
- name: Build wheel
shell: bash
run: |
pip wheel . -w wheel_output/ --global-option --cmake-options="-DSTATIC_LINK_VW_JAVA=On;-DPython_INCLUDE_DIR='/opt/python/cp39-cp39/include/python3.9/'" --verbose
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@v1
Expand All @@ -92,7 +82,7 @@ jobs:
- uses: actions/setup-node@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.10'
- name: If this is a push build then set version to latest
if: ${{ github.event_name == 'push' }}
run: echo "VW_SPHINX_VERSION_OVERRIDE=latest" >> $GITHUB_ENV
Expand All @@ -113,7 +103,7 @@ jobs:
pip install -r python/docs/build-requirements.txt
pip install -r requirements.txt
pip install PyYAML
npm install -g hbs-cli
npm install -g handlebars
- name: Install wheel
shell: bash
run: |
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- '*'

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

Expand All @@ -21,19 +21,22 @@ jobs:
os: [macos-11]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: brew install cmake boost flatbuffers ninja
- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DWARNINGS=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_BUILD_CSV=On -DVW_INSTALL=Off
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DWARNINGS=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DVW_INSTALL=Off
- name: Build
run: cmake --build build --target all
- name: Test
- name: Unit tests
working-directory: build
run: |
# Run unit tests
ctest --test-dir build --extra-verbose --output-on-failure --label-regex VWTestList
ctest --output-on-failure --no-tests=error --label-regex VWTestList --parallel 2
- name: Test
run: |
# Run integration tests
python3 test/run_tests.py --fuzzy_compare --exit_first_fail --epsilon 0.001 --ignore_dirty
python3 test/run_tests.py --fuzzy_compare --exit_first_fail --epsilon 0.001 --ignore_dirty --extra_options=--onethread
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/build_vw_large_action_space.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/build_vw_slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- '*'

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

Expand All @@ -27,4 +27,5 @@ jobs:
run: ./.scripts/linux/build-slim.sh
- name: Test VW Slim
shell: bash
run: ./.scripts/linux/test-slim.sh
working-directory: build
run: ctest --output-on-failure --no-tests=error --tests-regex "VowpalWabbitSlim|ExploreSlim|CommandLineOptionsSlim" --parallel 2
Loading

0 comments on commit 45a41a2

Please sign in to comment.