{"record":{"id":"84f70faa20a6536a","repo":"jax-ml/jax","slug":"cannot-deserialize-disabledsafetycheck-with-unknow","errorCode":null,"errorMessage":"Cannot deserialize DisabledSafetyCheck with unknown kind: {kind}","messagePattern":"Cannot deserialize DisabledSafetyCheck with unknown kind: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/export/serialization.py","lineNumber":941,"sourceCode":"  if custom_call_target is not None:\n    ser_flatbuf.DisabledSafetyCheckAddCustomCallTarget(\n        builder, custom_call_target\n    )\n  return ser_flatbuf.DisabledSafetyCheckEnd(builder)\n\n\ndef _deserialize_disabled_safety_check(\n    sc: ser_flatbuf.DisabledSafetyCheck,\n) -> _export.DisabledSafetyCheck:\n  kind = sc.Kind()\n  if kind == ser_flatbuf.DisabledSafetyCheckKind.custom_call:\n    return _export.DisabledSafetyCheck.custom_call(\n        sc.CustomCallTarget().decode(\"utf-8\")\n    )\n  if kind == ser_flatbuf.DisabledSafetyCheckKind.platform:\n    return _export.DisabledSafetyCheck.platform()\n\n  raise ValueError(f\"Cannot deserialize DisabledSafetyCheck with unknown kind: {kind}\")\n","sourceCodeStart":923,"sourceCodeEnd":942,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/export/serialization.py#L923-L942","documentation":"When loading a serialized JAX export, the deserializer reads the flatbuffer tag identifying the kind of disabled safety check. An unrecognized tag means the flatbuffer was written by a newer JAX with new check kinds that this JAX version cannot represent.","triggerScenarios":"jax.export.load(path) on a file serialized by a newer JAX version that added a new DisabledSafetyCheckKind; or a corrupted/hand-edited flatbuffer with an invalid enum value.","commonSituations":"Downgrading JAX after an export file was produced with a newer release; reading a .jax file generated on a different toolchain.","solutions":["Upgrade jax (and jaxlib) to at least the version that produced the export file","Re-export the model with the currently installed JAX version","Verify the file integrity / regenerate the export"],"exampleFix":"# before\nm = jax.export.load('model.jax')  # older jax, newer file\n# after\npip install -U jax jaxlib\nm = jax.export.load('model.jax')","handlingStrategy":"type-guard","validationCode":"import jax, jaxlib\n# before loading an export produced elsewhere\nassert version_tuple(jax.__version__) >= version_tuple(required_version)","typeGuard":"def loadable_by_this_jax(path) -> bool:\n    return jax.__version__ >= export_producer_version(path)","tryCatchPattern":"try:\n    em = jax.export.load(path)\nexcept ValueError as e:\n    if 'unknown kind' in str(e): upgrade_or_reexport(path)","preventionTips":["Record the producer JAX version alongside exported artifacts","Keep jax/jaxlib versions uniform across save/load environments"],"tags":["jax","export","deserialization","version-mismatch"],"backgroundTag":"deserialization-unknown-enum-value","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}