44f1ae2ee548149054309d21b297a9de0d3de90b,tests/storages_tests/test_storages.py,,test_set_trial_user_attrs,#Any#,47

Before Change


    // Test setting value.
    check_set_and_get(trial_id_1, "dataset", "MNIST")
    check_set_and_get(trial_id_1, "none", None)
    check_set_and_get(
        trial_id_1,
        "json_serializable",
        {"baseline_score": 0.001, "tags": ["image", "classification"]})
    assert len(storage.get_trial(trial_id_1).user_attrs) == 3

    // Test overwriting value.
    check_set_and_get(trial_id_1, "dataset", "ImageNet")

After Change


        assert storage.get_trial(trial_id).user_attrs[key] == value

    // Test setting value.
    check_set_and_get(trial_id_1, "dataset", EXAMPLE_ATTRS["dataset"])
    check_set_and_get(trial_id_1, "none", EXAMPLE_ATTRS["none"])
    check_set_and_get(trial_id_1, "json_serializable", EXAMPLE_ATTRS["json_serializable"])
    assert storage.get_trial(trial_id_1).user_attrs == EXAMPLE_ATTRS

    // Test overwriting value.
    check_set_and_get(trial_id_1, "dataset", "ImageNet")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pfnet/optuna
Commit Name: 44f1ae2ee548149054309d21b297a9de0d3de90b
Time: 2018-04-10
Author: sano@preferred.jp
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_trial_user_attrs


Project Name: pfnet/optuna
Commit Name: 49d8dd05b2362a7076d48e19a6c440cf934da15b
Time: 2018-04-11
Author: sano@preferred.jp
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_trial_user_attrs


Project Name: pfnet/optuna
Commit Name: 49d8dd05b2362a7076d48e19a6c440cf934da15b
Time: 2018-04-11
Author: sano@preferred.jp
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_and_get_study_user_attrs


Project Name: pfnet/optuna
Commit Name: 44f1ae2ee548149054309d21b297a9de0d3de90b
Time: 2018-04-10
Author: sano@preferred.jp
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_trial_user_attrs