Exemple #1
0
    def ports_setup(self):
        port_type = PortsSpecSchema.port_type
        input_ports = {
            'points_df_in': {
                port_type: [cudf.DataFrame, dask_cudf.DataFrame]
            }
        }

        output_ports = {
            'distance_df': {
                port_type: [cudf.DataFrame, dask_cudf.DataFrame]
            },
            'distance_abs_df': {
                PortsSpecSchema.port_type:
                [cudf.DataFrame, dask_cudf.DataFrame]
            }
        }
        input_connections = self.get_connected_inports()
        if 'points_df_in' in input_connections:
            types = input_connections['points_df_in']
            # connected, use the types passed in from parent
            return NodePorts(inports={'points_df_in': {
                port_type: types
            }},
                             outports={
                                 'distance_df': {
                                     port_type: types
                                 },
                                 'distance_abs_df': {
                                     port_type: types
                                 },
                             })
        else:
            return NodePorts(inports=input_ports, outports=output_ports)
Exemple #2
0
 def ports_setup(self):
     input_ports = {}
     output_ports = {
         'points_df_out': {
             PortsSpecSchema.port_type: pd.DataFrame
         }
     }
     return NodePorts(inports=input_ports, outports=output_ports)
Exemple #3
0
    def ports_setup(self):
        input_ports = {
            'points_df_in': {
                PortsSpecSchema.port_type: cudf.DataFrame
            }
        }

        output_ports = {
            'distance_df': {
                PortsSpecSchema.port_type: cudf.DataFrame
            }
        }

        return NodePorts(inports=input_ports, outports=output_ports)
Exemple #4
0
    def ports_setup(self):
        input_ports = {
            'df1': {
                PortsSpecSchema.port_type:
                [cudf.DataFrame, dask_cudf.DataFrame]
            },
            'df2': {
                PortsSpecSchema.port_type:
                [cudf.DataFrame, dask_cudf.DataFrame]
            }
        }
        output_ports = {'max_diff': {PortsSpecSchema.port_type: float}}

        return NodePorts(inports=input_ports, outports=output_ports)
Exemple #5
0
    def ports_setup(self):
        input_ports = {
            'df1': {
                PortsSpecSchema.port_type:
                [cudf.DataFrame, dask_cudf.DataFrame]
            },
            'df2': {
                PortsSpecSchema.port_type:
                [cudf.DataFrame, dask_cudf.DataFrame]
            }
        }
        output_ports = {'max_diff': {PortsSpecSchema.port_type: float}}

        connections = self.get_connected_inports()
        for key in input_ports:
            if key in connections:
                # connected
                types = connections[key]
                input_ports[key].update({PortsSpecSchema.port_type: types})
        return NodePorts(inports=input_ports, outports=output_ports)
 def ports_setup(self):
     ptype = self.conf.get('port_type', list)
     inports = {'inlist': {PortsSpecSchema.port_type: ptype}}
     outports = {'sum': {PortsSpecSchema.port_type: float}}
     return NodePorts(inports=inports, outports=outports)
 def ports_setup(self):
     ptype = self.conf.get('port_type', list)
     output_ports = {'numlist': {PortsSpecSchema.port_type: ptype}}
     return NodePorts(outports=output_ports)