MCPcopy
hub / github.com/hyperopt/hyperopt / ok_trial

Function ok_trial

hyperopt/tests/test_base.py:25–43  ·  view source on GitHub ↗
(tid, *args, **kwargs)

Source from the content-addressed store, hash-verified

23
24
25def ok_trial(tid, *args, **kwargs):
26 return dict(
27 tid=tid,
28 result={"status": "algo, ok"},
29 spec={"a": 1, "foo": (args, kwargs)},
30 misc={
31 "tid": tid,
32 "cmd": ("some cmd",),
33 "idxs": {"z": [tid]},
34 "vals": {"z": [1]},
35 },
36 extra="extra", # -- more stuff here is ok
37 owner=None,
38 state=JOB_STATE_NEW,
39 version=0,
40 book_time=None,
41 refresh_time=None,
42 exp_key=None,
43 )
44
45
46def create_fake_trial(tid, loss=None, status=STATUS_OK, state=JOB_STATE_DONE):

Callers 2

test_validMethod · 0.85
test_insert_syncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected