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):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: aertslab/pySCENIC
Commit Name: d23794e515aac062b94c9e492143d97ec55c9cc9
Time: 2018-12-14
Author: vandesande.bram@gmail.com
File Name: src/pyscenic/cli/pyscenic.py
Class Name:
Method Name: aucell_command


Project Name: pantsbuild/pants
Commit Name: aea2747cda25271b788d670b8e65452b24bed4e0
Time: 2015-09-17
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/android/tasks/unpack_libraries.py
Class Name: UnpackLibraries
Method Name: _unpack_artifacts