utils.py
def pipeline_to_dataflow_graph(pipeline):
    '''
    Support function used in Logs. Parent_vertices are all set to None here.
    name field is set to be column name in ColumnTransfomer and operation field contains not only name but also input args.
    '''
    graph = []
    layer_graph = []
    def helper(pipeline, name_prefix=[], parent_vertices=[]):
        if 'ColumnTransformer' in str(type(pipeline)):
            for step in pipeline.transformers:
                for column_name in step[2]:
                    # helper(step[1], name_prefix+['ColTrans__'+column_name], parent_vertices)
                    helper(step[1], name_prefix+[column_name], parent_vertices)
        elif 'Pipeline' in str(type(pipeline)):
            for i, key in enumerate(pipeline.named_steps.keys()):
                helper(pipeline.named_steps[key], name_prefix, parent_vertices)

        else :
            graph.append(DataFlowVertex(parent_vertices, ''.join(name_prefix), pipeline, None))

    helper(pipeline)
    return graph

    Support function used in Logs. Parent_vertices are all set to None here.
    name field is set to be column name in ColumnTransfomer and operation field contains not only name but also input args.
    
Support function used in Logs. Parent_vertices are all set to None here.
name field is set to be column name in ColumnTransfomer and operation field contains not only name but also input args.
Support function used in Logs . Parent_vertices are all set to None here . name field is set to be column name in ColumnTransfomer and operation field contains not only name but also input args .
def pipeline_to_dataflow_graph(pipeline):
    graph = []
    layer_graph = []
    def helper(pipeline, name_prefix=[], parent_vertices=[]):
        if 'ColumnTransformer' in str(type(pipeline)):
            for step in pipeline.transformers:
                for column_name in step[2]:
                    helper(step[1], name_prefix+[column_name], parent_vertices)
        elif 'Pipeline' in str(type(pipeline)):
            for i, key in enumerate(pipeline.named_steps.keys()):
                helper(pipeline.named_steps[key], name_prefix, parent_vertices)
        else :
            graph.append(DataFlowVertex(parent_vertices, ''.join(name_prefix), pipeline, None))
    helper(pipeline)
    return graph
def pipeline_to_dataflow_graph ( pipeline ) : graph = [ ] layer_graph = [ ] def helper ( pipeline , name_prefix = [ ] , parent_vertices = [ ] ) : if 'ColumnTransformer' in str ( type ( pipeline ) ) : for step in pipeline . transformers : for column_name in step [ 2 ] : helper ( step [ 1 ] , name_prefix + [ column_name ] , parent_vertices ) elif 'Pipeline' in str ( type ( pipeline ) ) : for i , key in enumerate ( pipeline . named_steps . keys ( ) ) : helper ( pipeline . named_steps [ key ] , name_prefix , parent_vertices ) else : graph . append ( DataFlowVertex ( parent_vertices , '' . join ( name_prefix ) , pipeline , None ) ) helper ( pipeline ) return graph
Support function used in Logs.
Support function used in Logs .
'''
    Support function used in Logs. Parent_vertices are all set to None here.
    name field is set to be column name in ColumnTransfomer and operation field contains not only name but also input args.
    ''' # helper(step[1], name_prefix+['ColTrans__'+column_name], parent_vertices)
pipeline