Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
Conflicts:
	.travis.yml
	README.md
  • Loading branch information
mlindauer committed Aug 18, 2016
2 parents b0ce485 + dc0db63 commit 782de5f
Show file tree
Hide file tree
Showing 52 changed files with 719 additions and 950 deletions.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SMAC3</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
5 changes: 5 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ before_install:
- conda update --yes conda

install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip numpy>=1.6.1 scipy>=0.13.1 six nose matplotlib setuptools Cython
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip numpy>=1.6.1 scipy>=0.13.1 six nose matplotlib setuptools Cython mock
- pip install pep8 python-coveralls
- pip install coverage
- pip install psutil
Expand Down
690 changes: 29 additions & 661 deletions LICENSE

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ A stable release of SMAC (v2) in Java can be found [here](http://www.cs.ubc.ca/l
Status for master branch:

[![Build Status](https://travis-ci.org/automl/SMAC3.svg?branch=master)](https://travis-ci.org/automl/SMAC3)
[![Code Health](https://landscape.io/github/automl/SMAC3/master/landscape.png)](https://landscape.io/github/automl/SMAC3/master)
[![Coverage Status](https://coveralls.io/repos/automl/auto-sklearn/badge.svg?branch=master&service=github)](https://coveralls.io/github/automl/SMAC3?branch=master)

Status for development branch

[![Build Status](https://travis-ci.org/automl/SMAC3.svg?branch=development)](https://travis-ci.org/automl/SMAC3)
[![Code Health](https://landscape.io/github/automl/SMAC3/development/landscape.png)](https://landscape.io/github/automl/SMAC3/development)
[![Coverage Status](https://coveralls.io/repos/automl/SMAC3/badge.svg?branch=development&service=github)](https://coveralls.io/github/automl/SMAC3?branch=development)


#OVERVIEW

SMAC is a tool for algorithm configuration
Expand Down Expand Up @@ -46,18 +43,15 @@ Its [Random Forest](https://bitbucket.org/aadfreiburg/random_forest_run) is writ
# License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
it under the terms of the 3-clause BSD license (please see the LICENSE file).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should have received a copy of the GNU Affero General Public License
You should have received a copy of the 3-clause BSD license
along with this program (see LICENSE file).
If not, see <http://www.gnu.org/licenses/>.
If not, see <https://opensource.org/licenses/BSD-3-Clause>.

# USAGE

Expand Down
14 changes: 14 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 0.1.0

* Moved to github instead of bitbucket
* ADD further unit tests
* CHANGE Stats object instead of static class
* CHANGE requirement of ConfigSpace package to 0.2.0
* FIX intensify runs at least two challengers
* FIX intensify skips incumbent as challenger
* FIX Function TAE runner passes random seed to target function
* FIX parsing of emtpy lines in scenario file

# 0.0.1

* initial release
33 changes: 17 additions & 16 deletions examples/rf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ def rfr(cfg):

# cv folds
kf = KFold(X.shape[0], n_folds=4)

# register function to be optimize
taf = ExecuteTAFunc(rfr)


# build Configuration Space which defines all parameters and their ranges
# to illustrate different parameter types,
# we use continuous, integer and categorical parameters
Expand Down Expand Up @@ -116,27 +113,31 @@ def rfr(cfg):
max_num_nodes = UniformIntegerHyperparameter("max_num_nodes", 100, 100000, default=1000)
cs.add_hyperparameter(max_num_nodes)

# example call of the function
# it returns: Status, Cost, Runtime, Additional Infos
def_value = taf.run(cs.get_default_configuration())[1]
print("Default Value: %.2f" % (def_value))

# SMAC scenario oject
scenario = Scenario({"run_obj": "quality", # we optimize quality (alternative runtime)
"runcount-limit": 400, # at most 200 function evaluations
"cs": cs, # configuration space
"deterministic": "true"
})
stats = Stats(scenario)

# necessary to use stats options related to scenario information
Stats.scenario = scenario
# register function to be optimize
taf = ExecuteTAFunc(rfr, stats=stats)

# example call of the function
# it returns: Status, Cost, Runtime, Additional Infos
def_value = taf.run(cs.get_default_configuration())[1]
print("Default Value: %.2f" % (def_value))

# Optimize
smbo = SMBO(scenario=scenario, rng=np.random.RandomState(42),
tae_runner=taf)
smbo.run(max_iters=999)

Stats.print_stats()
print("Final Incumbent: %s" % (smbo.incumbent))
tae_runner=taf, stats=stats)
try:

smbo.run(max_iters=999)
finally:
smbo.stats.print_stats()
print("Final Incumbent: %s" % (smbo.incumbent))

inc_value = taf.run(smbo.incumbent)[1]
print("Optimized Value: %.2f" % (inc_value))
27 changes: 14 additions & 13 deletions examples/rosenbrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ def rosenbrock_4d(cfg):
logger = logging.getLogger("Optimizer") # Enable to show Debug outputs
logger.parent.level = 20 #info level:20; debug:10

# register function to be optimize
taf = ExecuteTAFunc(rosenbrock_4d)

# build Configuration Space which defines all parameters and their ranges
# to illustrate different parameter types,
# we use continuous, integer and categorical parameters
Expand All @@ -62,26 +59,30 @@ def rosenbrock_4d(cfg):
x4 = UniformIntegerHyperparameter("x4", -5, 5, default=5)
cs.add_hyperparameter(x4)

# example call of the function
# it returns: Status, Cost, Runtime, Additional Infos
def_value = taf.run( cs.get_default_configuration() )[1]
print("Default Value: %.2f" %(def_value))

# SMAC scenario object
scenario = Scenario({"run_obj":"quality", # we optimize quality (alternative runtime)
"runcount-limit": 200, # at most 200 function evaluations
"cs": cs, # configuration space
"deterministic": "true"
})
stats = Stats(scenario)

# necessary to use stats options related to scenario information
Stats.scenario = scenario
# register function to be optimize
taf = ExecuteTAFunc(rosenbrock_4d, stats)

# example call of the function
# it returns: Status, Cost, Runtime, Additional Infos
def_value = taf.run( cs.get_default_configuration() )[1]
print("Default Value: %.2f" %(def_value))

# Optimize
smbo = SMBO(scenario=scenario, tae_runner=taf,
stats=stats,
rng=np.random.RandomState(42))
smbo.run(max_iters=999)

Stats.print_stats()
try:
smbo.run(max_iters=999)
finally:
smbo.stats.print_stats()
print("Final Incumbent: %s" %(smbo.incumbent))

inc_value = taf.run( smbo.incumbent )[1]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ scipy>=0.13.1
six
Cython
pynisher>=0.4.1
ConfigSpace
ConfigSpace>=0.2.0
pyrfr
2 changes: 1 addition & 1 deletion scripts/smac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import inspect
cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0]))
cmd_folder = os.path.realpath(os.path.join(cmd_folder, ".."))
if cmd_folder not in sys.path:
sys.path.append(cmd_folder)
sys.path.insert(0,cmd_folder)

from smac.smac_cli import SMAC

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

setuptools.setup(
name="smac",
version="0.0.1",
version="0.1.0",
author="Marius Lindauer, Matthias Feurer, Katharina Eggensperger, Aaron Klein, Stefan Falkner and Frank Hutter",
author_email="[email protected]",
description=("SMAC3, a python implementation of 'Sequential Model-based "
description=("SMAC3, a Python implementation of 'Sequential Model-based "
"Algorithm Configuration'."),
license="GPLv3",
license="3-clause BSD",
keywords="machine learning algorithm configuration hyperparameter "
"optimization tuning",
url="",
Expand Down
2 changes: 1 addition & 1 deletion smac/epm/base_imputor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

__author__ = "Katharina Eggensperger"
__copyright__ = "Copyright 2015, ML4AAD"
__license__ = "AGPLv3"
__license__ = "3-clause BSD"
__maintainer__ = "Katharina Eggensperger"
__email__ = "[email protected]"
__version__ = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion smac/epm/random_epm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

__author__ = "Katharina Eggensperger"
__copyright__ = "Copyright 2015, ML4AAD"
__license__ = "AGPLv3"
__license__ = "3-clause BSD"
__maintainer__ = "Katharina Eggensperger"
__email__ = "[email protected]"
__version__ = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion smac/epm/rf_with_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

__author__ = "Aaron Klein"
__copyright__ = "Copyright 2015, ML4AAD"
__license__ = "AGPLv3"
__license__ = "3-clause BSD"
__maintainer__ = "Aaron Klein"
__email__ = "[email protected]"
__version__ = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion smac/epm/rfr_imputator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__author__ = "Katharina Eggensperger"
__copyright__ = "Copyright 2015, ML4AAD"
__license__ = "AGPLv3"
__license__ = "3-clause BSD"
__maintainer__ = "Katharina Eggensperger"
__email__ = "[email protected]"
__version__ = "0.0.1"
Expand Down
Empty file.
Loading

0 comments on commit 782de5f

Please sign in to comment.