class_docstr: Tests all time-step dependent Schedule classes.
code: def test_linear_schedule(self):
      ts = [0, 50, 10, 100, 90, 2, 1, 99, 23, 1000]
      expected = [2.1 - (min(t, 100) / 100) * (2.1 - 0.6) for t in ts]
      config = {
          "schedule_timesteps": 100,
          "initial_p": 2.1,
          "final_p": 0.6,
      }
  
      for fw in framework_iterator(
          frameworks=["tf2", "tf", "torch", None]
      ):
          linear = from_config(LinearSchedule, config, framework=fw)
          for t, e in zip(ts, expected):
              out = linear(t)
              check(out, e, decimals=4)
  
          ts_as_tensors = self._get_framework_tensors(ts, fw)
          for t, e in zip(ts_as_tensors, expected):
              out = linear(t)
              assert fw != "tf" or isinstance(out, tf.Tensor)
              check(out, e, decimals=4)
  
file_path: ray/python/ray/rllib/utils/schedules/tests/test_schedules.py
imports: import unittest
  from ray.rllib.utils.schedules import ConstantSchedule, LinearSchedule, ExponentialSchedule, PiecewiseSchedule
  from ray.rllib.utils import check, framework_iterator, try_import_tf, try_import_torch
  from ray.rllib.utils.from_config import from_config
label_desc: Use image node_id 2 for calling the TestSchedules obj's underlying member method code with example usage: obj.test_linear_schedule() without return types