-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Developing with WSL
Jack Gerrits edited this page Jun 1, 2020
·
1 revision
The following will run your through how to build and then debug the VW executable from scratch. [Windows/WSL/VSCode] indicates where this step needs to be done. A lot of these instructions are also relevant when working directly in Ubuntu and other distros.
- [Windows] Install WSL
- [Windows] Install Ubuntu from Windows Store
- [Windows] Install VSCode
- [VSCode] Open VSCode and install "Remote - WSL" extension (
ms-vscode-remote.remote-wsl
) - [WSL] Install dependencies
- Using
apt-get
:# System deps sudo apt install git cmake g++ gdb # VW deps sudo apt install libboost-dev libboost-thread-dev libboost-program-options-dev libboost-system-dev libboost-math-dev libboost-test-dev zlib1g-dev
- Using
- [WSL] Clone VW:
git clone https://github.com/VowpalWabbit/vowpal_wabbit.git
- [WSL] Open VSCode from WSL to start a remote session connected to this directory -
code vowpal_wabbit
- On the first launch it should tell you that it is installing the VSCode remote server
- [VSCode] There should now be a VSCode window open and in the bottom left it should indicate it is connected to
WSL: Ubuntu
- [VSCode] In the open VSCode window connected to the remote install the following two extensions:
- "C/C++' (
ms-vscode.cpptools
) - "Cmake Tools" (ms-vscode.cmake-tools
) - [VSCode]
Ctrl+Shift+P
->Cmake: Scan for kits
- [VSCode]
Ctrl+Shift+P
->Cmake: Select a kit
-> select one that saysUsing compilers: C = ..., CXX = ...
- [VSCode]
Ctrl+Shift+P
->Cmake: build
- [VSCode] You can also change this information along the bottom of the window
- [VSCode]
Ctrl+Shift+P
->Cmake: Set debug target
->vw-bin
- [VSCode]
Ctrl+Shift+P
->Cmake: Debug
- [VSCode]
Ctrl+Shift+P
->Preferences: Open Settings (JSON)
- [VSCode] Add the following to your preferences:
-
cwd
can be changed to whatever is needed, but${workspaceFolder}/test/
is useful as that is the cwd when debugging a test failure. -
args
is an array of strings, you'll need to convert from the raw command line you'd like to use
-
{
// ...
"cmake.debugConfig": {
"cwd": "${workspaceFolder}/test/",
"args": [
"-d",
"./train-sets/rcv1_small.dat",
]
}
}
Replace path/to/
with the absolute path to the base of the cloned VW repo and run the following:
# example: export VW_BASE_DIR=/home/jack/vowpal_wabbit
export VW_BASE_DIR=<change_this_value>
echo "python exec(open('${VW_BASE_DIR}/vowpalwabbit/gdb_pretty_printers.py').read())" >> ~/.gdbinit
- 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: