Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.
C++ C# Jupyter Notebook PLSQL Perl Python Other
ataymano and JohnLangford rl client tests fix (#1562)
* http server init error handling

* Do not turn off http server before client
Latest commit 64ac2f8 Aug 9, 2018
Failed to load latest commit information.
R Fix missing bracket (#1333) Oct 11, 2017
acinclude.d macosx_c++11_clang Feb 6, 2015
big_tests . Jan 21, 2017
c_test Fix issues detected by Secure Development Life check. (SDL-7.0) (#1356) Nov 27, 2017
cluster Set CXX conditionally (only if not set) in Makefiles May 24, 2018
cs fix cli interface Apr 24, 2018
demo [WIP] addressing python semantic checking warnings from issue #1442, … Apr 9, 2018
deploy_vw Fix issues detected by Secure Development Life check. (SDL-7.0) (#1356) Nov 27, 2017
doc added Wiki tab Mar 6, 2016
explore fix more warnings Jul 4, 2018
java Albietz regcb (#1511) Jul 2, 2018
library hash moved into explore/ May 16, 2018
logo_assets . Jan 21, 2017
python updating python install tools (#1533) Jul 18, 2018
rapidjson Bi-annual PR (#1270) Jul 15, 2017
reinforcement_learning rl client tests fix (#1562) Aug 9, 2018
sdl Fix issues detected by Secure Development Life check. (SDL-7.0) (#1356) Nov 27, 2017
singularity install netcat Mar 14, 2018
test Gramhagen 1538 python make test (#1550) Jul 26, 2018
utl utl/vw-varinfo: work-around for issue/1547: Jul 25, 2018
vowpalwabbit Fixed bug in CLI parsing of --csoaa_ldf multiline (#1551) Aug 2, 2018
.editorconfig turn off autostyle for new versions and shift to Allman Jul 19, 2017
.gitignore 1) initial exploration 2) Markus vw and objpool 3) api usage example Jun 12, 2018
.gitkeep added missing files Sep 24, 2013
.travis.yml [python] Fix shuffle between passes and add a test for it (#1532) Jul 17, 2018
AUTHORS . Jan 21, 2017
INSTALL updated INSTALL Mar 29, 2017
LICENSE added license file May 15, 2015
Makefile 1) report_outcome() should log in background thread. 2) Bug fixes and… Jul 26, 2018
Makefile.am hash moved into explore/ May 16, 2018
README.deploy.txt Add an optional deploy_vw project to the VW solution/ Sep 8, 2014
README.md add lgtm code checks shield Jul 3, 2018
README.windows.txt Update Windows README (#1554) Jul 31, 2018
appveyor.yml add cpprestsdk via vcpkg Jul 6, 2018
autogen.sh Don't clobber --with-boost and --with-boost-libdir Jan 3, 2018
configure.ac bump version# to 8.6.1 (#1540) Jul 21, 2018
deployvw.bat fix typo Jun 12, 2015
libvw.pc.in Add support for pkg-config Nov 23, 2015
libvw_c_wrapper.pc.in Add support for pkg-config Nov 23, 2015
mkdevdist.sh . Jan 21, 2017


Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved.  Released under a BSD (revised)
license as described in the file LICENSE.

Vowpal Wabbit

Build Status Windows Build Status Coverage Status Total Alerts

This is the vowpal wabbit fast online learning code. For Windows, look at README.windows.txt

Prerequisite software

These prerequisites are usually pre-installed on many platforms. However, you may need to consult your favorite package manager (yum, apt, MacPorts, brew, ...) to install missing software.

  • Boost library, with the Boost::Program_Options library option enabled.
  • The zlib compression library + headers. In linux distros: package zlib-devel (Red Hat/CentOS), or zlib1g-dev (Ubuntu/Debian)
  • lsb-release (RedHat/CentOS: redhat-lsb-core, Debian: lsb-release, Ubuntu: you're all set, OSX: not required)
  • GNU autotools: autoconf, automake, libtool, autoheader, et. al. This is not a strict prereq. On many systems (notably Ubuntu with libboost-program-options-dev installed), the provided Makefile works fine.
  • (optional) git if you want to check out the latest version of vowpal wabbit, work on the code, or even contribute code to the main project.

Getting the code

You can download the latest version from here. The very latest version is always available via 'github' by invoking one of the following:

## For the traditional ssh-based Git interaction:
$ git clone git://github.com/JohnLangford/vowpal_wabbit.git

## You can also try the following SSH URL:
$ git clone git@github.com:JohnLangford/vowpal_wabbit.git

## For HTTP-based Git interaction
$ git clone https://github.com/JohnLangford/vowpal_wabbit.git


You should be able to build the vowpal wabbit on most systems with:

$ make
$ make test    # (optional)

If that fails, try:

$ ./autogen.sh
$ make
$ make test    # (optional)
$ make install

Note that ./autogen.sh requires automake (see the prerequisites, above.)

./autogen.sh's command line arguments are passed directly to configure as if they were configure arguments and flags.

Note that ./autogen.sh will overwrite the supplied Makefile, including the Makefiles in sub-directories, so keeping a copy of the Makefiles may be a good idea before running autogen.sh. If your original Makefiles were overwritten by autogen.sh calling automake, you may always get the originals back from git using:

git checkout Makefile */Makefile

Be sure to read the wiki: https://github.com/JohnLangford/vowpal_wabbit/wiki for the tutorial, command line options, etc.

The 'cluster' directory has it's own documentation for cluster parallel use, and the examples at the end of test/Runtests give some example flags.

C++ Optimization

The default C++ compiler optimization flags are very aggressive. If you should run into a problem, consider creating and running configure with the --enable-debug option, e.g.:

$ ./configure --enable-debug

or passing your own compiler flags via the OPTIM_FLAGS make variable:

$ make OPTIM_FLAGS="-O0 -g"

Ubuntu/Debian specific info

On Ubuntu/Debian/Mint and similar the following sequence should work for building the latest from github:

# -- Get libboost program-options and zlib:
apt-get install libboost-program-options-dev zlib1g-dev

# -- Get the python libboost bindings (python subdir) - optional:
apt-get install libboost-python-dev

# -- Get the vw source:
git clone git://github.com/JohnLangford/vowpal_wabbit.git

# -- Build:
cd vowpal_wabbit
make test       # (optional)
make install

Ubuntu advanced build options (clang and static)

If you prefer building with clang instead of gcc (much faster build and slighly faster executable), install clang and change the make step slightly:

apt-get install clang

make CXX=clang++

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 and tested with:

make CXX='clang++ -static' clean vw test     # ignore warnings

Debian Python 3 Binding

Ensure boost-library and c-compiler are installed:

apt-get install libboost-program-options-dev zlib1g-dev libboost-python-dev clang make automake

Set Python 3.x and its boost-library as default:

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.x 2

ln -sf /usr/lib/x86_64-linux-gnu/libboost_python-py3x.a /usr/lib/x86_64-linux-gnu/libboost_python.a
ln -sf /usr/lib/x86_64-linux-gnu/libboost_python-py3x.so /usr/lib/x86_64-linux-gnu/libboost_python.so

Install Vowpal Wabbit via pip:

pip3 install vowpalwabbit

Mac OS X-specific info

OSX requires glibtools, which is available via the brew or MacPorts package managers.

Complete brew install of 8.4

brew install vowpal-wabbit

The homebrew formula for VW is located on github.

Manual install of Vowpal Wabbit

OSX Dependencies (if using Brew):

brew install libtool
brew install autoconf
brew install automake
brew install boost
brew install boost-python

OSX Dependencies (if using MacPorts):

## Install glibtool and other GNU autotool friends:
$ port install libtool autoconf automake

## Build Boost for Mac OS X 10.8 and below
$ port install boost +no_single -no_static +openmpi +python27 configure.cxx_stdlib=libc++ configure.cxx=clang++

## Build Boost for Mac OS X 10.9 and above
$ port install boost +no_single -no_static +openmpi +python27

OSX Manual compile:

Mac OS X 10.8 and below: configure.cxx_stdlib=libc++ and configure.cxx=clang++ ensure that clang++ uses the correct C++11 functionality while building Boost. Ordinarily, clang++ relies on the older GNU g++ 4.2 series header files and stdc++ library; libc++ is the clang replacement that provides newer C++11 functionality. If these flags aren't present, you will likely encounter compilation errors when compiling vowpalwabbit/cbify.cc. These error messages generally contain complaints about std::to_string and std::unique_ptr types missing.

To compile:

$ sh autogen.sh --enable-libc++
$ make
$ make test    # (optional)

OSX Python Binding installation with Anaconda

When using Anaconda as the source for Python the default Boost libraries used in the Makefile need to be adjusted. Below are the steps needed to install the Python bindings for VW. This should work for Python 2 and 3. Adjust the directories to match where anaconda is installed.

# create anaconda environment with boost
conda create --name vw boost
source activate vw
git clone https://github.com/JohnLangford/vowpal_wabbit.git
cd vowpal_wabbit
# edit Makefile
# change BOOST_INCLUDE to use anaconda env dir: /anaconda/envs/vw/include
# change BOOST_LIBRARY to use anaconda lib dir: /andaconda/envs/vw/lib
cd python
python setup.py install

Code Documentation

To browse the code more easily, do

make doc

and then point your browser to doc/html/index.html.

Note that documentation generates class diagrams using Graphviz. For best results, ensure that it is installed beforehand.