def load_configs(config_file):
    """
    Load the training configurations
    :param config_file:
    :return: a dict with the training arguments
    """
    arg_dict = {}
    files = config_file.get('data')
    if isinstance(files['max_features'], int):
        arg_dict['max_features'] = files['max_features']
    else:
        raise ValueError('max_features must be an int')

    if isinstance(files['max_labels'], int):
        arg_dict['max_labels'] = files['max_labels']
    else:
        raise ValueError('max_labels must be an int')

    parameters = config_file.get('parameters')
    if isinstance(parameters['model_type'], str):
        arg_dict['model_type'] = parameters['model_type']
    else:
        raise ValueError('model_type must be a str')
    if isinstance(parameters['epochs'], int):
        arg_dict['epochs'] = parameters['epochs']
    else:
        raise ValueError('epochs must be an integer')
    if isinstance(parameters['num_topics'], list):
        arg_dict['num_topics'] = parameters['num_topics']
    else:
        raise ValueError('num_topics must be list of integers')
    if isinstance(parameters['runs'], int):
        arg_dict['runs'] = parameters['runs']
    else:
        raise ValueError('runs must be and integer')

    bert_model = config_file.get('bert_model')
    if isinstance(bert_model['training'], str):
        arg_dict['training'] = bert_model['training']
    else:
        raise ValueError('training must be an str')

    if isinstance(bert_model['testing'], str):
        arg_dict['testing'] = bert_model['testing']
    else:
        raise ValueError('testing must be an str')

    input = config_file.get('input')
    if isinstance(input['dataset_path'], str):
        arg_dict['dataset_path'] = input['dataset_path']
    else:
        raise ValueError('dataset_path must be an str')

    output = config_file.get('output')
    if isinstance(output['save_path'], str):
        arg_dict['save_path'] = output['save_path']
    else:
        raise ValueError('save_path must be an str')
    if isinstance(output['model_output'], str):
        arg_dict['model_output'] = output['model_output']
    else:
        raise ValueError('model_output must be an str')
    return arg_dict