{"record":{"id":"53d9b336e41fdc00","repo":"exo-explore/exo","slug":"unsupported-wire-dtype-dtype-r","errorCode":null,"errorMessage":"Unsupported wire dtype: {dtype!r}","messagePattern":"Unsupported wire dtype: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/exo/worker/engines/mlx/disaggregated/adapter.py","lineNumber":55,"sourceCode":"    if dtype not in _MX_TO_STR:\n        raise ValueError(f\"Unsupported mlx dtype on wire: {dtype}\")\n    return _MX_TO_STR[dtype]\n\n\ndef wire_dtype_from_cache(caches: KVCacheType) -> DType:\n    for c in caches:\n        keys: mx.array | None = getattr(c, \"keys\", None)\n        if keys is None:\n            continue\n        if keys.dtype in _MX_TO_STR:\n            return _MX_TO_STR[keys.dtype]\n        break\n    return \"bfloat16\"\n\n\ndef str_to_mx_dtype(dtype: DType) -> mx.Dtype:\n    if dtype not in _STR_TO_MX:\n        raise ValueError(f\"Unsupported wire dtype: {dtype!r}\")\n    return _STR_TO_MX[dtype]\n\n\ndef array_to_bytes(t: mx.array) -> bytes:\n    # bf16 has no native numpy dtype; bitcast through uint16.\n    if t.dtype == mx.bfloat16:\n        return np.asarray(t.view(mx.uint16)).tobytes()\n    if t.dtype in (mx.float16, mx.float32):\n        return np.asarray(t).tobytes()\n    raise ValueError(f\"Unsupported mlx dtype for wire: {t.dtype}\")\n\n\ndef bytes_to_array(data: bytes, shape: tuple[int, ...], dtype: DType) -> mx.array:\n    match dtype:\n        case \"bfloat16\":\n            arr = np.frombuffer(data, dtype=np.uint16).reshape(shape).copy()\n            return mx.array(arr).view(mx.bfloat16)\n        case \"float16\":","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/worker/engines/mlx/disaggregated/adapter.py#L37-L73","documentation":"Error \"Unsupported wire dtype: {dtype!r}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:55 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":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}