{"record":{"id":"43b6ed4c4b8d2eaa","repo":"xai-org/x-algorithm","slug":"unknown-remat-policy-policy","errorCode":null,"errorMessage":"Unknown remat policy: {policy}","messagePattern":"Unknown remat policy: (.+?)","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/models/remat.py","lineNumber":32,"sourceCode":"    if policy == RematType.WHOLE:\n        return jax.checkpoint_policies.save_only_these_names(\n            \"scalar_stats\",\n        )\n    elif policy == RematType.SAVE_GB300_RECSYS:\n        return jax.checkpoint_policies.save_only_these_names(\n            \"attn_outputs\",\n            \"dense_outputs\",\n            \"dense_outputs_individual\",\n            \"attn\",\n            \"gate_up_proj\",\n            \"dense_up_proj\",\n            \"query_heads\",\n            \"key_heads\",\n            \"value_heads\",\n            \"scalar_stats\",\n        )\n    else:\n        raise NotImplementedError(f\"Unknown remat policy: {policy}\")\n","sourceCodeStart":14,"sourceCodeEnd":33,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/models/remat.py#L14-L33","documentation":"Raised by custom_remat_policy when the requested gradient checkpointing (rematerialization) policy string does not match any policy known to phoenix.xrex. The function only supports a fixed set of named policies (e.g. everything-save/specific named activations like query_heads, key_heads, value_heads, scalar_stats); anything else falls through to NotImplementedError.","triggerScenarios":"Calling a model (the policy is invoked via __call__) with a config value for the remat policy that is misspelled (e.g. 'everthing_save'), uses different casing, or refers to a policy introduced/renamed in another phoenix/xrex version.","commonSituations":"Copy-pasted YAML/JSON configs from older examples or other repos; upgrading xrex where policy names were renamed; custom layers expecting a new policy not yet implemented locally.","solutions":["Check the policy whitelist at the top of phoenix/xrex/models/remat.py and correct the config string to exactly one of the supported names","If you need a new policy, add a branch in custom_remat_policy that maps the name to a jax.ad_checkpoint.checkpoint policy","As a workaround use the default 'everything_save' style policy by omitting the custom policy setting"],"exampleFix":"# before\nmodel_config.remat_policy = \"everything_sav\"\n# after\nmodel_config.remat_policy = \"everything_save\"","handlingStrategy":"validation","validationCode":"from phoenix.xrex.models import remat as remat_mod\nSUPPORTED = get_supported_policies()  # e.g. names referenced in custom_remat_policy\nassert cfg.remat_policy in SUPPORTED, f\"bad remat policy {cfg.remat_policy!r}\"","typeGuard":"def is_valid_remat_policy(p: str) -> bool:\n    return p in (\"everything_save\", \"nothing_save\", \"query_heads\", \"key_heads\", \"value_heads\", \"scalar_stats\")","tryCatchPattern":null,"preventionTips":["Keep policy names in one constants module and import them in configs","Add a config-validation step before model construction"],"tags":["remat","checkpointing","jax","config","not-implemented"],"backgroundTag":"invalid-config-value","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}