{"record":{"id":"d4d30f0b6f62c344","repo":"jax-ml/jax","slug":"mock-topology-must-be-of-the-form-number-of-slic","errorCode":null,"errorMessage":"Mock topology must be of the form \"<number-of-slices> x <number-of-hosts-per-slice> x <number-of-devices-per-host>\".","messagePattern":"Mock topology must be of the form \"<number-of-slices> x <number-of-hosts-per-slice> x <number-of-devices-per-host>\"\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/xla_bridge.py","lineNumber":372,"sourceCode":"      num_nodes=distributed.global_state.num_processes,\n      collectives=collectives,\n      num_devices=num_devices,\n      get_local_topology_timeout_minutes=cpu_get_local_topology_timeout_minutes.value,\n      get_global_topology_timeout_minutes=cpu_get_global_topology_timeout_minutes.value,\n      transfer_server_factory=_make_transfer_server_factory(),\n  )\n\n\nregister_backend_factory(\n    \"cpu\", make_cpu_client, priority=0, fail_quietly=False\n)\n\ndef get_num_nodes_from_gpu_topology(topology: str) -> int:\n    try:\n      slices_str, hosts_per_slice_str, _ = topology.split(\"x\", 2)\n      return int(slices_str) * int(hosts_per_slice_str)\n    except (IndexError, ValueError):\n      raise ValueError('Mock topology must be of the form '\n                       '\"<number-of-slices> x <number-of-hosts-per-slice> x '\n                       '<number-of-devices-per-host>\".')\n\n# TODO(phawkins,skyewm): switch TPU plugin to use the PJRT plugin mechanism,\n# and then fail loudly on initialization failure.\nregister_backend_factory(\n  'tpu', partial(tpu_client_timer_callback, timer_secs=60.0), priority=300,\n  fail_quietly=True)\n\n\ndef _get_pjrt_plugin_names_and_library_paths(\n    plugins_from_env: str,\n) -> dict[str, str]:\n  \"\"\"Gets the names and library paths of PJRT plugins to load from env var.\n\n  Args:\n    plugins_from_env: plugin name and paths from env var. It is in the format\n      of 'name1:path1,name2:path2' ('name1;path1,name2;path2' for windows).","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/xla_bridge.py#L354-L390","documentation":"Error \"Mock topology must be of the form \"<number-of-slices> x <number-of-hosts-per-slice> x <number-of-devices-per-host>\".\" thrown in jax-ml/jax.","triggerScenarios":"Thrown at jax/_src/xla_bridge.py:372 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":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}