{"record":{"id":"eb2eef2cde545ec8","repo":"tensorflow/models","slug":"export-path-is-not-specified-s","errorCode":null,"errorMessage":"Export path is not specified: %s","messagePattern":"Export path is not specified: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/bert/run_classifier.py","lineNumber":344,"sourceCode":"  return predictions, labels\n\n\ndef export_classifier(model_export_path, input_meta_data, bert_config,\n                      model_dir):\n  \"\"\"Exports a trained model as a `SavedModel` for inference.\n\n  Args:\n    model_export_path: a string specifying the path to the SavedModel directory.\n    input_meta_data: dictionary containing meta data about input and model.\n    bert_config: Bert configuration file to define core bert layers.\n    model_dir: The directory where the model weights and training/evaluation\n      summaries are stored.\n\n  Raises:\n    Export path is not specified, got an empty string or None.\n  \"\"\"\n  if not model_export_path:\n    raise ValueError('Export path is not specified: %s' % model_export_path)\n  if not model_dir:\n    raise ValueError('Export path is not specified: %s' % model_dir)\n\n  # Export uses float32 for now, even if training uses mixed precision.\n  tf_keras.mixed_precision.set_global_policy('float32')\n  classifier_model = bert_models.classifier_model(\n      bert_config,\n      input_meta_data.get('num_labels', 1),\n      hub_module_url=FLAGS.hub_module_url,\n      hub_module_trainable=False)[0]\n\n  model_saving_utils.export_bert_model(\n      model_export_path, model=classifier_model, checkpoint_dir=model_dir)\n\n\ndef run_bert(strategy,\n             input_meta_data,\n             model_config,","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/bert/run_classifier.py#L326-L362","documentation":"Error \"Export path is not specified: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/bert/run_classifier.py:344 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"}