{"record":{"id":"90a55fcf34179db4","repo":"tensorflow/models","slug":"when-hub-module-url-is-specified-init-checkpoi-90a55f","errorCode":null,"errorMessage":"When `hub_module_url` is specified, `init_checkpoint` and `model_config_file` should be empty.","messagePattern":"When `hub_module_url` is specified, `init_checkpoint` and `model_config_file` should be empty\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/finetuning/superglue/flags.py","lineNumber":160,"sourceCode":"        _check_path_exists(gin_file, 'gin_file')\n    if flags_obj.config_file:\n      for config_file in flags_obj.config_file:\n        _check_path_exists(config_file, 'config_file')\n\n  if 'eval' in flags_obj.mode:\n    _validate_path(flags_obj.validation_input_path, 'validation_input_path')\n\n  if flags_obj.mode == 'predict':\n    # model_dir is only needed strictly in 'predict' mode.\n    _validate_path(flags_obj.model_dir, 'model_dir')\n\n  if 'predict' in flags_obj.mode:\n    _validate_path(flags_obj.test_input_path, 'test_input_path')\n\n  if not flags_obj.config_file and flags_obj.mode != 'predict':\n    if flags_obj.hub_module_url:\n      if flags_obj.init_checkpoint or flags_obj.model_config_file:\n        raise ValueError(\n            'When `hub_module_url` is specified, `init_checkpoint` and '\n            '`model_config_file` should be empty.')\n      logging.info('Using the pretrained tf.hub from %s',\n                   flags_obj.hub_module_url)\n    else:\n      if not (flags_obj.init_checkpoint and flags_obj.model_config_file):\n        raise ValueError('Both `init_checkpoint` and `model_config_file` '\n                         'should be specified if `config_file` is not '\n                         'specified.')\n      _validate_path(flags_obj.model_config_file, 'model_config_file')\n      logging.info(\n          'Using the pretrained checkpoint from %s and model_config_file from '\n          '%s.', flags_obj.init_checkpoint, flags_obj.model_config_file)\n","sourceCodeStart":142,"sourceCodeEnd":174,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/finetuning/superglue/flags.py#L142-L174","documentation":"Error \"When `hub_module_url` is specified, `init_checkpoint` and `model_config_file` should be empty.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/finetuning/superglue/flags.py:160 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"}