MCPcopy
hub / github.com/hyperopt/hyperopt / memo_from_config

Method memo_from_config

hyperopt/base.py:866–876  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

864 self.cmd = ("domain_attachment", "FMinIter_Domain")
865
866 def memo_from_config(self, config):
867 memo = {}
868 for node in pyll.dfs(self.expr):
869 if node.name == "hyperopt_param":
870 label = node.arg["label"].obj
871 # -- hack because it's not really garbagecollected
872 # this does have the desired effect of crashing the
873 # function if rec_eval actually needs a value that
874 # the the optimization algorithm thought to be unnecessary
875 memo[node] = config.get(label, pyll.base.GarbageCollected)
876 return memo
877
878 def evaluate(self, config, ctrl, attach_attachments=True):
879 memo = self.memo_from_config(config)

Callers 2

evaluateMethod · 0.95
evaluate_asyncMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected