def params(self): return Run.from_dict(loads(self.data or '{}')).params
def test_serialization(self): r = Run(num_agents=100, ticks=10) d = r.to_dict() r2 = Run.from_dict(d) self.assertEqual(r.ticks, r2.ticks) self.assertEqual(r.params, r2.params)
def get_run(self): return Run.from_dict(loads(self.data or '{}'))