{"record":{"id":"18b361bf4e267abb","repo":"jax-ml/jax","slug":"unrecognized-config-option-name","errorCode":null,"errorMessage":"Unrecognized config option: {name}","messagePattern":"Unrecognized config option: (.+?)","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"jax/_src/config.py","lineNumber":98,"sourceCode":"class Config:\n  _HAS_DYNAMIC_ATTRIBUTES = True\n  if TYPE_CHECKING:\n\n    def __getattr__(self, name: str) -> Any:\n      ...\n\n    def __setattr__(self, name: str, value: Any) -> None:\n      ...\n\n  def __init__(self):\n    self._value_holders: dict[str, ValueHolder] = {}\n    self.meta = {}\n    self.use_absl = False\n    self._contextmanager_flags = set()\n\n  def update(self, name, val):\n    if name not in self._value_holders:\n      raise AttributeError(f\"Unrecognized config option: {name}\")\n    self._value_holders[name]._set(val)\n\n  def read(self, name):\n    if name in self._contextmanager_flags:\n      raise AttributeError(\n          \"For flags with a corresponding contextmanager, read their value \"\n          f\"via e.g. `config.{name}` rather than `config.FLAGS.{name}`.\")\n    return self._read(name)\n\n  def _read(self, name):\n    try:\n      return self._value_holders[name].value\n    except KeyError:\n      raise AttributeError(f\"Unrecognized config option: {name}\")\n\n  @property\n  def values(self):\n    return {name: holder.value for name, holder in self._value_holders.items()}","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/config.py#L80-L116","documentation":"jax.config.update (and the absl-style FLAGS update path) only accepts options that were registered via config state definitions (bool_state, enum_state, etc.). Calling update with a name not present in the registry raises AttributeError before any value is set. This protects against silently creating typo'd or version-mismatched options.","triggerScenarios":"jax.config.update('jax_enable_x64s', True) (typo), using an option removed/renamed in the installed JAX version, or calling config.update with a custom name never defined via jax.config.define_bool_state etc.","commonSituations":"Upgrading JAX where a flag was renamed or removed; copying config.update calls from StackOverflow for a different JAX version; typo in flag name in a setup script.","solutions":["List valid options via jax.config.values (or dir(jax.config)) and use the exact name","Check the installed version's config docs/changelog: the flag may be renamed or removed","If intentional, define the option first with jax.config.define_bool_state / enum_state before update"],"exampleFix":"# before\njax.config.update('jax_enable_x64s', True)\n# after\njax.config.update('jax_enable_x64', True)","handlingStrategy":"validation","validationCode":"import jax\n\ndef safe_config_update(name, value):\n    if name not in jax.config.values:\n        avail = [n for n in jax.config.values if n.startswith('jax_')]\n        raise KeyError(f'{name!r} not a JAX option; available: {avail}')\n    jax.config.update(name, value)\n\nsafe_config_update('jax_enable_x64', True)","typeGuard":null,"tryCatchPattern":"try:\n    jax.config.update(name, val)\nexcept AttributeError:\n    # option missing in this JAX version; skip or migrate\n    pass","preventionTips":["Wrap config updates in a helper that checks jax.config.values first","Pin the JAX version in requirements to keep option names stable","Add a startup test asserting the options you use exist"],"tags":["jax","config","unknown-option","typo"],"backgroundTag":"unknown-config-option","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}