{"record":{"id":"a8b30111365c341a","repo":"tensorflow/models","slug":"expect-non-empty-self-values","errorCode":null,"errorMessage":"Expect non empty {self.values}","messagePattern":"Expect non empty (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/modeling/optimization/lr_schedule.py","lineNumber":443,"sourceCode":"    Args:\n      boundaries: A list of `Tensor`s or `int`s with strictly\n        increasing entries, and with all elements having the same type as the\n        optimizer step.\n      values: A list of `Tensor`s or `float`s that specifies the\n        values for the intervals defined by `boundaries`. It should have one\n        more element than `boundaries`, and all elements should have the same\n        type.\n      offset: The offset when computing the power decay.\n      name: Optional, name of learning rate schedule.\n    \"\"\"\n    super().__init__()\n    self.values = values\n    self.boundaries = boundaries\n    self.offset = offset\n    self.name = name\n\n    if len(self.values) < 1:\n      raise ValueError(f\"Expect non empty {self.values}\")\n    if len(self.boundaries) != len(self.values):\n      raise ValueError(\n          \"Boundaries length is equal to learning rate levels length\"\n          f\"{len(self.boundaries)} != {len(self.values)}\")\n\n    self.total_steps = (\n        [boundaries[i + 1] - boundaries[i] for i in range(len(boundaries) - 1)\n        ] + [0])\n\n  def __call__(self, global_step):\n    with tf.name_scope(self.name or \"StepCosineDecayWithOffset\"):\n      global_step = tf.cast(global_step - self.offset, tf.float32)\n      lr_levels = self.values\n      lr_steps = self.boundaries\n      level_total_steps = self.total_steps\n      num_levels = len(lr_levels)\n\n      init_lr = lr_levels[0]","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/optimization/lr_schedule.py#L425-L461","documentation":"Error \"Expect non empty {self.values}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/optimization/lr_schedule.py:443 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}