Skip to content

Commit

Permalink
Add dynamic loading of optimizer (#34)
Browse files Browse the repository at this point in the history
* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.
  • Loading branch information
aramoto99 authored Aug 22, 2022
1 parent 8f6df87 commit 917fd7d
Show file tree
Hide file tree
Showing 54 changed files with 128 additions and 531 deletions.
1 change: 1 addition & 0 deletions aiaccel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from .common import get_module_type_from_class_name
from .common import get_file_random


__all__ = [
alive_master,
alive_optimizer,
Expand Down
11 changes: 6 additions & 5 deletions aiaccel/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Import this as follows:
"""

alive_master = 'master.yml'
alive_optimizer = 'optimizer.yml'
alive_scheduler = 'scheduler.yml'
Expand Down Expand Up @@ -58,11 +59,11 @@
resource_type_local = 'local'
resource_type_abci = 'abci'

search_algorithm_grid = 'grid'
search_algorithm_nelder_mead = 'nelder-mead'
search_algorithm_random = 'random'
search_algorithm_sobol = 'sobol'
search_algorithm_tpe = 'tpe'
search_algorithm_grid = 'aiaccel.optimizer.GridOptimizer'
search_algorithm_nelder_mead = 'aiaccel.optimizer.NelderMeadOptimizer'
search_algorithm_random = 'aiaccel.optimizer.RandomOptimizer'
search_algorithm_sobol = 'aiaccel.optimizer.SobolOptimizer'
search_algorithm_tpe = 'aiaccel.optimizer.TpeOptimizer'


def get_module_type_from_class_name(class_name: str) -> str:
Expand Down
Loading

0 comments on commit 917fd7d

Please sign in to comment.