Skip to content

Instantly share code, notes, and snippets.

@se4u
Created January 3, 2019 20:43
Show Gist options
  • Save se4u/1cc2bfc37cf4a99bae79d902f6baca06 to your computer and use it in GitHub Desktop.
Save se4u/1cc2bfc37cf4a99bae79d902f6baca06 to your computer and use it in GitHub Desktop.
Nevergrad Experiment and Benchmark Script
#!/bin/bash
FNC=${1-2clsp}
PFX=${2-echo}
2clsp () {
$PFX rsync -av ../nevergrad clsp:~/project/
}
2mac () {
$PFX rsync -av clsp:~/project/nevergrad/nevergrad/optimization/recorded_recommendations.csv nevergrad/optimization/
}
bench () {
r=(10 )
b=(spsa_benchmark )
for i in 0; do
$PFX python -m nevergrad.benchmark ${b[$i]} --repetitions=${r[$i]} --num_workers=48 --seed=12 --plot
done
}
replot () {
# Workflow to concatenate results starting from second line of
# existing csv and then recreating the plots.
for e in noise ; do # illcond compabasedillcond
rm -rf ${e}_plots
tail +2 tmp/$e.csv >> $e.csv #
python -m nevergrad.benchmark.plotting $e.csv
done
}
tests () {
$PFX nosetests nevergrad/optimization/test_optimizerlib.py
}
$FNC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment