17cdb1b852347207251248ed1e08c1e22c7a585d,dl/callbacks/__init__.py,,register_callback,#,32

Before Change


    for cf in callback_factories:
        CALLBACKS[cf.__name__] = cf

    if len(callback_factories) == 1:
        return callback_factories[0]
    return callback_factories

After Change


        :param: callback_factories Required criterion factory (method or type)
        :returns: single callback factory or list of them
    
    return register("callbacks")(*callback_factories)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: Scitator/catalyst
Commit Name: 17cdb1b852347207251248ed1e08c1e22c7a585d
Time: 2019-01-08
Author: tez.romach@gmail.com
File Name: dl/callbacks/__init__.py
Class Name:
Method Name: register_callback


Project Name: Scitator/catalyst
Commit Name: 17cdb1b852347207251248ed1e08c1e22c7a585d
Time: 2019-01-08
Author: tez.romach@gmail.com
File Name: contrib/criterion/__init__.py
Class Name:
Method Name: register_criterion


Project Name: Scitator/catalyst
Commit Name: 39c91e07fc33ff900fc6c1bf07b332c477077c48
Time: 2019-01-09
Author: tez.romach@gmail.com
File Name: contrib/models/__init__.py
Class Name:
Method Name: register_model


Project Name: Scitator/catalyst
Commit Name: 17cdb1b852347207251248ed1e08c1e22c7a585d
Time: 2019-01-08
Author: tez.romach@gmail.com
File Name: contrib/optimizers/__init__.py
Class Name:
Method Name: register_optimizer