4f9fc9b8698c84f7a7281a2692657a2f1c1368d6,mlflow/utils/search_utils.py,SearchUtils,_parse_order_by_string,#Any#Any#,363
Before Change
def _parse_order_by_string(cls, order_by):
token_value = cls._validate_order_by_and_generate_token(order_by)
is_ascending = True
if token_value.lower().endswith(" desc"):
is_ascending = False
token_value = token_value[0:-len(" desc")]
elif token_value.lower().endswith(" asc"):
token_value = token_value[0:-len(" asc")]
return token_value, is_ascending
@classmethod
def parse_order_by_for_search_runs(cls, order_by):
After Change
token_value = cls._validate_order_by_and_generate_token(order_by)
is_ascending = True
tokens = token_value.split()
if len(tokens) > 2:
raise MlflowException(f"Invalid order_by clause "{order_by}". Could not be parsed.",
error_code=INVALID_PARAMETER_VALUE)
elif len(tokens) == 2:
order_token = tokens[1].lower()
if order_token not in cls.VALID_ORDER_BY_TAGS:
raise MlflowException(f"Invalid ordering key in order_by clause "{order_by}".",
error_code=INVALID_PARAMETER_VALUE)
is_ascending = (order_token == cls.ASC_OPERATOR)
token_value = tokens[0]
return token_value, is_ascending
@classmethod
def parse_order_by_for_search_runs(cls, order_by):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: mlflow/mlflow
Commit Name: 4f9fc9b8698c84f7a7281a2692657a2f1c1368d6
Time: 2020-06-30
Author: 52183359+ankitmathur-db@users.noreply.github.com
File Name: mlflow/utils/search_utils.py
Class Name: SearchUtils
Method Name: _parse_order_by_string
Project Name: aws/sagemaker-python-sdk
Commit Name: d2d1cdf874afa7b8aa7f5bf8d764f7b1bd2f9f10
Time: 2020-05-04
Author: chuyangdeng@gmail.com
File Name: src/sagemaker/utils.py
Class Name:
Method Name: _create_or_update_code_dir
Project Name: IDSIA/sacred
Commit Name: 8530a78631fa7e3b5f66cd164e409d5762739beb
Time: 2015-02-19
Author: qwlouse@gmail.com
File Name: sacred/dependencies.py
Class Name: FileDependency
Method Name: create