MCPcopy
hub / github.com/hyperopt/hyperopt / new_trial_docs

Method new_trial_docs

hyperopt/base.py:454–471  ·  view source on GitHub ↗
(self, tids, specs, results, miscs)

Source from the content-addressed store, hash-verified

452 return rval
453
454 def new_trial_docs(self, tids, specs, results, miscs):
455 assert len(tids) == len(specs) == len(results) == len(miscs)
456 trials_docs = []
457 for tid, spec, result, misc in zip(tids, specs, results, miscs):
458 doc = {
459 "state": JOB_STATE_NEW,
460 "tid": tid,
461 "spec": spec,
462 "result": result,
463 "misc": misc,
464 "exp_key": self._exp_key,
465 "owner": None,
466 "version": 0,
467 "book_time": None,
468 "refresh_time": None,
469 }
470 trials_docs.append(doc)
471 return trials_docs
472
473 def source_trial_docs(self, tids, specs, results, miscs, sources):
474 assert len(tids) == len(specs) == len(results) == len(miscs) == len(sources)

Callers 5

suggestFunction · 0.80
suggestFunction · 0.80
__call__Method · 0.80
suggestFunction · 0.80
test_insert_syncMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_insert_syncMethod · 0.64