{"record":{"id":"74a37a0baadef4e2","repo":"tensorflow/models","slug":"the-builder-type-is-not-supported-builder","errorCode":null,"errorMessage":"The `BUILDER` type is not supported: {builder}","messagePattern":"The `BUILDER` type is not supported: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/modeling/hyperparams/base_config.py","lineNumber":54,"sourceCode":"  \"\"\"Bind a class to config cls.\"\"\"\n  if not inspect.isclass(config_cls):\n    raise ValueError('The bind decorator is supposed to apply on the class '\n                     f'attribute. Received {config_cls}, not a class.')\n\n  def decorator(builder):\n    if config_cls in _BOUND:\n      raise ValueError('Inside a program, we should not bind the config with a'\n                       ' class twice.')\n    if inspect.isclass(builder):\n      config_cls._BUILDER = builder  # pylint: disable=protected-access\n    elif inspect.isfunction(builder):\n\n      def _wrapper(self, *args, **kwargs):  # pylint: disable=unused-argument\n        return builder(*args, **kwargs)\n\n      config_cls._BUILDER = _wrapper  # pylint: disable=protected-access\n    else:\n      raise ValueError(f'The `BUILDER` type is not supported: {builder}')\n    _BOUND.add(config_cls)\n    return builder\n\n  return decorator\n\n\ndef _is_optional(field):\n  # Two styles of annotating optional fields:\n  #   Optional[T] -> typing.Union\n  #   T | None    -> types.UnionType\n  is_union = typing.get_origin(field) in (Union, types.UnionType)\n  # An optional field is a union of a type, and NoneType.\n  args = typing.get_args(field)\n  return is_union and len(args) == 2 and type(None) in args\n\n\n@dataclasses.dataclass\nclass Config(params_dict.ParamsDict):","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/hyperparams/base_config.py#L36-L72","documentation":"Error \"The `BUILDER` type is not supported: {builder}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/hyperparams/base_config.py:54 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"}