def _convert_value(value):
    try:
        return ast.literal_eval(value)
    except (ValueError, SyntaxError):
        # use as string if nothing else worked
        return value
Parse string as python literal if possible and fallback to string.
dataset/ETHPy150Open IDSIA/sacred/sacred/arg_parser.py/_convert_value