Lale is easy to install. Assuming you already have a Python 3.6+ environment, all you need is the following:
pip install git+https://[email protected]/IBM/lale.git
This will install the Lale Core setup target, which includes many operators, pipelines, and search space generation targeting hyperopt and scikit-learn's GridSearchCV. It has a smaller set of dependencies than the Lale Full setup target, which also includes search space generation for SMAC and some deep-learning operators. You can install it as follows:
pip install git+https://[email protected]/IBM/lale.git#egg=lale[full]
Now you should be ready to start using Lale, for instance, in a Jupyter notebook.
As an alternative to installing Lale directly from the online github repository, you can also first clone the repository and then install Lale from your local clone. For the Lale Core setup target:
git clone https://github.com/IBM/lale.git
cd lale
pip install .
For the Lale Full and Lale Test setup targets:
pip install .[full,test]
Now, you are ready to run some tests. For a quick check, do the
following in the lale
directory:
export PYTHONPATH=`pwd`
python -m unittest test.test.TestLogisticRegression
The output should look like:
Ran 20 tests in 105.201s OK
To run the full test suite, do the following in the lale
directory:
make run_tests
For the full functionality of Lale, you will need a Python 3.6+ environment, as well as g++, graphviz, make, and swig. You can use Lale on Linux, Windows 10, or Mac OS X. Depending on your operating system, you can skip ahead to the appropriate section below.
First, you should enable the Windows Subsystem for Linux (WSL):
- Start/search -> Settings -> Update&Security -> For developers -> activate "Developer Mode"
- Start/search -> Turn Windows features on or off -> WSL -> restart
- Internet Explorer -> https://aka.ms/wslstore -> Ubuntu -> get
- Start/search -> Ubuntu
At this point, you can continue with the instructions in section On Ubuntu Linux.
Start by making sure your Ubuntu installation is up-to-date and check the version. In a command shell, type:
sudo apt update
sudo apt upgrade
lsb_release -a
This should output something like "Description: Ubuntu 16.04.4 LTS".
Also, make sure you have g++, make, graphviz, and swig installed. Otherwise, you can install them:
sudo apt install g++
sudo apt install graphviz
sudo apt install make
sudo apt install swig
Next, set up a Python virtual environment with Python 3.6.
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6
sudo apt install python3.6-dev
sudo apt install virtualenv
virtualenv -p /usr/bin/python3.6 ~/python3.6venv
source ~/python3.6venv/bin/activate
At this point, you can continue with the Lale Installation instructions at the top of this file.
Assuming you already have a Python 3.6+ virtual environment, you will need to install swig using brew before you can install Lale.
If you encounter any issues in installing SMAC:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Then
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
If you want to develop Lale itself, we recommend you create a fork with a feature branch. This is the typical workflow for open-source projects on github. In addition, we expect contributors to submit a "Developer's Certificate of Origin" by signing the following form: DCO1.1.txt. Below is a visualization of the workflow.
Italics in the visualization indicate parts you have to substitute: user (your user name), email (your email associated with github), feature (the name of the feature branch you are working on), and message (a description of your commit).