Beispiel #1
0
        def setUpClass(cls):
            cls.templates_folder = os.environ['MODEL_TEMPLATES']
            cls.template_folder = os.path.join(cls.templates_folder, domain_name, problem_name, model_name)
            skip_non_instantiated_template_if_its_allowed(cls.template_folder, problem_name, model_name)
            cls.template_file = os.path.join(cls.template_folder, 'template.yaml')
            cls.ann_file = ann_file
            cls.img_root = img_root
            cls.dependencies = get_dependencies(cls.template_file)
            cls.total_epochs = 1

            download_snapshot_if_not_yet(cls.template_file, cls.template_folder)

            run_through_shell(
                f'cd {cls.template_folder};'
                f'pip install -r requirements.txt;'
            )
        def setUpClass(cls):
            cls.templates_folder = os.environ['MODEL_TEMPLATES']
            cls.template_folder = os.path.join(cls.templates_folder,
                                               domain_name, problem_name,
                                               model_name)
            skip_non_instantiated_template_if_its_allowed(
                cls.template_folder, problem_name, model_name)
            cls.template_file = os.path.join(cls.template_folder,
                                             'template.yaml')
            cls.ann_file = ann_file
            cls.img_root = img_root
            cls.dependencies = get_dependencies(cls.template_file)
            cls.total_epochs = 1

            download_snapshot_if_not_yet(cls.template_file,
                                         cls.template_folder)

            run_through_shell(f'cd {cls.template_folder};')

            coco_dir = os.path.abspath(
                f'{os.path.dirname(__file__)}/../../../../data/coco')
            download_and_extract_coco_val2017(coco_dir)