Passed
Push — master ( b478a2...16a37b )
by Simon
01:57 queued 10s
created

hyperactive.verbosity.info.Info.no_meta_data()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
class Info:
7
    def init_p_bar(self, _cand_, _core_):
8
        pass
9
10
    def update_p_bar(self, n, _cand_):
11
        pass
12
13
    def close_p_bar(self):
14
        pass
15
16
    def warm_start(self):
17
        pass
18
19
    def scatter_start(self):
20
        pass
21
22
    def random_start(self):
23
        pass
24
25
    def load_meta_data(self):
26
        pass
27
28
    def no_meta_data(self, model_func):
29
        pass
30
31
    def load_samples(self, para):
32
        pass
33
34
35
class InfoLVL0(Info):
36
    def __init__(self):
37
        pass
38
39
    def print_start_point(self, _cand_):
40
        return _cand_._get_warm_start()
41
42
43
class InfoLVL1(InfoLVL0):
44
    def __init__(self):
45
        pass
46
47
    def print_start_point(self, _cand_):
48
        start_point = _cand_._get_warm_start()
49
        print("best para =", start_point)
50
        print("score     =", _cand_.score_best, "\n")
51
52
        return start_point
53
54
    def warm_start(self):
55
        print("Set warm start")
56
57
    def scatter_start(self):
58
        print("Set scatter init")
59
60
    def random_start(self):
61
        print("Set random start position")
62
63
    def load_meta_data(self):
64
        print("Loading meta data successful", end="\r")
65
66
    def no_meta_data(self, model_func):
67
        print("No meta data found for", model_func.__name__, "function")
68
69
    def load_samples(self, para):
70
        print("Loading meta data successful:", len(para), "samples found")
71