{"record":{"id":"190578f8fc75baf0","repo":"tensorflow/models","slug":"unsupported-converted-model-s","errorCode":null,"errorMessage":"Unsupported converted_model: %s","messagePattern":"Unsupported converted_model: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"official/nlp/tools/tf2_albert_encoder_checkpoint_converter.py","lineNumber":145,"sourceCode":"\n  # Create a temporary V1 name-converted checkpoint in the output directory.\n  temporary_checkpoint_dir = os.path.join(output_dir, \"temp_v1\")\n  temporary_checkpoint = os.path.join(temporary_checkpoint_dir, \"ckpt\")\n  tf1_bert_checkpoint_converter_lib.convert(\n      checkpoint_from_path=v1_checkpoint,\n      checkpoint_to_path=temporary_checkpoint,\n      num_heads=bert_config.num_attention_heads,\n      name_replacements=ALBERT_NAME_REPLACEMENTS,\n      permutations=tf1_bert_checkpoint_converter_lib.BERT_V2_PERMUTATIONS,\n      exclude_patterns=[\"adam\", \"Adam\"])\n\n  # Create a V2 checkpoint from the temporary checkpoint.\n  if converted_model == \"encoder\":\n    model = _create_albert_model(bert_config)\n  elif converted_model == \"pretrainer\":\n    model = _create_pretrainer_model(bert_config)\n  else:\n    raise ValueError(\"Unsupported converted_model: %s\" % converted_model)\n\n  tf1_bert_checkpoint_converter_lib.create_v2_checkpoint(\n      model, temporary_checkpoint, output_path, checkpoint_model_name)\n\n  # Clean up the temporary checkpoint, if it exists.\n  try:\n    tf.io.gfile.rmtree(temporary_checkpoint_dir)\n  except tf.errors.OpError:\n    # If it doesn't exist, we don't need to clean it up; continue.\n    pass\n\n\ndef main(_):\n  output_path = FLAGS.converted_checkpoint_path\n  v1_checkpoint = FLAGS.checkpoint_to_convert\n  checkpoint_model_name = FLAGS.checkpoint_model_name\n  converted_model = FLAGS.converted_model\n  albert_config = configs.AlbertConfig.from_json_file(FLAGS.albert_config_file)","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/tools/tf2_albert_encoder_checkpoint_converter.py#L127-L163","documentation":"Error \"Unsupported converted_model: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/tools/tf2_albert_encoder_checkpoint_converter.py:145 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"}