Пример #1
0
 def test_failed(self):
     p = hp.HyperbandProposer(self.pc)
     try:
         p.failed(Job("none", {"tid": 1}))
         self.assertTrue(False)
     except NotImplementedError:
         pass
 def test_hp_min(self):
     self.pc['target'] = 'max'
     p = hp.HyperbandProposer(self.pc)
     for j in range(6):
         tid = []
         for i in range(100):
             v = p.get()
             if v:
                 tid.append(v['tid'])
         for i in tid:
             job = Job("none", {"tid": i})
             p.update(0.1, job)
    def test_hp(self):
        p = hp.HyperbandProposer(self.pc)
        for j in range(3):
            tid = []
            for i in range(100):
                v = p.get()
                if v:
                    tid.append(v['tid'])
            for i in tid:
                job = Job("none", {"tid": i})
                p.update(0.1, job)

        self.assertRaises(NotImplementedError, p.save, '')
        self.assertRaises(NotImplementedError, p.reload, '')