{"record":{"id":"2fb513c7e95a7146","repo":"xai-org/x-algorithm","slug":"phoenixgrpcdataset-requires-server-address-a-grpc","errorCode":null,"errorMessage":"PhoenixGrpcDataset requires server_address: a gRPC address pattern for the data loader service, with a '{}' placeholder for the loader index (e.g. 'http://loader-{}.loaders.svc:9090').","messagePattern":"PhoenixGrpcDataset requires server_address: a gRPC address pattern for the data loader service, with a '(.+?)' placeholder for the loader index \\(e\\.g\\. 'http://loader-(.+?)\\.loaders\\.svc:9090'\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/data/grpc_recsys.py","lineNumber":61,"sourceCode":"        server_hosts: list[str],\n        server_port: int = 8898,\n        skip_rows: int = 0,\n        keep_and_pad_partial_batch: bool | None = None,\n        prefetch_factor: int = 2,\n        resume_position: DataPosition | None = None,\n    ) -> Iterator[tuple[RecsysFeaturesBatch, dict[int, int] | None]]:\n        del (\n            run_server,\n            server_hosts,\n            server_port,\n            skip_rows,\n            keep_and_pad_partial_batch,\n            prefetch_factor,\n            resume_position,\n        )\n\n        if not self.server_address:\n            raise ValueError(\n                \"PhoenixGrpcDataset requires server_address: a gRPC address pattern \"\n                \"for the data loader service, with a '{}' placeholder for the loader \"\n                \"index (e.g. 'http://loader-{}.loaders.svc:9090').\"\n            )\n\n        grpc_client = rust_ext.load(\"xai_recsys_dataloader\")\n\n        rank_logger.info(f\"Starting gRPC sequential processing (shard {shard_index}/{num_shards})\")\n\n        hash_keys = self.hash_table.hash_keys\n        real_addresses = [self.server_address.format(i) for i in range(self.num_data_loaders)]\n        real_address = real_addresses[shard_index % len(real_addresses)]\n        dataloader = grpc_client.RecsysDataLoaderPyClient(\n            real_address,\n            self.num_splits,\n            user_id_table_size=hash_keys.user_id_table_size,\n            user_hash_scales=hash_keys.user_hash_scales,\n            user_biases=hash_keys.user_biases,","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/data/grpc_recsys.py#L43-L79","documentation":"PhoenixGrpcDataset.make() requires server_address: a gRPC address pattern for the remote data-loader service containing a '{}' placeholder that is formatted with the loader shard index. If server_address is empty/None, the dataset cannot construct any client, so ValueError is raised with an example pattern.","triggerScenarios":"Constructing PhoenixGrpcDataset without server_address; passing an empty string because the config key was misspelled or the env var unset; YAML config where server_address is null.","commonSituations":"Missing env var in a deployed pod; config key renamed between versions; copy-paste config from a local (non-gRPC) dataset variant.","solutions":["Set server_address to a pattern like 'http://loader-{}.loaders.svc:9090' in the dataset config.","Check the env/config variable that populates it is set (e.g. echo $LOADER_ADDR).","Verify the '{}' placeholder is present — a literal address without it will fail later at format time."],"exampleFix":"// before\nds = PhoenixGrpcDataset.make(config={})  # server_address missing\n\n// after\nds = PhoenixGrpcDataset.make(config={'server_address': 'http://loader-{}.loaders.svc:9090', ...})","handlingStrategy":"validation","validationCode":"addr = config.get('server_address') or os.environ.get('PHOENIX_LOADER_ADDR')\nif not addr or '{}' not in addr:\n    raise SystemExit(\"server_address must be like 'http://loader-{}.loaders.svc:9090'\")","typeGuard":"def is_valid_address_pattern(a: str) -> bool:\n    return bool(a) and '{}' in a","tryCatchPattern":"try:\n    ds = PhoenixGrpcDataset.make(config)\nexcept ValueError as e:\n    raise ConfigError(str(e)) from e","preventionTips":["Fail fast on config load: require the key and assert the '{}' placeholder.","Use env-var defaults with a clear error when unset."],"tags":["configuration","grpc","required-field"],"backgroundTag":"missing-configuration","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}