Source code for hypernets.examples.smoke_testing

# -*- coding:utf-8 -*-
"""

"""
import numpy as np

from hypernets.core.ops import Choice, Bool, Identity
from hypernets.core.search_space import HyperSpace, Int, Real
from hypernets.searchers.evolution_searcher import EvolutionSearcher
from hypernets.searchers.mcts_searcher import MCTSSearcher
from hypernets.searchers.random_searcher import RandomSearcher


[docs]def get_space(): space = HyperSpace() with space.as_default(): p1 = Int(1, 100) p2 = Choice(['a', 'b', 'c']) p3 = Bool() p4 = Real(0.0, 1.0) id1 = Identity(p1=p1) id2 = Identity(p2=p2)(id1) id3 = Identity(p3=p3)(id2) id4 = Identity(p4=p4)(id3) return space
if __name__ == '__main__': run_search()