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


            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
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: scikit-learn-contrib/DESlib
Commit Name: ff5c7db82d429924fd88dfc9dd06935bfbb202cb
Time: 2017-12-13
Author: luiz.gh@gmail.com
File Name: pythonds/des/base.py
Class Name: DES
Method Name: __init__


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 563e828f64b404b97fb93f8cc28371b6b4882c1a
Time: 2018-03-07
Author: guillaumekln@users.noreply.github.com
File Name: opennmt/models/sequence_tagger.py
Class Name: SequenceTagger
Method Name: __init__