Beispiel #1
0
 def params(self):
     return Run.from_dict(loads(self.data or '{}')).params
Beispiel #2
0
 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)
Beispiel #3
0
 def get_run(self):
     return Run.from_dict(loads(self.data or '{}'))
Beispiel #4
0
 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)