Skip to content

Commit

Permalink
Merge pull request #94 from c-bata/benchmark-cmaes
Browse files Browse the repository at this point in the history
Run benchmark of CMA-ES
  • Loading branch information
c-bata authored Mar 19, 2020
2 parents 98fada9 + 8ff83ed commit da19d8b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark-himmelblau.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
paths:
- '.github/workflows/benchmark-himmelblau.yml'
- '_benchmarks/run_himmelblau.sh'
- 'cmaes/**.go'
jobs:
benchmarks-himmelblau:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/benchmark-rosenbrock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
paths:
- '.github/workflows/benchmark-rosenbrock.yml'
- '_benchmarks/run_rosenbrock.sh'
- 'cmaes/**.go'
jobs:
benchmarks-rosenbrock:
Expand Down
8 changes: 3 additions & 5 deletions _benchmarks/run_himmelblau.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ set -e

KUROBAKO=${KUROBAKO:-kurobako}

# go build -o ./cma_solver ./_benchmarks/cma_solver/main.go
go build -o ./cma_solver ./_benchmarks/cma_solver/main.go
go build -o ./tpe_solver ./_benchmarks/tpe_solver/main.go
go build -o ./himmelblau_problem ./_benchmarks/himmelblau_problem/main.go

RANDOM_SOLVER=$($KUROBAKO solver random)

# kurobako-go don't still support relative sampler.
# CMA_SOLVER=$($KUROBAKO solver command ./cma_solver)

CMA_SOLVER=$($KUROBAKO solver command ./cma_solver)
TPE_SOLVER=$($KUROBAKO solver command ./tpe_solver)
OPTUNA_SOLVER=$($KUROBAKO solver command python ./_benchmarks/optuna_solver/cmaes.py)
PROBLEM=$($KUROBAKO problem command ./himmelblau_problem)

$KUROBAKO studies \
--solvers $RANDOM_SOLVER $TPE_SOLVER $OPTUNA_SOLVER \
--solvers $RANDOM_SOLVER $TPE_SOLVER $CMA_SOLVER $OPTUNA_SOLVER \
--problems $PROBLEM \
--repeats 8 --budget 300 \
| $KUROBAKO run --parallelism 1 > $1
8 changes: 3 additions & 5 deletions _benchmarks/run_rosenbrock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ set -e

KUROBAKO=${KUROBAKO:-kurobako}

# go build -o ./cma_solver ./_benchmarks/cma_solver/main.go
go build -o ./cma_solver ./_benchmarks/cma_solver/main.go
go build -o ./tpe_solver ./_benchmarks/tpe_solver/main.go
go build -o ./rosenbrock_problem ./_benchmarks/rosenbrock_problem/main.go

RANDOM_SOLVER=$($KUROBAKO solver random)

# kurobako-go don't still support relative sampler.
# CMA_SOLVER=$($KUROBAKO solver command ./cma_solver)

CMA_SOLVER=$($KUROBAKO solver command ./cma_solver)
TPE_SOLVER=$($KUROBAKO solver command ./tpe_solver)
OPTUNA_SOLVER=$($KUROBAKO solver command python ./_benchmarks/optuna_solver/cmaes.py)
PROBLEM=$($KUROBAKO problem command ./rosenbrock_problem)

$KUROBAKO studies \
--solvers $RANDOM_SOLVER $TPE_SOLVER $OPTUNA_SOLVER \
--solvers $RANDOM_SOLVER $TPE_SOLVER $CMA_SOLVER $OPTUNA_SOLVER \
--problems $PROBLEM \
--repeats 8 --budget 300 \
| $KUROBAKO run --parallelism 1 > $1
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.13
require (
github.com/google/uuid v1.1.1
github.com/jinzhu/gorm v1.9.10
github.com/sile/kurobako-go v0.0.0-20200119054321-481b79c0068b // indirect
github.com/sile/kurobako-go v0.0.0-20200319013303-95985b35db7b
github.com/spf13/cobra v0.0.5
gonum.org/v1/gonum v0.7.0
)
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/c-bata/goptuna v0.1.1-0.20191228081229-689071991c89/go.mod h1:oFGcPHSv7ChMD/L1PxWtHuXKvgpHfcPpTZEDiznEexg=
github.com/c-bata/goptuna v0.3.0/go.mod h1:Qs8/vk1a6Tqk3roNAJ9Kj+7LrI4z8jw46oP0BVjx63U=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand Down Expand Up @@ -108,6 +109,8 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sile/kurobako-go v0.0.0-20200119054321-481b79c0068b h1:THPYfrsrexiXomXSg05JFAClgq7O90rMMyf3H/4VBMk=
github.com/sile/kurobako-go v0.0.0-20200119054321-481b79c0068b/go.mod h1:FjX2M2IjP/e37osvrssWtrtvYvpfHqHp6nVdpLisEO8=
github.com/sile/kurobako-go v0.0.0-20200319013303-95985b35db7b h1:kRb0ibNEYI3P0EOsxoKAQxY/d0yOnZ/j5X+TeJiy4WU=
github.com/sile/kurobako-go v0.0.0-20200319013303-95985b35db7b/go.mod h1:YjyC+QV80YEfpPZI6l1U3zeOdBrI6i+l6jo+0NosQzw=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
Expand Down

0 comments on commit da19d8b

Please sign in to comment.