{"record":{"id":"c4389978c4ff846c","repo":"tensorflow/models","slug":"checkpoint-path-is-empty","errorCode":null,"errorMessage":"checkpoint path is empty","messagePattern":"checkpoint path is empty","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/executor/distributed_executor.py","lineNumber":684,"sourceCode":"    tf_keras.backend.set_learning_phase(0)\n    params = self._params\n    strategy = self._strategy\n    # To reduce unnecessary send/receive input pipeline operation, we place\n    # input pipeline ops in worker task.\n    with strategy.scope():\n\n      # To correctly place the model weights on accelerators,\n      # model and optimizer should be created in scope.\n      model = self.model_fn(params.as_dict())\n      checkpoint = tf.train.Checkpoint(model=model)\n\n      eval_metric = eval_metric_fn()\n      assert eval_metric, 'eval_metric does not exist'\n      test_step = self._create_test_step(strategy, model, metric=eval_metric)\n\n      logging.info('Starting to evaluate.')\n      if not checkpoint_path:\n        raise ValueError('checkpoint path is empty')\n      reader = tf.compat.v1.train.NewCheckpointReader(checkpoint_path)\n      if reader.has_tensor('optimizer/iter/.ATTRIBUTES/VARIABLE_VALUE'):\n        # Legacy keras optimizer iteration.\n        current_step = reader.get_tensor(\n            'optimizer/iter/.ATTRIBUTES/VARIABLE_VALUE')\n      else:\n        # New keras optimizer iteration.\n        current_step = reader.get_tensor(\n            'optimizer/_iterations/.ATTRIBUTES/VARIABLE_VALUE')\n      logging.info('Checkpoint file %s found and restoring from '\n                   'checkpoint', checkpoint_path)\n      status = checkpoint.restore(checkpoint_path)\n      status.expect_partial().assert_existing_objects_matched()\n\n      self.global_train_step = model.optimizer.iterations\n      eval_iterator = self._get_input_iterator(eval_input_fn, strategy)\n      eval_metric_result = self._run_evaluation(test_step, current_step,\n                                                eval_metric, eval_iterator)","sourceCodeStart":666,"sourceCodeEnd":702,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/executor/distributed_executor.py#L666-L702","documentation":"Error \"checkpoint path is empty\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/executor/distributed_executor.py:684 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"}