-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Building
Jack Gerrits edited this page Nov 4, 2022
·
64 revisions
Getting started > [Building] > Installing > Tutorial
First, clone the repo:
git clone --recursive https://github.com/VowpalWabbit/vowpal_wabbit.git
cd vowpal_wabbit
Then, pick one of several ways to configure the project:
- CMake 3.20+
- Ninja
cmake --preset=vcpkg-release -DBUILD_TESTING=OFF
cmake --build --preset=vcpkg-release
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="./ext_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-DFMT_SYS_DEP:BOOL="ON" \
-DRAPIDJSON_SYS_DEP:BOOL="ON" \
-DSPDLOG_SYS_DEP:BOOL="ON" \
-DVW_BOOST_MATH_SYS_DEP:BOOL="ON" \
-DVW_GTEST_SYS_DEP:BOOL="ON" \
-DVW_ZLIB_SYS_DEP:BOOL="ON" \
-DBUILD_TESTING:BOOL="OFF"
cmake --build build
brew install cmake ninja rapidjson spdlog fmt boost zlib flatbuffers
# Test dependencies
brew install googletest
apt update
apt install cmake ninja-build g++ libfmt-dev libspdlog-dev libflatbuffers-dev rapidjson-dev zlib1g-dev libboost-math-dev libflatbuffers-dev flatbuffers-compiler-dev
# Test dependencies
apt install libboost-test-dev libgtest-dev libgmock-dev
conda install cmake ninja rapidjson spdlog fmt boost zlib flatbuffers
# Test dependencies
conda install gtest gmock
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DFMT_SYS_DEP:BOOL="ON" \
-DRAPIDJSON_SYS_DEP:BOOL="ON" \
-DSPDLOG_SYS_DEP:BOOL="ON" \
-DVW_BOOST_MATH_SYS_DEP:BOOL="ON" \
-DVW_GTEST_SYS_DEP:BOOL="ON" \
-DVW_ZLIB_SYS_DEP:BOOL="ON" \
-DBUILD_TESTING:BOOL="OFF"
cmake --build build
-
10.0.16299.0
or newer Windows 10 SDK must be installed - The default triplet on Windows is 32 bit. Therefore
-DVCPKG_TARGET_TRIPLET=x64-windows
should be added to the first CMake command to use 64 bit. - To generate a Windows solution
-A x64 -G "Visual Studio 17 2022"
should also be added to the CMake command. It will generate a solution in the build directory that can be opened.- Alternatively, you can use Visual Studio's
open folder
feature to open the repo directly without needing to run any CMake commands
- Alternatively, you can use Visual Studio's
- If using
WSL
ensure you clone the repo in WSL and not in Windows to prevent broken line endings. - If building on WSL on an NTFS drive, also be sure that the drive is mounted with the "metadata" option, or CMake will not complete successfully. (See: here)
A statically linked vw
executable that is not sensitive to boost
version upgrades and can be safely copied between different Linux
versions (e.g. even from Ubuntu to Red-Hat) can be built by including -DSTATIC_LINK_VW=ON
in the CMake command and building the vw_cli_bin
target.
cmake --build build --target vw_cli_bin
Unit tests:
ctest --test-dir build --label-regex VWTestList
Integration tests:
python test/run_tests.py --epsilon 0.01 --fuzzy_compare
If you see:
Diff OK, Minor float difference ignored
That's ok. Floating point arithmetic does not round exactly the same way on all platforms.
- Home
- First Steps
- Input
- Command line arguments
- Model saving and loading
- Controlling VW's output
- Audit
- Algorithm details
- Awesome Vowpal Wabbit
- Learning algorithm
- Learning to Search subsystem
- Loss functions
- What is a learner?
- Docker image
- Model merging
- Evaluation of exploration algorithms
- Reductions
- Contextual Bandit algorithms
- Contextual Bandit Exploration with SquareCB
- Contextual Bandit Zeroth Order Optimization
- Conditional Contextual Bandit
- Slates
- CATS, CATS-pdf for Continuous Actions
- Automl
- Epsilon Decay
- Warm starting contextual bandits
- Efficient Second Order Online Learning
- Latent Dirichlet Allocation
- VW Reductions Workflows
- Interaction Grounded Learning
- CB with Large Action Spaces
- CB with Graph Feedback
- FreeGrad
- Marginal
- Active Learning
- Eigen Memory Trees (EMT)
- Element-wise interaction
- Bindings
-
Examples
- Logged Contextual Bandit example
- One Against All (oaa) multi class example
- Weighted All Pairs (wap) multi class example
- Cost Sensitive One Against All (csoaa) multi class example
- Multiclass classification
- Error Correcting Tournament (ect) multi class example
- Malicious URL example
- Daemon example
- Matrix factorization example
- Rcv1 example
- Truncated gradient descent example
- Scripts
- Implement your own joint prediction model
- Predicting probabilities
- murmur2 vs murmur3
- Weight vector
- Matching Label and Prediction Types Between Reductions
- Zhen's Presentation Slides on enhancements to vw
- EZExample Archive
- Design Documents
- Contribute: