655cd1417d50077e766587c015ab806fc90e1b5f,tests/test_trial.py,TestTrialValEvalPred,test_evaluate,#TestTrialValEvalPred#,1548

Before Change


        state = {tb.VALIDATION_GENERATOR: generator, tb.VALIDATION_STEPS: steps, tb.METRICS: 1}
        t = Trial(MagicMock())
        eval_mock = t.eval = Mock()
        test_pass_mock = t._test_pass = Mock(return_value={tb.METRICS: 1})
        t.state = {tb.VALIDATION_GENERATOR: generator, tb.CALLBACK_LIST: None, tb.VALIDATION_STEPS: steps, tb.VALIDATION_DATA: (generator, steps)}
        metrics = t.evaluate(state)

After Change



        t = Trial(MagicMock())
        eval_mock = t.eval = Mock()
        clist = MagicMock()
        state = {tb.HISTORY: [("steps", {"train_metric": 2})], tb.VALIDATION_GENERATOR: generator, tb.CALLBACK_LIST: clist, tb.VALIDATION_STEPS: steps, tb.VALIDATION_DATA: (generator, steps), tb.METRICS: {"val_metric": 1}}
        test_pass_mock = t._test_pass = Mock(return_value=state)
        t.state = state
        metrics = t.evaluate()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ecs-vlc/torchbearer
Commit Name: 655cd1417d50077e766587c015ab806fc90e1b5f
Time: 2018-09-19
Author: ewah1g13@soton.ac.uk
File Name: tests/test_trial.py
Class Name: TestTrialValEvalPred
Method Name: test_evaluate


Project Name: streamlit/streamlit
Commit Name: de6d29ff24b874e0c320b22c28e91ab370ec8b84
Time: 2020-08-07
Author: akrolsmir@gmail.com
File Name: lib/tests/streamlit/report_session_test.py
Class Name: ReportSessionTest
Method Name: test_enqueue_without_tracer


Project Name: streamlit/streamlit
Commit Name: de6d29ff24b874e0c320b22c28e91ab370ec8b84
Time: 2020-08-07
Author: akrolsmir@gmail.com
File Name: lib/tests/streamlit/report_session_test.py
Class Name: ReportSessionTest
Method Name: test_enqueue_with_tracer