021b07ba9751b9eb817e6b9e203612abf5a9ce18,catalyst/dl/experiment/config.py,ConfigExperiment,get_callbacks,#ConfigExperiment#Any#,389

Before Change


        default_callbacks.append(("exception", RaiseExceptionCallback))

        for callback_name, callback_fn in default_callbacks:
            is_already_present = any(
                isinstance(x, callback_fn) for x in callbacks.values()
            )
            if not is_already_present:
                callbacks[callback_name] = callback_fn()

        return callbacks

After Change


        for callback_name, callback_fn in default_callbacks:
            is_already_present = False
            for x in callbacks.values():
                if isinstance(x, PhaseWrapperCallback):
                    x = x.callback
                if isinstance(x, callback_fn):
                    is_already_present = True
                    break
            if not is_already_present:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: catalyst-team/catalyst
Commit Name: 021b07ba9751b9eb817e6b9e203612abf5a9ce18
Time: 2019-11-10
Author: alex.gaziev@gmail.com
File Name: catalyst/dl/experiment/config.py
Class Name: ConfigExperiment
Method Name: get_callbacks


Project Name: GPflow/GPflow
Commit Name: a1a3a6a27e236464460d07fa7e0c4b605d094717
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: GPflow/_settings.py
Class Name:
Method Name: parse


Project Name: deepmind/sonnet
Commit Name: a73d3547b513b315d7ad804399d215a31b3381c0
Time: 2017-07-17
Author: tfgg@google.com
File Name: sonnet/python/modules/conv.py
Class Name: Conv3D
Method Name: __init__