f6bd12eb18056ea0ca0364b6e458f96ec0ff7585,rllib/utils/schedules/tests/test_schedules.py,TestSchedules,test_constant_schedule,#TestSchedules#,16

Before Change


        config = {"value": value}

        for fw in framework_iterator(frameworks=["tf", "tfe", "torch", None]):
            fw_ = fw if fw != "tfe" else "tf"
            constant = from_config(ConstantSchedule, config, framework=fw_)
            for t in ts:
                out = constant(t)
                check(out, value)

After Change



            ts_as_tensors = self._get_framework_tensors(ts, fw)
            for t in ts_as_tensors:
                out = constant(t)
                assert fw != "tf" or isinstance(out, tf.Tensor)
                check(out, value, decimals=4)

    def test_linear_schedule(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: f6bd12eb18056ea0ca0364b6e458f96ec0ff7585
Time: 2020-07-30
Author: sven@anyscale.io
File Name: rllib/utils/schedules/tests/test_schedules.py
Class Name: TestSchedules
Method Name: test_constant_schedule


Project Name: keras-team/keras
Commit Name: 0cccb83cdf98832feb647278422a75edb4375c76
Time: 2019-03-22
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: constant


Project Name: deepmind/sonnet
Commit Name: e8b348915f3fe67d79f75c4399606821b413e5a1
Time: 2019-05-31
Author: petebu@google.com
File Name: sonnet/src/rmsprop_test.py
Class Name: RMSPropTest
Method Name: testMovingVariablesColocatedWithOriginal