Gym for predictive models
Installation
Installation With Docker
- Getting Started
- Running Model Gym In A Container Using DockerHub Image
- Verification If Model Gym Works Correctly
Note: This installation guide was written for python3
Create directory where you want to clone this rep and switch to it. Install virtualenv and start it.
pip3 install virtualenv
python3 -m venv venv
source venv/bin/activate
To deactivate simply type deactivate
Install required python3 packages by running following commands.
- modelgym
pip3 install git+https://github.com/yandexdataschool/modelgym.git
- jupyter, yaml, hyperopt, skopt, pandas and networkx
pip3 install jupyter pyyaml hyperopt scikit-optimize pandas networkx==1.11
- LightGBM. Note: Modelgym works with LightGBM version 2.0.2
git clone --recursive https://github.com/Microsoft/LightGBM cd LightGBM git checkout 80c641cd17727bebea613af3cbfe3b985dbd3313 mkdir build && cd build && cmake -DUSE_MPI=ON .. make -j cd ../python-package/ && python3 setup.py install cd ../../ rm -rf LightGBM
- XGBoost. Note: Modelgym works with XGBoost version 0.6.
git clone --recursive https://github.com/dmlc/xgboost cd xgboost git checkout 14fba01b5ac42506741e702d3fde68344a82f9f0 make -j cd python-package; python3 setup.py install cd ../../ rm -rf xgboost
Clone repository.
git clone https://github.com/yandexdataschool/modelgym.git
Move to example and start jupyter-notebook.
cd modelgym/example
jupyter-notebook
Open model_search.ipynb
and run all cells. If there are no errors, everything is allright!
To run model gym inside Docker container you need to have installed Docker (also for Mac or Windows you can install instead Kitematic).
Download this repo. All of the needed files are in the modelgym
directory.
$ git clone https://github.com/yandexdataschool/modelgym.git
$ cd ./modelgym
To run docker container with official image anaderi/modelgym:latest
from DockerHub repo for using model gym via jupyter you simply run the command:
$ docker run -ti --rm -v `pwd`:/src -p 7777:8888 \
anaderi/modelgym:latest bash --login -ci 'jupyter notebook'
At first time it downloads container.
Firstly you should check inside container that /src
is not empty.
To connect to jupyter host in browser check your Docker public ip:
$ docker-machine ip default
(usually it's 192.168.99.100)
When you start a notebook server with token authentication enabled (default), a token is generated to use for authentication. This token is logged to the terminal, so that you can copy it.
Go to http://<your published ip>:7777/
and paste auth token.
Open /example/model_search.ipynb
and try to run all cells. If there are no errors, everything is allright.