58f064e14cb2a2898715f030cef97f3ddfd66dc6,tests/test_trial.py,TestTestPass,test_state_values,#TestTestPass#,1623

Before Change


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

        state = {
            tb.MAX_EPOCHS: epochs, tb.STOP_TRAINING: True, tb.MODEL: torchmodel, tb.CRITERION: criterion,
            tb.OPTIMIZER: optimizer,
            tb.METRIC_LIST: metric_list, tb.CALLBACK_LIST: callback_list, tb.DEVICE: "cpu",
            tb.DATA_TYPE: torch.float, tb.HISTORY: [], tb.GENERATOR: generator, tb.STEPS: steps, tb.EPOCH: 0,
            tb.X: data[0][0], tb.Y_TRUE: data[0][1], tb.SAMPLER: tb.trial.Sampler(load_batch_none)
        }

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

After Change


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

        state = make_state[
            tb.MAX_EPOCHS: epochs, tb.STOP_TRAINING: True, tb.MODEL: torchmodel, tb.CRITERION: criterion,
            tb.OPTIMIZER: optimizer,
            tb.METRIC_LIST: metric_list, tb.CALLBACK_LIST: callback_list, tb.DEVICE: "cpu",
            tb.DATA_TYPE: torch.float, tb.HISTORY: [], tb.GENERATOR: generator, tb.STEPS: steps, tb.EPOCH: 0,
            tb.X: data[0][0], tb.Y_TRUE: data[0][1], tb.SAMPLER: tb.trial.Sampler(load_batch_none)
        ]

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

Frequency: 10

Non-data size: 15

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: TestTestPass
Method Name: test_state_values


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: TestTestPass
Method Name: test_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: TestTestPass
Method Name: test_iterator_none


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: TestTestPass
Method Name: test_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: TestTestPass
Method Name: test_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: TestTestPass
Method Name: test_forward_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: TestTestPass
Method Name: test_forward_with_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: TestTestPass
Method Name: test_metric_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: TestTestPass
Method Name: test_metric_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: TestTestPass
Method Name: test_metric_reset