def parse_hyperparameter_string(param_string):
    params = OrderedDict()
    lines = param_string.split('\n')
    for line in lines:
        if (not line.strip()):
            continue
        elif (line.count('|') == 1):
            pass
        elif (line.strip()[0] == '{'):
            continue
        elif (line.count('[') == 2):
            continue
        elif ((line.count('{') == 1) and (line.count('}') == 1)):
            od = _parse_categorical(line)
        else:
            raise ValueError(('Cannot parse the following line %s' % line))
        params[od['name']] = od['values']
    return params
def parse_hyperparameter_string(param_string):
    params = OrderedDict()
    lines = param_string.split('\n')
    for line in lines:
        if (not line.strip()):
            continue
        elif (line.count('|') == 1):
            pass
        elif (line.strip()[0] == '{'):
            continue
        elif (line.count('[') == 2):
            continue
        elif ((line.count('{') == 1) and (line.count('}') == 1)):
            od = _parse_categorical(line)
        else:
            raise ValueError(('Cannot parse the following line %s' % line))
        params[od['name']] = od['values']
    return params