class_docstr: Tests for Scenic Optax utils.
class_docstr_tok: ["Tests","for","Scenic","Optax","utils","."]
docstr: Tests `make_schedule`.
docstr_tok: ["Tests","`","make_schedule","`","."]
code: def test_make_schedule(self):
      """Tests `make_schedule`."""
  
      def lr_fn(cfg: ml_collections.ConfigDict) -> float:
          """Dummy LR schedule creation function."""
          return float(cfg.lr_configs.lr)
  
      schedule = ml_collections.ConfigDict(
          {
              "main": ml_collections.ConfigDict(
                  {
                      "re": "a/.*",
                      "lr_configs": ml_collections.ConfigDict(
                          {"lr": "1.0"}
                      ),
                  }
              ),
              "rest": ml_collections.ConfigDict(
                  {
                      "re": "c",
                      "lr_configs": ml_collections.ConfigDict(
                          {"lr": "2.0", "base_learning_rate": 10.0}
                      ),
                  }
              ),
          }
      )
      new_schedule = optax.make_schedule(schedule, lr_fn)
      target_schedule = [
          ("a/.*", "main", (1.0, 1.0)),
          ("c", "rest", (2.0, 10.0)),
      ]
      self.assertAllEqual(target_schedule, new_schedule)
  
imports: from typing import Optional
  from absl.testing import absltest
  from absl.testing import parameterized
  import ml_collections
  from scenic.train_lib import optax
  import tensorflow
label_desc: Use image node_id 9 for calling the OptaxTest obj's underlying member method code with example usage: obj.test_make_schedule() and returns: float