990d954031a1121bc0b9ec1678c0b7db7cfaa374,tpot/operators/base.py,Operator,parameter_types,#Operator#,117

Before Change


            annotation = operator_parameters[param].annotation

            // Raise RuntimeError if a type is not annotated
            if annotation == Signature.empty:
                raise RuntimeError("Undocumented argument type for {} in operator {}".
                    format(param, self.sklearn_class.__class__.__name__))
            else:
                arg_types.append(annotation)

        return_type = Output_DF if self.root else pd.DataFrame

        return (arg_types, return_type)

After Change


            num_args = len(getargspec(self.preprocess_args).args[1:])  // Remove "self"

        // Make sure the class has been written properly
        if num_args != len(self.arg_types):
            raise RuntimeError(("{}"s arg_types does not correspond to the "
                                "arguments defined for itself".format(self.__name__)))

        // First argument is always a DataFrame
        arg_types = [pd.DataFrame] + list(self.arg_types)
        return_type = Output_DF if self.root else pd.DataFrame

        return (arg_types, return_type)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: EpistasisLab/tpot
Commit Name: 990d954031a1121bc0b9ec1678c0b7db7cfaa374
Time: 2016-07-08
Author: supacoofoo@gmail.com
File Name: tpot/operators/base.py
Class Name: Operator
Method Name: parameter_types


Project Name: VOLTTRON/volttron
Commit Name: 13cb16b9edbb868505c41401dc951a8c8accb396
Time: 2020-06-22
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point


Project Name: VOLTTRON/volttron
Commit Name: 694383ee05139068146f021d19f80143f98011f6
Time: 2020-06-01
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point