ea7d11a94cd5722f530d7eff2139f499f7bdd1a6,tpot/export_utils.py,,generate_import_code,#,183

Before Change



    // Build dict of import requirments from list of operators
    import_relations = {op.__name__: op.import_hash for op in operators}
    print(import_relations)  //// to be removed on merge

    if "imblearn" in import_relations.values():
        pipeline_module = "imblearn"

After Change


    import_relations = {op.__name__: op.import_hash for op in operators}

    flatten_list = lambda list_: [item for sublist in list_ for item in sublist]
    modules_used = [
        module.split(".")[0]
        for module in flatten_list(
            [list(val.keys()) for val in import_relations.values()]
        )
    ]

    if "imblearn" in modules_used:
        pipeline_module = "imblearn"
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: EpistasisLab/tpot
Commit Name: ea7d11a94cd5722f530d7eff2139f499f7bdd1a6
Time: 2020-11-10
Author: AyrtonBourn@Outlook.com
File Name: tpot/export_utils.py
Class Name:
Method Name: generate_import_code


Project Name: TheAlgorithms/Python
Commit Name: c359768e257a7bcbfe93e137a0fc1e81b92d6573
Time: 2020-12-08
Author: 58473917+Joe-Sin7h@users.noreply.github.com
File Name: sorts/bitonic_sort.py
Class Name:
Method Name:


Project Name: merenlab/anvio
Commit Name: ca8eeb16b304cdee02c5714f74d388e2c4b21b4b
Time: 2021-01-01
Author: samuelmiller10@gmail.com
File Name: anvio/__init__.py
Class Name:
Method Name: TABULATE