Example #1
0
 def from_dict(cls, d):
     nm = super().from_dict(d)
     prev_param = d["strategy_params"]["prev_param"]
     if prev_param is not None:
         nm.prev_param = [
             unjsonify_dict(prev_param[0]),
             DataSet.from_dict(prev_param[1]),
         ]
     return nm
Example #2
0
 def from_dict(cls, d):
     domain = Domain.from_dict(d["domain"])
     experiment_params = d.get("experiment_params", {})
     exp = cls(domain=domain, **experiment_params)
     exp._data = DataSet.from_dict(d["data"])
     for e in d["extras"]:
         if type(e) == dict:
             exp.extras.append(unjsonify_dict(e))
         elif type(e) == list:
             exp.extras.append(np.array(e))
         else:
             exp.extras.append(e)
     return exp