8ebe10a8d631b8f06b348d4dcb2f4763b824fe32,tests/test_trial.py,,test_trial_should_prune,#,207

Before Change



    study_mock = MagicMock()
    study_mock.study_id = study_id
    study_mock._storage.get_trial.return_value.\
        intermediate_values.keys.return_value = [1, 2, 3, 4, 5]
    study_mock.pruner.prune.return_value = True

    trial = Trial(study_mock, trial_id)  // type: ignore
    study_mock.reset_mock()

After Change


    // type: () -> None

    pruner = DeterministicPruner(True)
    study = create_study(pruner=pruner)
    trial = Trial(study, study._storage.create_new_trial_id(study.study_id))
    trial.report(1, 1)
    assert trial.should_prune()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pfnet/optuna
Commit Name: 8ebe10a8d631b8f06b348d4dcb2f4763b824fe32
Time: 2019-08-22
Author: contact@c-bata.link
File Name: tests/test_trial.py
Class Name:
Method Name: test_trial_should_prune


Project Name: pfnet/optuna
Commit Name: d3196bee4759550bc2e944a945881013157669ef
Time: 2020-06-25
Author: skripniuk.v@yandex.ru
File Name: examples/tensorboard_simple.py
Class Name:
Method Name:


Project Name: pfnet/optuna
Commit Name: 3d83263d943dea491b80faa82b742464761de67a
Time: 2020-12-21
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/samplers_tests/tpe_tests/test_sampler.py
Class Name:
Method Name: test_sample_relative_empty_input