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


        if not stage.startswith("infer"):
            default_callbacks.append(("_criterion", CriterionCallback))
            default_callbacks.append(("_optimizer", OptimizerCallback))
            if self.stages_config[stage].get("scheduler_params", {}):
                default_callbacks.append(("_scheduler", SchedulerCallback))
            default_callbacks.append(("_saver", CheckpointCallback))
            default_callbacks.append(("console", ConsoleLogger))
            default_callbacks.append(("tensorboard", TensorboardLogger))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: pantsbuild/pants
Commit Name: 076e01d237ab3b58cdb395fb04a7f176ab02209d
Time: 2013-10-31
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/cache/combined_artifact_cache.py
Class Name: CombinedArtifactCache
Method Name: use_cached_files