{"record":{"id":"844264c11b641760","repo":"tensorflow/models","slug":"flag-s-at-s-does-not-exist-844264","errorCode":null,"errorMessage":"Flag `%s` at %s does not exist.","messagePattern":"Flag `(.+?)` at (.+?) does not exist\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/finetuning/superglue/flags.py","lineNumber":127,"sourceCode":"  flags.DEFINE_float('warmup_ratio', 0.1,\n                     'Proportion of learning rate warmup steps.')\n\n  flags.DEFINE_integer('num_eval_per_epoch', 2,\n                       'Number of evaluations to run per epoch.')\n\n\ndef validate_flags(flags_obj: flags.FlagValues, file_exists_fn: Callable[[str],\n                                                                         bool]):\n  \"\"\"Raises ValueError if any flags are misconfigured.\n\n  Args:\n    flags_obj: A `flags.FlagValues` object, usually from `flags.FLAG`.\n    file_exists_fn: A callable to decide if a file path exists or not.\n  \"\"\"\n\n  def _check_path_exists(flag_path, flag_name):\n    if not file_exists_fn(flag_path):\n      raise ValueError('Flag `%s` at %s does not exist.' %\n                       (flag_name, flag_path))\n\n  def _validate_path(flag_path, flag_name):\n    if not flag_path:\n      raise ValueError('Flag `%s` must be provided in mode %s.' %\n                       (flag_name, flags_obj.mode))\n    _check_path_exists(flag_path, flag_name)\n\n  if 'train' in flags_obj.mode:\n    _validate_path(flags_obj.train_input_path, 'train_input_path')\n    _validate_path(flags_obj.input_meta_data_path, 'input_meta_data_path')\n\n    if flags_obj.gin_file:\n      for gin_file in flags_obj.gin_file:\n        _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')","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/finetuning/superglue/flags.py#L109-L145","documentation":"Error \"Flag `%s` at %s does not exist.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/finetuning/superglue/flags.py:127 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"}