{"record":{"id":"139823737cd0eafd","repo":"xai-org/x-algorithm","slug":"enable-stale-post-is-unsupported-on-grpc-recsys-w","errorCode":null,"errorMessage":"enable_stale_post is unsupported on grpc_recsys, which does not transport per-post feature arrays (int64/bool/categorical/float)","messagePattern":"enable_stale_post is unsupported on grpc_recsys, which does not transport per-post feature arrays \\(int64/bool/categorical/float\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/configs/data_feeds.py","lineNumber":229,"sourceCode":"        history_seq_len=mparams[\"history_seq_len\"],\n        candidate_seq_len=mparams[\"candidate_seq_len\"],\n        input_vocab_size=mparams[\"input_vocab_size\"],\n        num_continuous_actions=mparams[\"num_continuous_actions\"],\n        num_negatives_per_example=mparams.get(\"num_negatives_per_example\", 1),\n        num_kafka_partitions=1024,\n        output_vocab_size=mparams[\"output_vocab_size\"],\n        multimodal_embedding_type=mparams.get(\"multimodal_embedding_type\"),\n        use_post_sid=use_post_sid,\n        sid_num_levels=sid_num_levels,\n        compute_post_unexplored_label=mparams.get(\"compute_post_unexplored_label\", False),\n        enable_stale_post=mparams.get(\"enable_stale_post\", False),\n    )\n\n\ndef _ranking_grpc_recsys(mparams, hash_table, use_post_sid, sid_num_levels, config_name):\n    del config_name\n    if mparams.get(\"enable_stale_post\", False):\n        raise ValueError(\n            \"enable_stale_post is unsupported on grpc_recsys, which does not transport per-post feature arrays (int64/bool/categorical/float)\"\n        )\n    return PhoenixGrpcDataset(\n        hash_table=hash_table,\n        history_seq_len=mparams[\"history_seq_len\"],\n        candidate_seq_len=mparams[\"candidate_seq_len\"],\n        server_address=_GRPC_DATALOADER_ADDRESS,\n        input_vocab_size=mparams[\"input_vocab_size\"],\n        pad_token=PAD_TOKEN,\n        output_vocab_size=mparams[\"output_vocab_size\"],\n        num_continuous_actions=mparams[\"num_continuous_actions\"],\n        num_negatives_per_example=mparams.get(\"num_negatives_per_example\", 1),\n        num_data_loaders=8,\n        num_kafka_partitions=1024,\n        multimodal_embedding_type=mparams.get(\"multimodal_embedding_type\"),\n        use_post_sid=use_post_sid,\n        sid_num_levels=sid_num_levels,\n    )","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/configs/data_feeds.py#L211-L247","documentation":"The grpc_recsys dataset path builds a PhoenixGrpcDataset which does not transport per-post feature arrays (int64/bool/categorical/float). Setting enable_stale_post=True in mparams for a grpc_recsys config is therefore rejected at dataset construction time.","triggerScenarios":"Building a grpc_recsys dataset (via _ranking_grpc_recsys, typically through the RANKING_DATASET_FACTORIES registry in _make_dataset) with mparams containing enable_stale_post: True.","commonSituations":"Copying a config block from a kafka/offline dataset family that supports stale posts into a grpc_recsys config; flipping enable_stale_post globally for an experiment without checking per-dataset support; merging config defaults that assume all dataset types share features.","solutions":["Set enable_stale_post: False (or remove the key — it defaults to False) in the grpc_recsys config's mparams","If stale posts are required, switch dataset_type to a family that transports per-post feature arrays (e.g. aggregated_kafka)","Grep the target dataset class before enabling optional features: confirm the constructor accepts enable_stale_post"],"exampleFix":"# before\nMODEL_CFGS = {..., \"dataset_type\": \"grpc_recsys\", \"enable_stale_post\": True}\n\n# after\nMODEL_CFGS = {..., \"dataset_type\": \"grpc_recsys\"}  # enable_stale_post defaults to False","handlingStrategy":"validation","validationCode":"def validate_mparams(mparams: dict, dataset_type: str) -> None:\n    if dataset_type == \"grpc_recsys\" and mparams.get(\"enable_stale_post\", False):\n        raise SystemExit(\n            \"enable_stale_post is not supported on grpc_recsys; remove it or switch dataset_type\"\n        )","typeGuard":"def supports_stale_post(dataset_type: str) -> bool:\n    return dataset_type != \"grpc_recsys\"","tryCatchPattern":"try:\n    ds = _make_dataset(mparams, dataset_type, hash_table, config_name)\nexcept ValueError as e:\n    if \"enable_stale_post\" in str(e):\n        mparams = {k: v for k, v in mparams.items() if k != \"enable_stale_post\"}\n        ds = _make_dataset(mparams, dataset_type, hash_table, config_name)  # degrade gracefully\n    else:\n        raise","preventionTips":["Keep per-dataset-type option whitelists instead of one shared mparams blob","When copying configs between dataset families, diff supported feature flags first","Document in each dataset class which mparams it consumes"],"tags":["config","dataset","feature-unsupported","grpc"],"backgroundTag":"unsupported-config-option","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}