Exemplo n.º 1
0
    def test_check_status_running_iter(self):
        g_conf = GlobalConfig()
        g_conf.param.NAME = 'experiment_running_iter'
        # TODO: this merge is weird.
        g_conf.merge_with_yaml(
            'configs/monitor_test/experiment_running_iter.yaml')
        # JUST A TRICK TO CONTAIN THE CURRENT LIMITATIONS
        g_conf.set_type_of_process('train')

        coil_logger.add_message(
            'Loading',
            {"Keys_Division": [1, 123, 1, 1, 2, 12, 3, 12, 31, 2, 1, 1]})

        coil_logger.add_message('Loading', {
            "Models_loaded": ' VUALA ',
            "Checkpoint": "988765"
        })

        for i in range(0, 10):

            coil_logger.add_message('Reading', {
                "Iteration": i,
                "ReadKeys": [1, 123, 5, 1, 34, 1, 23]
            })
            coil_logger.add_message('Model', {
                "Iteration": i,
                "Output": ["output"]
            })

        # TODO: Check how the alias will work.
        status = monitorer.get_status('monitor_test',
                                      'experiment_running_iter',
                                      g_conf.param.PROCESS_NAME)

        self.assertEqual(status[0], "Iterating")
Exemplo n.º 2
0
    def test_global_logger_train(self):
        # TODO: THERE WILL BE A NAME GENERATOR
        g_conf.param.NAME = 'experiment_1'
        g_conf.merge_with_yaml('configs/eccv/experiment_1.yaml')
        # JUST A TRICK TO CONTAIN THE CURRENT LIMITATIONS
        g_conf.set_type_of_process('train')

        coil_logger.add_message(
            'Loading',
            {"Keys_Division": [1, 123, 1, 1, 2, 12, 3, 12, 31, 2, 1, 1]})

        coil_logger.add_message('Loading', {
            "Models_loaded": ' VUALA ',
            "Checkpoint": "988765"
        })

        for i in range(0, 10):

            coil_logger.add_message('Reading', {
                "Iteration": i,
                "ReadKeys": [1, 123, 5, 1, 34, 1, 23]
            })
            coil_logger.add_message('Network', {
                "Iteration": i,
                "Output-": ["output"]
            })
Exemplo n.º 3
0
    def test_check_status_finished(self):
        g_conf = GlobalConfig()
        # TODO: THe error ? How do nicely merge with the other parts ??
        g_conf.param.NAME = 'experiment_finished'
        # TODO: this merge is weird.
        g_conf.merge_with_yaml('configs/monitor_test/experiment_finished.yaml')

        g_conf.param.MISC.NUMBER_OF_ITERATIONS = 20
        # JUST A TRICK TO CONTAIN THE CURRENT LIMITATIONS
        g_conf.set_type_of_process('train')

        # We set the number of iterations as

        coil_logger.add_message(
            'Loading',
            {"Keys_Division": [1, 123, 1, 1, 2, 12, 3, 12, 31, 2, 1, 1]})

        coil_logger.add_message('Loading', {
            "Models_loaded": ' VUALA ',
            "Checkpoint": "988765"
        })

        for i in range(0, 21):

            coil_logger.add_message('Reading', {
                "Iteration": i,
                "ReadKeys": [1, 123, 5, 1, 34, 1, 23]
            })
            coil_logger.add_message('Model', {
                "Iteration": i,
                "Output": ["output"]
            })

        # TODO: Check how the alias will work.

        status = monitorer.get_status('monitor_test', 'experiment_finished',
                                      g_conf.param.PROCESS_NAME)

        self.assertEqual(status[0], "Finished")