anchor.diff:  
   
   == Running UPF on Theta
  -
  -Step 1. Checkout Supervisor repo
  -----
  -$ git clone https://github.com/ECP-CANDLE/Supervisor.git
  +This tutorial, we will execute mnist example rewritten for CANDLE. The source code is available on https://github.com/ECP-CANDLE/Candle/tree/library/examples/mnist[CANDLE github repo].
  +
  +Step 1. Create directory and checkout Supervisor & Candle repos
  +[source,bash]
  +----
  +$ mkdir candle_tutorial
  +$ cd candle_tutorial
  +$ git clone -b master https://github.com/ECP-CANDLE/Supervisor.git
  +$ git clone -b library https://github.com/ECP-CANDLE/Candle.git
   ----
   
   Step 2. Move to upf workflow directory
  
positive.code: = CANDLE Library User Guide
  
  The CANDLE library provides a wrapper class and utility functions, which enable users run their own deep learning code in high performance computers that CANDLE supports. With the current version of CANDLE library, users should be able to run hyperparameter optimization (mlrMBO workflow) or parallel excution (upf workflow). Due to the design of both workflows, users are required to implement certain methods (will be explained in section 1) and modify several config files (section 2). This user guide will provide an overview of structure and explanation of parameters or varaiables as needed.
  
  = How to write CANDLE compliant deep learning code
  
  == Minimum requirements
  The CANDLE requires two methods, `initialize_parameters()` and `run()`.
  
  === Initialize_parameters Method
  In `initialize_parameters` method, we will construct a class and build a parameter set, which will be used inside your deep learning code (run method). We provides some common parameters such as `batch_size`, `epochs`, etc. In addition to that, you can construct your own parameters (see Aurgument Specification section below). Finally, the `initialize_parameters` should return a python dictionary, in this doc, will be called `gParameters` (global parameters).
  
  === Run Method
  You can place your deep learning code in `run(Dict)` method. You can use parameter varaiable like `gParameters['batch_size']`.
  
  We have an https://github.com/ECP-CANDLE/Candle/blob/library/examples/mnist/mnist_mlp_candle.py[example], that converted a simple MNIST neural net `mnist_mlp.py` provided by https://github.com/keras-team/keras/blob/master/examples/mnist_mlp.py[Keras Team] into CANDLE compliant form. In this example, you will see how the `initialize_parameters` method is implemented and how the actual NN code was transplanted in `run` method.
  
  Finally, the `run()` returns history. This can be omitted for upf workflow, but required for HPO workflow.
  
  [source,python]
  ----
  def initialize_parameters():
      mnist_common = common.MNIST(common.file_path,
          'default_model.txt',
          'keras',
          prog='mnist_mlp',
          desc='MNIST example'
      )  // <1>
  
      # Initialize parameters
      gParameters = default_utils.initialize_parameters(mnist_common)
      ..
  
      return gParameters   // <2>
  
  def run(gParameters): // <3>
      ##########################################
      # Your DL start here. See mnist_mlp.py   #
      ##########################################
  
negative.code: you will need to set `BENCHMARK_DIR` to point the directory that your script locates, and
  `MODEL_PYTHON_SCRIPT` to name the script you want to run
  ----
  BENCHMARK_DIR=/home/hsyoo/candle_tutorial/Candle/examples/mnist <1>
  MODEL_PYTHON_SCRIPT=mnist_mlp_candle <2>
  ----
  <1> This location should reflect your environment
  <2> Note this requires filename without extension (such as .py)
  
  Step 4. Set execution plan. Check `test/upf-1.txt` for parameter configuration and modify as needed.
  This file contains multiple number of JSON documents. Each JSON document will contain the command line parameters.
  