-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
86 changed files
with
8,703 additions
and
1,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*.pyc | ||
*.sw[op] | ||
*.pkl | ||
**/jobs | ||
**/output | ||
**/best_job_and_result.txt | ||
**/trace.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /bin/bash | ||
|
||
# This is a simple script to cleanup the intermediate files in | ||
# spearmint experiment directories | ||
|
||
GARBAGE="trace.csv output/* jobs/* expt-grid.pkl expt-grid.pkl.lock \ | ||
*.pyc *GP*Chooser*.pkl *Chooser*hyperparameters.txt best_job_and_result.txt" | ||
|
||
[[ -n "$1" ]] || { echo "Usage: cleanup.sh <experiment_dir>"; exit 0 ; } | ||
if [ -d $1 ] | ||
then | ||
cd $1 | ||
rm -f $GARBAGE | ||
else | ||
echo "$1 is not a valid directory" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
protoc --python_out=./spearmint spearmint.proto |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
SOURCE="${BASH_SOURCE[0]}" | ||
|
||
# resolve $SOURCE until the file is no longer a symlink | ||
while [ -h "$SOURCE" ]; do | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
|
||
# if $SOURCE was a relative symlink, we need to resolve it | ||
# relative to the path where the symlink file was located | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
CMD="python ${DIR}/../spearmint/main.py $@" | ||
PYTHONPATH=${DIR}/.. ${CMD} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## De Jong's function (2D) | ||
|
||
A simple benchmark for optimization, De Jong's function is continuous, convex, and unimodal with a single parameter. | ||
|
||
f(x,y) = x^2 + y^2 | ||
|
||
### Global optimium | ||
|
||
X = 0 | ||
Y = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language: PYTHON | ||
name: "dejong" | ||
|
||
variable { | ||
name: "X" | ||
type: FLOAT | ||
size: 1 | ||
min: -5.12 | ||
max: 5.12 | ||
} | ||
|
||
variable { | ||
name: "Y" | ||
type: FLOAT | ||
size: 1 | ||
min: -5.12 | ||
max: 5.12 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def dejong(x,y): | ||
return x*x + y*y | ||
|
||
# Write a function like this called 'main' | ||
def main(job_id, params): | ||
x = params['X'][0] | ||
y = params['Y'][0] | ||
res = dejong(x, y) | ||
print "De Jong's function in 2D:" | ||
print "\tf(%.2f, %0.2f) = %f" % (x, y, res) | ||
return dejong(x, y) | ||
|
||
|
||
if __name__ == "__main__": | ||
main(23, {'X': [1.2], 'Y': [4.3]}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: PYTHON | ||
name: "faker" | ||
|
||
variable { | ||
name: "X" | ||
type: FLOAT | ||
size: 2 | ||
min: 0 | ||
max: 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import sys | ||
import math | ||
import time | ||
import random | ||
|
||
|
||
# A fake task that sleeps and returns a random result so we can test and debug | ||
# spearmint without wasting CPU and energy computing real functions. | ||
|
||
def main(job_id, params): | ||
time.sleep(random.random() * 2) | ||
return random.random() * 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Rosenbrock's Valley | ||
|
||
A slightly more difficult benchmark for optimization, Rosenbrock's valley (a.k.k the banana function) has a global | ||
optimimum lying inside a long, narrow parabolic valley with a flat floor. | ||
|
||
f(x,y) = 100(y - x^2)^2 + (1 - x)^2 | ||
|
||
Global minimum: | ||
|
||
X = 0 | ||
Y = 0 | ||
|
Oops, something went wrong.