MCPcopy Index your code
hub / github.com/hyperopt/hyperopt / wait

Method wait

hyperopt/ipy.py:174–198  ·  view source on GitHub ↗
(self, verbose=False, verbose_print_interval=1.0)

Source from the content-addressed store, hash-verified

172 return self.argmin
173
174 def wait(self, verbose=False, verbose_print_interval=1.0):
175 last_print_time = 0
176 while True:
177 self.refresh()
178 if verbose and last_print_time + verbose_print_interval < time():
179 print(
180 "fmin: %4i/%4i/%4i/%4i %f"
181 % (
182 self.count_by_state_unsynced(JOB_STATE_NEW),
183 self.count_by_state_unsynced(JOB_STATE_RUNNING),
184 self.count_by_state_unsynced(JOB_STATE_DONE),
185 self.count_by_state_unsynced(JOB_STATE_ERROR),
186 min(
187 [float("inf")] + [l for l in self.losses() if l is not None]
188 ),
189 )
190 )
191 last_print_time = time()
192 if self.count_by_state_unsynced(JOB_STATE_NEW):
193 sleep(1e-1)
194 continue
195 if self.count_by_state_unsynced(JOB_STATE_RUNNING):
196 sleep(1e-1)
197 continue
198 break
199
200 def __getstate__(self):
201 rval = dict(self.__dict__)

Callers 3

fminMethod · 0.95
main_worker_helperFunction · 0.80
__exit__Method · 0.80

Calls 3

refreshMethod · 0.95
lossesMethod · 0.80

Tested by 1

__exit__Method · 0.64