<commit_before># P1B1 mlrMBO Workflow #

The P1B1 mlrMBO workflow evaluates a modified version of the P1B1 benchmark
autoencoder using hyperparameters provided by a mlrMBO instance. The P1B1
code (p1b1_baseline.py) has been modified to expose a functional interface.
The neural net remains the same. Currently, mlrMBO minimizes the validation
loss. EMEWS R queues are used to:
1. pass the hyperparameters to evaluate from the running mlrMBO algorithm to the swift script to launch a p1b1 run, and to
2. pass the validation loss from a p1b1 run back to the running mlrBMO algorithm via the swift script.

The workflow ultimately produces a `final_res.Rds` serialized R object that
contains the final best parameter values and various metadata about the
parameter evaluations.

 ## Requirements ##

* Python 2.7
* P1B1 Autoencoder - <EMAIL>:ECP-CANDLE/Benchmarks.git. Clone and switch
to the supervisor branch.
* P1B1 Data - `http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P1B1/P1B1.train.csv` and `http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P1B1/P1B1.test.csv`. Download these into some suitable directory (e.g. `workflows/p1b1_mlrMBO/data`)
* Keras - https://keras.io. The supervisor branch of P1B1 should work with
both version 1 and 2.
* Swift-t with Python 2.7 and R enabled - http://swift-lang.org/Swift-T/
* Required R packages:
  * All required R packages can be installed from within R with:
  ```
  install.packages(c("<package name 1>", "<package name 2", ...)
  ```
  * mlrMBO and dependencies : (https://mlr-org.github.io/mlrMBO/).
  * parallelMap : (https://cran.r-project.org/web/packages/parallelMap/index.html)
  * DiceKriging and dependencies : (https://cran.r-project.org/web/packages/DiceKriging/index.html)
  * rgenoud : (https://cran.r-project.org/web/packages/rgenoud/index.html)
* Compiled EQ/R, instructions in `ext/EQ-R/eqr/COMPILING.txt`

## Workflow ##

The workflow project consists of the following directories.

```
p1b1_mlrMBO/
  data/
  ext/EQ-R
  etc/
  R/
  python/
  swift/
```

 * `data` - model input etc. data, such as the hyperopt space description.
 * `etc` - additional code used by EMEWS
 * `ext/EQ-R` - swift-t EMEWS Queues R implementation (EQ/R) extension
 * `R/mlrMBO.R` - the mlrMBO R code
 * `R/mlrMBO_utils.R` - utility functions used by the mlrMBO R code
 * `python/p1b1_runner.py` - python code called by the swift script to run p1b1.
 * `python/test/test.py` - python code for testing the p1b1_runner.
 * `swift/workflow.swift` - the swift workflow scrip
 * `swift/workflow.sh` - generic launch script to set the appropriate enviroment variables etc. and then launch the swift workflow script
 * `swift/cooley_workflow.sh` - launch script customized for the Cooley supercomputer


 ## Running the Workflow ##
<commit_msg>More installation notes<commit_after># P1B1 mlrMBO Workflow #

The P1B1 mlrMBO workflow evaluates a modified version of the P1B1 benchmark
autoencoder using hyperparameters provided by a mlrMBO instance. The P1B1
code (p1b1_baseline.py) has been modified to expose a functional interface.
The neural net remains the same. Currently, mlrMBO minimizes the validation
loss. EMEWS R queues are used to:
1. pass the hyperparameters to evaluate from the running mlrMBO algorithm to the swift script to launch a p1b1 run, and to
2. pass the validation loss from a p1b1 run back to the running mlrBMO algorithm via the swift script.

The workflow ultimately produces a `final_res.Rds` serialized R object that
contains the final best parameter values and various metadata about the
parameter evaluations.

 ## Requirements ##

* Python 2.7
* P1B1 Autoencoder - <EMAIL>:ECP-CANDLE/Benchmarks.git. Clone and switch
to the supervisor branch.
* P1B1 Data - `http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P1B1/P1B1.train.csv` and `http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P1B1/P1B1.test.csv`. Download these into some suitable directory (e.g. `workflows/p1b1_mlrMBO/data`)
* Keras - https://keras.io. The supervisor branch of P1B1 should work with
both version 1 and 2.
* Swift-t with Python 2.7 and R enabled - http://swift-lang.org/Swift-T/
* Required R packages:
  * All required R packages can be installed from within R with:
  ```
  install.packages(c("<package name 1>", "<package name 2", ...),
                   dependencies=TRUE)
  ```
  * Or with shell command `R install-mlrMBO.R`
  On ALCF: Use an HTTP mirror!
  Not one of the initially listed HTTPS mirrors, they are not accessible.
  * mlrMBO and dependencies : (https://mlr-org.github.io/mlrMBO/).
  https://cran.r-project.org/src/contrib/mlrMBO_1.0.0.tar.gz
  * parallelMap : (https://cran.r-project.org/web/packages/parallelMap/index.html)
  * DiceKriging and dependencies : (https://cran.r-project.org/web/packages/DiceKriging/index.html)
  * rgenoud : (https://cran.r-project.org/web/packages/rgenoud/index.html)
* Compiled EQ/R, instructions in `ext/EQ-R/eqr/COMPILING.txt`



## Workflow ##

The workflow project consists of the following directories.

```
p1b1_mlrMBO/
  data/
  ext/EQ-R
  etc/
  R/
  python/
  swift/
```

 * `data` - model input etc. data, such as the hyperopt space description.
 * `etc` - additional code used by EMEWS
 * `ext/EQ-R` - swift-t EMEWS Queues R implementation (EQ/R) extension
 * `R/mlrMBO.R` - the mlrMBO R code
 * `R/mlrMBO_utils.R` - utility functions used by the mlrMBO R code
 * `python/p1b1_runner.py` - python code called by the swift script to run p1b1.
 * `python/test/test.py` - python code for testing the p1b1_runner.
 * `swift/workflow.swift` - the swift workflow scrip
 * `swift/workflow.sh` - generic launch script to set the appropriate enviroment variables etc. and then launch the swift workflow script
 * `swift/cooley_workflow.sh` - launch script customized for the Cooley supercomputer


 ## Running the Workflow ##

{'fraction_non_alphanumeric': 0.10195339273474983, 'fraction_numerical': 0.01696367374914325, 'mean_word_length': 3.816006600660066, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7198273', 'n_tokens_mistral': 2008, 'n_tokens_neox': 1924, 'n_words': 650}