Skip to content

Commit a2353af

Browse files
authored
fix: 🚨 Fix linter issues (#986)
1 parent 7430e6c commit a2353af

File tree

5 files changed

+39
-38
lines changed

5 files changed

+39
-38
lines changed

keras_tuner/engine/oracle.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ def __init__(self, oracle, verbose=1):
133133

134134
def get_state(self):
135135
return {
136-
"search_start": self.search_start.isoformat()
137-
if self.search_start is not None
138-
else self.search_start,
136+
"search_start": (
137+
self.search_start.isoformat()
138+
if self.search_start is not None
139+
else self.search_start
140+
),
139141
"trial_start": {
140142
key: value.isoformat()
141143
for key, value in self.trial_start.items()

keras_tuner/protos/v3/keras_tuner_pb2.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
(_message.Message,),
7777
{
7878
"DESCRIPTOR": _VALUE,
79-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
79+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
8080
# @@protoc_insertion_point(class_scope:keras_tuner.Value)
8181
},
8282
)
@@ -87,7 +87,7 @@
8787
(_message.Message,),
8888
{
8989
"DESCRIPTOR": _FLOAT,
90-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
90+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
9191
# @@protoc_insertion_point(class_scope:keras_tuner.Float)
9292
},
9393
)
@@ -98,7 +98,7 @@
9898
(_message.Message,),
9999
{
100100
"DESCRIPTOR": _INT,
101-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
101+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
102102
# @@protoc_insertion_point(class_scope:keras_tuner.Int)
103103
},
104104
)
@@ -109,7 +109,7 @@
109109
(_message.Message,),
110110
{
111111
"DESCRIPTOR": _CHOICE,
112-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
112+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
113113
# @@protoc_insertion_point(class_scope:keras_tuner.Choice)
114114
},
115115
)
@@ -120,7 +120,7 @@
120120
(_message.Message,),
121121
{
122122
"DESCRIPTOR": _BOOLEAN,
123-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
123+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
124124
# @@protoc_insertion_point(class_scope:keras_tuner.Boolean)
125125
},
126126
)
@@ -131,7 +131,7 @@
131131
(_message.Message,),
132132
{
133133
"DESCRIPTOR": _FIXED,
134-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
134+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
135135
# @@protoc_insertion_point(class_scope:keras_tuner.Fixed)
136136
},
137137
)
@@ -146,7 +146,7 @@
146146
(_message.Message,),
147147
{
148148
"DESCRIPTOR": _HYPERPARAMETERS_SPACE,
149-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
149+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
150150
# @@protoc_insertion_point(class_scope:keras_tuner.HyperParameters.Space)
151151
},
152152
),
@@ -159,17 +159,17 @@
159159
(_message.Message,),
160160
{
161161
"DESCRIPTOR": _HYPERPARAMETERS_VALUES_VALUESENTRY,
162-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
162+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
163163
# @@protoc_insertion_point(class_scope:keras_tuner.HyperParameters.Values.ValuesEntry)
164164
},
165165
),
166166
"DESCRIPTOR": _HYPERPARAMETERS_VALUES,
167-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
167+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
168168
# @@protoc_insertion_point(class_scope:keras_tuner.HyperParameters.Values)
169169
},
170170
),
171171
"DESCRIPTOR": _HYPERPARAMETERS,
172-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
172+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
173173
# @@protoc_insertion_point(class_scope:keras_tuner.HyperParameters)
174174
},
175175
)
@@ -183,7 +183,7 @@
183183
(_message.Message,),
184184
{
185185
"DESCRIPTOR": _METRICOBSERVATION,
186-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
186+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
187187
# @@protoc_insertion_point(class_scope:keras_tuner.MetricObservation)
188188
},
189189
)
@@ -194,7 +194,7 @@
194194
(_message.Message,),
195195
{
196196
"DESCRIPTOR": _METRICHISTORY,
197-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
197+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
198198
# @@protoc_insertion_point(class_scope:keras_tuner.MetricHistory)
199199
},
200200
)
@@ -209,12 +209,12 @@
209209
(_message.Message,),
210210
{
211211
"DESCRIPTOR": _METRICSTRACKER_METRICSENTRY,
212-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
212+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
213213
# @@protoc_insertion_point(class_scope:keras_tuner.MetricsTracker.MetricsEntry)
214214
},
215215
),
216216
"DESCRIPTOR": _METRICSTRACKER,
217-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
217+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
218218
# @@protoc_insertion_point(class_scope:keras_tuner.MetricsTracker)
219219
},
220220
)
@@ -230,12 +230,12 @@
230230
(_message.Message,),
231231
{
232232
"DESCRIPTOR": _TRIAL_SCORE,
233-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
233+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
234234
# @@protoc_insertion_point(class_scope:keras_tuner.Trial.Score)
235235
},
236236
),
237237
"DESCRIPTOR": _TRIAL,
238-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
238+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
239239
# @@protoc_insertion_point(class_scope:keras_tuner.Trial)
240240
},
241241
)
@@ -251,12 +251,12 @@
251251
(_message.Message,),
252252
{
253253
"DESCRIPTOR": _CONDITION_PARENT,
254-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
254+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
255255
# @@protoc_insertion_point(class_scope:keras_tuner.Condition.Parent)
256256
},
257257
),
258258
"DESCRIPTOR": _CONDITION,
259-
"__module__": "keras_tuner.protos.keras_tuner_pb2"
259+
"__module__": "keras_tuner.protos.keras_tuner_pb2",
260260
# @@protoc_insertion_point(class_scope:keras_tuner.Condition)
261261
},
262262
)

keras_tuner/protos/v3/service_pb2.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
(_message.Message,),
6262
{
6363
"DESCRIPTOR": _GETSPACEREQUEST,
64-
"__module__": "keras_tuner.protos.service_pb2"
64+
"__module__": "keras_tuner.protos.service_pb2",
6565
# @@protoc_insertion_point(class_scope:keras_tuner.GetSpaceRequest)
6666
},
6767
)
@@ -72,7 +72,7 @@
7272
(_message.Message,),
7373
{
7474
"DESCRIPTOR": _GETSPACERESPONSE,
75-
"__module__": "keras_tuner.protos.service_pb2"
75+
"__module__": "keras_tuner.protos.service_pb2",
7676
# @@protoc_insertion_point(class_scope:keras_tuner.GetSpaceResponse)
7777
},
7878
)
@@ -83,7 +83,7 @@
8383
(_message.Message,),
8484
{
8585
"DESCRIPTOR": _UPDATESPACEREQUEST,
86-
"__module__": "keras_tuner.protos.service_pb2"
86+
"__module__": "keras_tuner.protos.service_pb2",
8787
# @@protoc_insertion_point(class_scope:keras_tuner.UpdateSpaceRequest)
8888
},
8989
)
@@ -94,7 +94,7 @@
9494
(_message.Message,),
9595
{
9696
"DESCRIPTOR": _UPDATESPACERESPONSE,
97-
"__module__": "keras_tuner.protos.service_pb2"
97+
"__module__": "keras_tuner.protos.service_pb2",
9898
# @@protoc_insertion_point(class_scope:keras_tuner.UpdateSpaceResponse)
9999
},
100100
)
@@ -105,7 +105,7 @@
105105
(_message.Message,),
106106
{
107107
"DESCRIPTOR": _CREATETRIALREQUEST,
108-
"__module__": "keras_tuner.protos.service_pb2"
108+
"__module__": "keras_tuner.protos.service_pb2",
109109
# @@protoc_insertion_point(class_scope:keras_tuner.CreateTrialRequest)
110110
},
111111
)
@@ -116,7 +116,7 @@
116116
(_message.Message,),
117117
{
118118
"DESCRIPTOR": _CREATETRIALRESPONSE,
119-
"__module__": "keras_tuner.protos.service_pb2"
119+
"__module__": "keras_tuner.protos.service_pb2",
120120
# @@protoc_insertion_point(class_scope:keras_tuner.CreateTrialResponse)
121121
},
122122
)
@@ -131,12 +131,12 @@
131131
(_message.Message,),
132132
{
133133
"DESCRIPTOR": _UPDATETRIALREQUEST_METRICSENTRY,
134-
"__module__": "keras_tuner.protos.service_pb2"
134+
"__module__": "keras_tuner.protos.service_pb2",
135135
# @@protoc_insertion_point(class_scope:keras_tuner.UpdateTrialRequest.MetricsEntry)
136136
},
137137
),
138138
"DESCRIPTOR": _UPDATETRIALREQUEST,
139-
"__module__": "keras_tuner.protos.service_pb2"
139+
"__module__": "keras_tuner.protos.service_pb2",
140140
# @@protoc_insertion_point(class_scope:keras_tuner.UpdateTrialRequest)
141141
},
142142
)
@@ -148,7 +148,7 @@
148148
(_message.Message,),
149149
{
150150
"DESCRIPTOR": _UPDATETRIALRESPONSE,
151-
"__module__": "keras_tuner.protos.service_pb2"
151+
"__module__": "keras_tuner.protos.service_pb2",
152152
# @@protoc_insertion_point(class_scope:keras_tuner.UpdateTrialResponse)
153153
},
154154
)
@@ -159,7 +159,7 @@
159159
(_message.Message,),
160160
{
161161
"DESCRIPTOR": _ENDTRIALREQUEST,
162-
"__module__": "keras_tuner.protos.service_pb2"
162+
"__module__": "keras_tuner.protos.service_pb2",
163163
# @@protoc_insertion_point(class_scope:keras_tuner.EndTrialRequest)
164164
},
165165
)
@@ -170,7 +170,7 @@
170170
(_message.Message,),
171171
{
172172
"DESCRIPTOR": _ENDTRIALRESPONSE,
173-
"__module__": "keras_tuner.protos.service_pb2"
173+
"__module__": "keras_tuner.protos.service_pb2",
174174
# @@protoc_insertion_point(class_scope:keras_tuner.EndTrialResponse)
175175
},
176176
)
@@ -181,7 +181,7 @@
181181
(_message.Message,),
182182
{
183183
"DESCRIPTOR": _GETBESTTRIALSREQUEST,
184-
"__module__": "keras_tuner.protos.service_pb2"
184+
"__module__": "keras_tuner.protos.service_pb2",
185185
# @@protoc_insertion_point(class_scope:keras_tuner.GetBestTrialsRequest)
186186
},
187187
)
@@ -192,7 +192,7 @@
192192
(_message.Message,),
193193
{
194194
"DESCRIPTOR": _GETBESTTRIALSRESPONSE,
195-
"__module__": "keras_tuner.protos.service_pb2"
195+
"__module__": "keras_tuner.protos.service_pb2",
196196
# @@protoc_insertion_point(class_scope:keras_tuner.GetBestTrialsResponse)
197197
},
198198
)
@@ -203,7 +203,7 @@
203203
(_message.Message,),
204204
{
205205
"DESCRIPTOR": _GETTRIALREQUEST,
206-
"__module__": "keras_tuner.protos.service_pb2"
206+
"__module__": "keras_tuner.protos.service_pb2",
207207
# @@protoc_insertion_point(class_scope:keras_tuner.GetTrialRequest)
208208
},
209209
)
@@ -214,7 +214,7 @@
214214
(_message.Message,),
215215
{
216216
"DESCRIPTOR": _GETTRIALRESPONSE,
217-
"__module__": "keras_tuner.protos.service_pb2"
217+
"__module__": "keras_tuner.protos.service_pb2",
218218
# @@protoc_insertion_point(class_scope:keras_tuner.GetTrialResponse)
219219
},
220220
)

keras_tuner/tuners/gridsearch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ def _get_next_combination(self, values):
281281
combination), it returns None. The return values only include the
282282
active ones.
283283
"""
284-
285284
hps = self.get_space()
286285
all_values = {}
287286
for hp in hps.space:

keras_tuner/tuners/hyperband.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def __init__(
403403
allow_new_entries=True,
404404
max_retries_per_trial=0,
405405
max_consecutive_failed_trials=3,
406-
**kwargs
406+
**kwargs,
407407
):
408408
oracle = HyperbandOracle(
409409
objective,

0 commit comments

Comments
 (0)