Exemple #1
0
 def test_grow_strategy(self):
     self.assertEqual(
         ensemble.GrowStrategy().generate_ensemble_candidates(
             [self.fake_builder_1, self.fake_builder_2]), [
                 ensemble.Candidate([self.fake_builder_1]),
                 ensemble.Candidate([self.fake_builder_2])
             ])
Exemple #2
0
 def test_grow_strategy(self):
   want = [
       ensemble.Candidate(self.fake_builder_1.name, [self.fake_builder_1], []),
       ensemble.Candidate(self.fake_builder_2.name, [self.fake_builder_2], [])
   ]
   got = ensemble.GrowStrategy().generate_ensemble_candidates(
       [self.fake_builder_1, self.fake_builder_2], None)
   self.assertEqual(want, got)
Exemple #3
0
 def test_grow_strategy_with_previous_ensemble_subnetwork_builders(self):
   want = [
       ensemble.Candidate(self.fake_builder_1.name, [self.fake_builder_1],
                          [self.fake_builder_3, self.fake_builder_4]),
       ensemble.Candidate(self.fake_builder_2.name, [self.fake_builder_2],
                          [self.fake_builder_3, self.fake_builder_4])
   ]
   got = ensemble.GrowStrategy().generate_ensemble_candidates(
       [self.fake_builder_1, self.fake_builder_2],
       [self.fake_builder_3, self.fake_builder_4])
   self.assertEqual(want, got)