.. _getting_started_label: ==================================== Getting Started with Reproducible-ML ==================================== We recommend to setup Miniconda_ or Conda_ to create a virtual environment. .. _Miniconda: https://conda.io/miniconda.html .. _Conda: https://conda.io/docs/ Creating a virtual environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1. Create a virtual environment from the environment file, which can be found in the home directory of this project: .. code-block:: console conda env create -f environment reproducible 2. Activate the new environment: .. code-block:: console source activate reproducible Set up MongoDB ^^^^^^^^^^^^^^ We recommend MongoDB since it is a noSQL database and it allows easy storage of arbitrary JSON documents. Sacred :cite:`Sacred` itself recommends the MongoDB. Start by downloading the binaries for Ubuntu 16.04: .. code-block:: console mkdir mongodb cd mongodb wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-4.0.3.tgz Add path to your .bashrc file: .. code-block:: console export PATH="$HOME/mongodb/bin:$PATH" Then you can start the MongoDB daemon: .. code-block:: console mkdir reproducible-db mongodb --dbpath reproducible-db --fork --logpath reproducible-db More information concerning the MongoDB can be found here_. .. _here: https://docs.mongodb.com/ How to use Sacredboard ^^^^^^^^^^^^^^^^^^^^^^ Having set up the Mongo database, you can track your experiments in the database by just adding -m sacred: .. code-block:: console python -m sacred This will create a new entry in the Sacred MongoDB. If you access a server via ssh make sure you open a port. e.g.: .. code-block:: console ssh username@someserver.ch -L 10000:localhost:10000 Then you can open the Sacredboard via: .. code-block:: console sacredboard -m sacred --port 10000 --no-browser Workflow ^^^^^^^^ Since all is ste up now, you can try to run some experiments and tests. From the root folder :file:`/reproducible-ml` you can run experiments as modules: .. code-block:: console python -m exps.brain.gan Preferably you run your Code on a GPU. If you want to run it on CPUs change the tensorflow-gpu package to the TensorFlow package in your environment. There are several tests you can run: .. code-block:: console python -m unittest datasets.brain.test_serialize Or run all tests at once: .. code-block:: console python -m unittest