f6bd12eb18056ea0ca0364b6e458f96ec0ff7585,rllib/utils/schedules/tests/test_schedules.py,TestSchedules,test_polynomial_schedule,#TestSchedules#,40
Before Change
for fw in framework_iterator(frameworks=["tf", "tfe", "torch", None]):
fw_ = fw if fw != "tfe" else "tf"
polynomial = from_config(config, framework=fw_)
for t in ts:
out = polynomial(t)
t = min(t, 100)
check(out, 0.5 + (2.0 - 0.5) * (1.0 - t / 100)**2, decimals=4)
def test_exponential_schedule(self):
ts = [0, 5, 10, 100, 90, 2, 1, 99, 23]
config = dict(initial_p=2.0, decay_rate=0.99, schedule_timesteps=100)
After Change
for t, e in zip(ts_as_tensors, expected):
out = polynomial(t)
assert fw != "tf" or isinstance(out, tf.Tensor)
check(out, e, decimals=4)
def test_exponential_schedule(self):
decay_rate = 0.2
ts = [0, 5, 10, 100, 90, 2, 1, 99, 23]
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_polynomial_schedule
Project Name: keras-team/autokeras
Commit Name: 5b8b1c9419fca922ae4e670d1d6c798f833f0268
Time: 2020-04-07
Author: abraham.g.sebastian@gmail.com
File Name: autokeras/tasks/structured_data.py
Class Name: SupervisedStructuredDataPipeline
Method Name: __init__