Ejemplo n.º 1
0
    def test_get_next_pending_job(self):
        job1_id = dataset_eval._create_job(self.conn,
                                           self.test_dataset_id,
                                           True,
                                           dataset_eval.EVAL_LOCAL,
                                           c_value=[1, 2, 3],
                                           gamma_value=[4, 5, 6],
                                           preprocessing_values=["basic"],
                                           filter_type=None)
        job1 = dataset_eval.get_job(job1_id)

        job2_id = dataset_eval._create_job(self.conn,
                                           self.test_dataset_id,
                                           True,
                                           dataset_eval.EVAL_LOCAL,
                                           c_value=[1, 2, 3],
                                           gamma_value=[4, 5, 6],
                                           preprocessing_values=["basic"],
                                           filter_type=None)
        job2 = dataset_eval.get_job(job2_id)

        next_pending = dataset_eval.get_next_pending_job()

        self.assertEqual(job1, next_pending)
        dataset_eval.set_job_status(
            job_id=job1_id,
            status=dataset_eval.STATUS_FAILED,
        )
        next_pending = dataset_eval.get_next_pending_job()
        self.assertEqual(job2, next_pending)
    def test_set_job_status(self):
        job_id = dataset_eval._create_job(self.conn, self.test_dataset_id, True, dataset_eval.EVAL_LOCAL)
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_PENDING)

        dataset_eval.set_job_status(
            job_id=job_id,
            status=dataset_eval.STATUS_FAILED,
        )
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_FAILED)
    def test_set_job_status(self):
        job_id = dataset_eval._create_job(self.conn, self.test_dataset_id)
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_PENDING)

        dataset_eval.set_job_status(
            job_id=job_id,
            status=dataset_eval.STATUS_FAILED,
        )
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_FAILED)
Ejemplo n.º 4
0
    def test_set_job_status(self):
        job_id = dataset_eval._create_job(self.conn, self.test_dataset_id, True, dataset_eval.EVAL_LOCAL,
                                          c_value=[1, 2, 3], gamma_value=[4, 5, 6], preprocessing_values=["basic"],
                                          filter_type=None)
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_PENDING)

        dataset_eval.set_job_status(
            job_id=job_id,
            status=dataset_eval.STATUS_FAILED,
        )
        job = dataset_eval.get_job(job_id)
        self.assertEqual(job["status"], dataset_eval.STATUS_FAILED)
    def test_get_next_pending_job(self):
        job1_id = dataset_eval._create_job(self.conn, self.test_dataset_id)
        job1 = dataset_eval.get_job(job1_id)

        job2_id = dataset_eval._create_job(self.conn, self.test_dataset_id)
        job2 = dataset_eval.get_job(job2_id)

        next_pending = dataset_eval.get_next_pending_job()
        self.assertEqual(job1, next_pending)
        dataset_eval.set_job_status(
            job_id=job1_id,
            status=dataset_eval.STATUS_FAILED,
        )
        next_pending = dataset_eval.get_next_pending_job()
        self.assertEqual(job2, next_pending)