MCPcopy
hub / github.com/hyperopt/hyperopt / insert_trial_doc

Method insert_trial_doc

hyperopt/base.py:432–441  ·  view source on GitHub ↗

insert trial after error checking Does not refresh. Call self.refresh() for the trial to appear in self.specs, self.results, etc.

(self, doc)

Source from the content-addressed store, hash-verified

430 return rval
431
432 def insert_trial_doc(self, doc):
433 """insert trial after error checking
434
435 Does not refresh. Call self.refresh() for the trial to appear in
436 self.specs, self.results, etc.
437 """
438 doc = self.assert_valid_trial(SONify(doc))
439 return self._insert_trial_docs([doc])[0]
440 # refreshing could be done fast in this base implementation, but with
441 # a real DB the steps should be separated.
442
443 def insert_trial_docs(self, docs):
444 """trials - something like is returned by self.new_trial_docs()"""

Callers 3

test_insert_syncMethod · 0.80
test_best_trialMethod · 0.80

Calls 3

assert_valid_trialMethod · 0.95
_insert_trial_docsMethod · 0.95
SONifyFunction · 0.85

Tested by 2

test_insert_syncMethod · 0.64
test_best_trialMethod · 0.64