def __post_init__(self):
    if (self.task_name is not None):
        self.task_name = self.task_name.lower()
        if (self.task_name not in task_to_keys.keys()):
            raise ValueError(('Unknown task, you should pick one in ' + ','.join(task_to_keys.keys())))
    elif ((self.train_file is None) or (self.validation_file is None)):
        raise ValueError('Need either a GLUE task or a training/validation file.')
    else:
        train_extension = self.train_file.split('.')[(- 1)]
        assert (train_extension in ['csv', 'json']), '`train_file` should be a csv or a json file.'
        validation_extension = self.validation_file.split('.')[(- 1)]
        assert (validation_extension == train_extension), '`validation_file` should have the same extension (csv or json) as `train_file`.'
def __post_init__(self):
    if (self.task_name is not None):
        self.task_name = self.task_name.lower()
        if (self.task_name not in task_to_keys.keys()):
            raise ValueError(('Unknown task, you should pick one in ' + ','.join(task_to_keys.keys())))
    elif ((self.train_file is None) or (self.validation_file is None)):
        raise ValueError('Need either a GLUE task or a training/validation file.')
    else:
        train_extension = self.train_file.split('.')[(- 1)]
        assert (train_extension in ['csv', 'json']), '`train_file` should be a csv or a json file.'
        validation_extension = self.validation_file.split('.')[(- 1)]
        assert (validation_extension == train_extension), '`validation_file` should have the same extension (csv or json) as `train_file`.'