inference_schema/parameter_types/standard_py_parameter_type.py
def deserialize_input(self, input_data):
        """
        Convert the provided data into the expected Python object.

        :param input_data:
        :type input_data: varies
        :return:
        :rtype: varies
        """
        if self.sample_data_type is datetime.date:
            input_data = datetime.date.strptime(input_data, DATE_FORMAT)
        elif self.sample_data_type is datetime.datetime:
            input_data = parser.parse(input_data)
        elif self.sample_data_type is datetime.time:
            input_data = parser.parse(input_data).timetz()
        elif self.sample_data_type is bytearray or (sys.version_info[0] == 3 and self.sample_data_type is bytes):
            input_data = base64.b64decode(input_data.encode('utf-8'))

        if self.sample_data_type is float and type(input_data) is int:
            # Allow users to pass ints when expecting floats, for convenience
            pass
        elif not isinstance(input_data, self.sample_data_type):
            raise ValueError("Invalid input data type to parse. Expected: {0} but got {1}".format(
                self.sample_data_type, type(input_data)))

        return input_data

        Convert the provided data into the expected Python object.

        :param input_data:
        :type input_data: varies
        :return:
        :rtype: varies
        
Convert the provided data into the expected Python object.
Convert the provided data into the expected Python object .
def deserialize_input(self, input_data):
        if self.sample_data_type is datetime.date:
            input_data = datetime.date.strptime(input_data, DATE_FORMAT)
        elif self.sample_data_type is datetime.datetime:
            input_data = parser.parse(input_data)
        elif self.sample_data_type is datetime.time:
            input_data = parser.parse(input_data).timetz()
        elif self.sample_data_type is bytearray or (sys.version_info[0] == 3 and self.sample_data_type is bytes):
            input_data = base64.b64decode(input_data.encode('utf-8'))
        if self.sample_data_type is float and type(input_data) is int:
            pass
        elif not isinstance(input_data, self.sample_data_type):
            raise ValueError("Invalid input data type to parse. Expected: {0} but got {1}".format(
                self.sample_data_type, type(input_data)))
        return input_data
def deserialize_input ( self , input_data ) : if self . sample_data_type is datetime . date : input_data = datetime . date . strptime ( input_data , DATE_FORMAT ) elif self . sample_data_type is datetime . datetime : input_data = parser . parse ( input_data ) elif self . sample_data_type is datetime . time : input_data = parser . parse ( input_data ) . timetz ( ) elif self . sample_data_type is bytearray or ( sys . version_info [ 0 ] == 3 and self . sample_data_type is bytes ) : input_data = base64 . b64decode ( input_data . encode ( 'utf-8' ) ) if self . sample_data_type is float and type ( input_data ) is int : pass elif not isinstance ( input_data , self . sample_data_type ) : raise ValueError ( "Invalid input data type to parse. Expected: {0} but got {1}" . format ( self . sample_data_type , type ( input_data ) ) ) return input_data
Convert the provided data into the expected Python object.
Convert the provided data into the expected Python object .
"""
        Convert the provided data into the expected Python object.

        :param input_data:
        :type input_data: varies
        :return:
        :rtype: varies
        """ # Allow users to pass ints when expecting floats, for convenience
None
varies
self
input_data
None