4f9fc9b8698c84f7a7281a2692657a2f1c1368d6,mlflow/utils/search_utils.py,SearchUtils,_parse_order_by_string,#Any#Any#,363

Before Change


        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

After Change


    def _parse_order_by_string(cls, order_by):
        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):
Italian Trulli
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: tensorflow/tensorflow
Commit Name: 3d03ae2086b232cb6803507ae4defd997c256ec9
Time: 2020-11-18
Author: crccw@google.com
File Name: tensorflow/python/distribute/multi_process_lib.py
Class Name:
Method Name: _set_spawn_exe_path


Project Name: acl-org/acl-anthology
Commit Name: 7419eacac2dfa909b280881524e685d7ea4d7ec7
Time: 2020-04-24
Author: post@cs.jhu.edu
File Name: bin/add_attachments.py
Class Name:
Method Name: add_attachment