{"record":{"id":"389030009e78228e","repo":"tensorflow/models","slug":"checkpoint-path-cannot-be-empty","errorCode":null,"errorMessage":"checkpoint_path cannot be empty.","messagePattern":"checkpoint_path cannot be empty\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/main.py","lineNumber":159,"sourceCode":"        model_fn=_model_fn,\n        loss_fn=model_builder.build_loss_fn,\n        is_multi_host=is_multi_host,\n        predict_post_process_fn=model_builder.post_processing,\n        trainable_variables_filter=model_builder\n        .make_filter_trainable_variables_fn())\n\n    if mode == 'eval':\n      results = dist_executor.evaluate_from_model_dir(\n          model_dir=params.model_dir,\n          eval_input_fn=eval_input_fn,\n          eval_metric_fn=model_builder.eval_metrics,\n          eval_timeout=params.eval.eval_timeout,\n          min_eval_interval=params.eval.min_eval_interval,\n          total_steps=params.train.total_steps)\n    else:\n      # Run evaluation once for a single checkpoint.\n      if not checkpoint_path:\n        raise ValueError('checkpoint_path cannot be empty.')\n      if tf.io.gfile.isdir(checkpoint_path):\n        checkpoint_path = tf.train.latest_checkpoint(checkpoint_path)\n      summary_writer = executor.SummaryWriter(params.model_dir, 'eval')\n      results, _ = dist_executor.evaluate_checkpoint(\n          checkpoint_path=checkpoint_path,\n          eval_input_fn=eval_input_fn,\n          eval_metric_fn=model_builder.eval_metrics,\n          summary_writer=summary_writer)\n    for k, v in results.items():\n      logging.info('Final eval metric %s: %f', k, v)\n    return results\n  else:\n    raise ValueError('Mode not found: %s.' % mode)\n\n\ndef run(callbacks=None):\n  \"\"\"Runs the experiment.\"\"\"\n  keras_utils.set_session_config(enable_xla=FLAGS.enable_xla)","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/main.py#L141-L177","documentation":"Error \"checkpoint_path cannot be empty.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/main.py:159 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"}