MCPcopy
hub / github.com/hyperopt/hyperopt / get_obj

Function get_obj

hyperopt/utils.py:104–118  ·  view source on GitHub ↗

XXX: document me

(f, argfile=None, argstr=None, args=(), kwargs=None)

Source from the content-addressed store, hash-verified

102
103
104def get_obj(f, argfile=None, argstr=None, args=(), kwargs=None):
105 """
106 XXX: document me
107 """
108 if kwargs is None:
109 kwargs = {}
110 if argfile is not None:
111 argstr = open(argfile).read()
112 if argstr is not None:
113 argd = pickler.loads(argstr)
114 else:
115 argd = {}
116 args = args + argd.get("args", ())
117 kwargs.update(argd.get("kwargs", {}))
118 return json_call(f, args=args, kwargs=kwargs)
119
120
121def pmin_sampled(mean, var, n_samples=1000, rng=None):

Callers

nothing calls this directly

Calls 3

json_callFunction · 0.85
getMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected