<commit_before>from collections import namedtuple

from config.paths import DIR_NUSCENES

Resolution = namedtuple('Resolution', ['height', 'width'])

DATASET_ROOT = {'nuscenes': DIR_NUSCENES}
TRAIN_RESOLUTION = {'nuscenes': Resolution(height=448, width=800)}


def _get_dataset_param(dataset, dict):
    if dataset in dict:
        return dict

    raise ValueError(f'Unknown dataset: {dataset}')


def get_data_dir(dataset):
    return _get_dataset_param(dataset, DATASET_ROOT)


def get_train_resolution(dataset):
    return _get_dataset_param(dataset, TRAIN_RESOLUTION)
<commit_msg>renamed dict in config.py<commit_after>from collections import namedtuple

from config.paths import DIR_NUSCENES

Resolution = namedtuple('Resolution', ['height', 'width'])

DATASET_ROOT = {'nuscenes': DIR_NUSCENES}
TRAIN_RESOLUTION = {'nuscenes': Resolution(height=448, width=800)}


def _get_dataset_param(dataset, all_params):
    if dataset in all_params:
        return all_params[dataset]

    raise ValueError(f'Unknown dataset: {dataset}')


def get_data_dir(dataset):
    return _get_dataset_param(dataset, DATASET_ROOT)


def get_train_resolution(dataset):
    return _get_dataset_param(dataset, TRAIN_RESOLUTION)

{'fraction_non_alphanumeric': 0.09842845326716294, 'fraction_numerical': 0.009925558312655087, 'mean_word_length': 6.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5860475', 'n_tokens_mistral': 416, 'n_tokens_neox': 395, 'n_words': 87}