Beispiel #1
0
def load_training_settings(training_name):
    file_path = get_training_settings_file_path(training_name)
    logging.info(f'Loading annotator settings from "{file_path}"...')
    text = file_path.read_text()
    dict_ = yaml_utils.load(text)
    return Settings.create_from_dict(dict_)
Beispiel #2
0
 def _load_settings(self):
     path = classifier_utils.get_settings_file_path(self.clip_type)
     logging.info('Loading classifier settings from "{}"...'.format(path))
     text = path.read_text()
     d = yaml_utils.load(text)
     return Settings.create_from_dict(d)
Beispiel #3
0
 def create_settings_from_dict(self, d):
     settings = Settings.create_from_dict(d)
     return Settings(self.defaults, settings)
Beispiel #4
0
 def _load_settings(self):
     path = classifier_utils.get_settings_file_path(self._clip_type)
     text = path.read_text()
     d = yaml_utils.load(text)
     return Settings.create_from_dict(d)
Beispiel #5
0
 def test_create_from_dict(self):
     contents = os_utils.read_file(_SETTINGS_FILE_PATH)
     d = yaml_utils.load(contents)
     settings = Settings.create_from_dict(d)
     self._check_settings(settings)
Beispiel #6
0
 def _load_settings(self):
     path = classifier_utils.get_settings_file_path(self.clip_type)
     logging.info('Loading classifier settings from "{}"...'.format(path))
     text = path.read_text()
     d = yaml_utils.load(text)
     return Settings.create_from_dict(d)