58f064e14cb2a2898715f030cef97f3ddfd66dc6,tests/test_trial.py,TestFitPass,test_fit_backward,#TestFitPass#,1077

Before Change


        callback_list = MagicMock()
        tb.CallbackListInjection = Mock(return_value=callback_list)

        state = {
            tb.MAX_EPOCHS: epochs, tb.STOP_TRAINING: False, tb.MODEL: torchmodel, tb.CRITERION: criterion,
            tb.OPTIMIZER: optimizer, tb.INF_TRAIN_LOADING: False,
            tb.METRIC_LIST: metric_list, tb.CALLBACK_LIST: callback_list, tb.DEVICE: "cpu",
            tb.DATA_TYPE: torch.float,
            tb.HISTORY: [], tb.TRAIN_GENERATOR: generator, tb.TRAIN_STEPS: train_steps, tb.EPOCH: 0,
            tb.BACKWARD_ARGS: {}
        }

        torchbearertrial = Trial(torchmodel, optimizer, criterion, [], callbacks=[])
        torchbearertrial.train = Mock()
        torchbearertrial.pass_state = True

After Change


        callback_list = MagicMock()
        tb.CallbackListInjection = Mock(return_value=callback_list)

        state = make_state[
            tb.MAX_EPOCHS: epochs, tb.STOP_TRAINING: False, tb.MODEL: torchmodel, tb.CRITERION: criterion,
            tb.OPTIMIZER: optimizer, tb.INF_TRAIN_LOADING: False,
            tb.METRIC_LIST: metric_list, tb.CALLBACK_LIST: callback_list, tb.DEVICE: "cpu",
            tb.DATA_TYPE: torch.float,
            tb.HISTORY: [], tb.TRAIN_GENERATOR: generator, tb.TRAIN_STEPS: train_steps, tb.EPOCH: 0,
            tb.BACKWARD_ARGS: {}
        ]

        torchbearertrial = Trial(torchmodel, optimizer, criterion, [], callbacks=[])
        torchbearertrial.train = Mock()
        torchbearertrial.pass_state = True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 11

Non-data size: 14

Instances


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_backward


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_stop_training


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_metrics_process


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_optimizer_calls


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_metrics_reset


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_metrics_final


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_callback_calls


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_backward


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_criterion


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_train_called


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_forward_call_no_state


Project Name: ecs-vlc/torchbearer
Commit Name: 58f064e14cb2a2898715f030cef97f3ddfd66dc6
Time: 2019-03-25
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestFitPass
Method Name: test_fit_state_values