Skip to content

Commit 1d0e6ff

Browse files
0.28.2
1 parent 33d6465 commit 1d0e6ff

6 files changed

Lines changed: 195 additions & 7 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,8 @@ notebooks/model_architecture3.png
338338
notebooks/model_architecture4
339339
notebooks/model_architecture4.png
340340
notebooks/spot_00_TEST_experiment.pickle
341+
notebooks/00_spotPython_tests.aux
342+
notebooks/00_spotPython_tests.pdf
343+
notebooks/00_spotPython_tests.tex
344+
notebooks/00_spotPython_tests_files/libs/bootstrap/bootstrap-973236bd072d72a04ee9cd82dcc9cb29.min.css
345+
notebooks/00_spotPython_tests_files/libs/quarto-html/quarto-syntax-highlighting-549806ee2085284f45b00abea8c6df48.css

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotpython"
10-
version = "0.28.1"
10+
version = "0.28.2"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotpython/hyperdict/light_hyper_dict.json

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,186 @@
11
{
2+
"ManyToManyLSTMRegressor": {
3+
"lstm_units": {
4+
"type": "int",
5+
"default": 3,
6+
"transform": "transform_power_2_int",
7+
"lower": 8,
8+
"upper": 10
9+
},
10+
"fc_units": {
11+
"type": "int",
12+
"default": 8,
13+
"transform": "transform_power_2_int",
14+
"lower": 3,
15+
"upper": 10
16+
},
17+
"epochs": {
18+
"type": "int",
19+
"default": 10,
20+
"transform": "transform_power_2_int",
21+
"lower": 7,
22+
"upper": 12
23+
},
24+
"batch_size": {
25+
"type": "int",
26+
"default": 10,
27+
"transform": "transform_power_2_int",
28+
"lower": 4,
29+
"upper": 12
30+
},
31+
"act_fn": {
32+
"levels": [
33+
"Sigmoid",
34+
"Tanh",
35+
"ReLU",
36+
"LeakyReLU",
37+
"ELU",
38+
"Swish"
39+
],
40+
"type": "factor",
41+
"default": "ReLU",
42+
"transform": "None",
43+
"class_name": "spotpython.torch.activation",
44+
"core_model_parameter_type": "instance()",
45+
"lower": 0,
46+
"upper": 5
47+
},
48+
"optimizer": {
49+
"levels": [
50+
"Adadelta",
51+
"Adagrad",
52+
"Adam",
53+
"AdamW",
54+
"SparseAdam",
55+
"Adamax",
56+
"ASGD",
57+
"NAdam",
58+
"RAdam",
59+
"RMSprop",
60+
"Rprop",
61+
"SGD"
62+
],
63+
"type": "factor",
64+
"default": "SGD",
65+
"transform": "None",
66+
"class_name": "torch.optim",
67+
"core_model_parameter_type": "str",
68+
"lower": 0,
69+
"upper": 11
70+
},
71+
"dropout_prob": {
72+
"type": "float",
73+
"default": 0.01,
74+
"transform": "None",
75+
"lower": 0.0,
76+
"upper": 0.25
77+
},
78+
"lr_mult": {
79+
"type": "float",
80+
"default": 1.0,
81+
"transform": "None",
82+
"lower": 0.1,
83+
"upper": 10.0
84+
},
85+
"patience": {
86+
"type": "int",
87+
"default": 2,
88+
"transform": "transform_power_2_int",
89+
"lower": 2,
90+
"upper": 6
91+
}
92+
},
93+
"ManyToManyGRURegressor": {
94+
"gru_units": {
95+
"type": "int",
96+
"default": 3,
97+
"transform": "transform_power_2_int",
98+
"lower": 8,
99+
"upper": 10
100+
},
101+
"fc_units": {
102+
"type": "int",
103+
"default": 8,
104+
"transform": "transform_power_2_int",
105+
"lower": 3,
106+
"upper": 10
107+
},
108+
"epochs": {
109+
"type": "int",
110+
"default": 10,
111+
"transform": "transform_power_2_int",
112+
"lower": 7,
113+
"upper": 12
114+
},
115+
"batch_size": {
116+
"type": "int",
117+
"default": 10,
118+
"transform": "transform_power_2_int",
119+
"lower": 4,
120+
"upper": 12
121+
},
122+
"act_fn": {
123+
"levels": [
124+
"Sigmoid",
125+
"Tanh",
126+
"ReLU",
127+
"LeakyReLU",
128+
"ELU",
129+
"Swish"
130+
],
131+
"type": "factor",
132+
"default": "ReLU",
133+
"transform": "None",
134+
"class_name": "spotpython.torch.activation",
135+
"core_model_parameter_type": "instance()",
136+
"lower": 0,
137+
"upper": 5
138+
},
139+
"optimizer": {
140+
"levels": [
141+
"Adadelta",
142+
"Adagrad",
143+
"Adam",
144+
"AdamW",
145+
"SparseAdam",
146+
"Adamax",
147+
"ASGD",
148+
"NAdam",
149+
"RAdam",
150+
"RMSprop",
151+
"Rprop",
152+
"SGD"
153+
],
154+
"type": "factor",
155+
"default": "SGD",
156+
"transform": "None",
157+
"class_name": "torch.optim",
158+
"core_model_parameter_type": "str",
159+
"lower": 0,
160+
"upper": 11
161+
},
162+
"dropout_prob": {
163+
"type": "float",
164+
"default": 0.01,
165+
"transform": "None",
166+
"lower": 0.0,
167+
"upper": 0.25
168+
},
169+
"lr_mult": {
170+
"type": "float",
171+
"default": 1.0,
172+
"transform": "None",
173+
"lower": 0.1,
174+
"upper": 10.0
175+
},
176+
"patience": {
177+
"type": "int",
178+
"default": 2,
179+
"transform": "transform_power_2_int",
180+
"lower": 2,
181+
"upper": 6
182+
}
183+
},
2184
"ManyToManyRNNRegressor": {
3185
"rnn_units": {
4186
"type": "int",

src/spotpython/light/regression/nn_many_to_many_gru_regressor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
self.output_layer = nn.Linear(fc_units, output_size)
6060
self.activation_fct = activation_fct
6161

62-
def forward(self, x, lengths):
62+
def forward(self, x, lengths) -> torch.Tensor:
6363
"""Forward pass of the ManyToManyGRU model.
6464
6565
Args:

src/spotpython/light/regression/nn_many_to_many_lstm_regressor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
self.output_layer = nn.Linear(fc_units, output_size)
6060
self.activation_fct = activation_fct
6161

62-
def forward(self, x, lengths):
62+
def forward(self, x, lengths) -> torch.Tensor:
6363
"""Forward pass of the ManyToManyLSTM model.
6464
6565
Args:

src/spotpython/spot/spot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,8 @@ def run(self, X_start: np.ndarray = None) -> Spot:
791791
8. Show progress if needed
792792
793793
Args:
794-
X_start (numpy.ndarray, optional): initial design. Defaults to None.
795-
The initial design must have shape (n, k), where n is the number of points and k is the number of dimensions.
794+
X_start (numpy.ndarray, optional):
795+
initial design. The initial design must have shape (n, k), where n is the number of points and k is the number of dimensions. Defaults to None.
796796
797797
Returns:
798798
Spot: The `Spot` instance configured and updated based on the optimization process.
@@ -906,8 +906,9 @@ def initialize_design(self, X_start=None) -> None:
906906
Therefore, the design size is `init_size` + `X_start.shape[0]`.
907907
908908
Args:
909-
X_start (numpy.ndarray, optional): initial design. Defaults to None.
910-
Must be of shape (n, k), where n is the number of points and k is the number of dimensions.
909+
X_start (numpy.ndarray, optional):
910+
initial design. Must be of shape (n, k), where n is the number
911+
of points and k is the number of dimensions. Defaults to None.
911912
912913
Attributes:
913914
self.X (numpy.ndarray): initial design

0 commit comments

Comments
 (0)