{"record":{"id":"3a9b6c23cc4794ee","repo":"jax-ml/jax","slug":"pjrt-plugin-config-file-should-contain-library-pa","errorCode":null,"errorMessage":"PJRT plugin config file should contain \"library_path\" field.","messagePattern":"PJRT plugin config file should contain \"library_path\" field\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/xla_bridge.py","lineNumber":428,"sourceCode":"\n\ndef _get_pjrt_plugin_config(\n    json_path: str,\n) -> tuple[\n    str, Mapping[str, str | int | list[int] | float | bool] | None\n]:\n  \"\"\"Gets PJRT plugin configuration from a json file.\n\n  The json file needs to have a \"library_path\" field for the plugin library\n  path. It can have an optional \"create_option\" field for the options used when\n  creating a PJRT plugin client. The value of \"create_option\" is key-value\n  pairs. Please see xla_client._NameValueMapping for the supported types of\n  values.\n  \"\"\"\n  with open(json_path) as f:\n    config = json.load(f)\n  if 'library_path' not in config.keys():\n    raise ValueError(\n        'PJRT plugin config file should contain \"library_path\" field.'\n    )\n  return (config['library_path'], config.get('create_options'))\n\ndef discover_pjrt_plugins() -> None:\n  \"\"\"Discovers plugins in the namespace package `jax_plugins` and import them.\n\n  There are two methods used to discover plugin modules. They are intended\n  to be used together by implementers in order to cover all packaging and\n  development cases:\n\n  1. Define a globally unique module under the `jax_plugins` namespace\n     package (i.e. just create a `jax_plugins` directory and define your\n     module below it).\n  2. If building a package via pyproject.toml or setup.py, advertise your\n     plugin module name by including an entry-point under the `jax_plugins`\n     group which points to your full module name.\n","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/xla_bridge.py#L410-L446","documentation":"Error \"PJRT plugin config file should contain \"library_path\" field.\" thrown in jax-ml/jax.","triggerScenarios":"Thrown at jax/_src/xla_bridge.py:428 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"}