{"record":{"id":"68f54896fe738634","repo":"xai-org/x-algorithm","slug":"unknown-dataset-type-for-the-sid-retrieval-fami","errorCode":null,"errorMessage":"Unknown {dataset_type=} for the SID retrieval family","messagePattern":"Unknown (.+?) for the SID retrieval family","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/configs/xrecsys_sid_retrieval.py","lineNumber":125,"sourceCode":"        case \"aggregated_kafka\":\n            return PhoenixDataset(\n                hash_table=hash_table,\n                path=\"/path/to/offline_kafka_dump\",\n                history_seq_len=HISTORY_SEQ_LEN,\n                candidate_seq_len=CANDIDATE_SEQ_LEN,\n                input_vocab_size=INPUT_VOCAB_SIZE,\n                hash_vocab_size=HASH_VOCAB_SIZE,\n                num_continuous_actions=NUM_CONTINUOUS_ACTIONS,\n                pad_token=PAD_TOKEN,\n                num_negatives_per_example=0,\n                num_kafka_partitions=1024,\n                include_candidate_post_ids=True,\n                multimodal_embedding_type=None,\n                use_post_sid=True,\n                sid_num_levels=NUM_SID_TOKENS,\n            )\n        case _:\n            raise ValueError(f\"Unknown {dataset_type=} for the SID retrieval family\")\n\n\nSEQUENCE_LEN = NUM_USER_PREFIX + HISTORY_SEQ_LEN + NUM_SID_TOKENS\n\n\ndef make_trainer(\n    *,\n    name: str,\n    dataset,\n    attn_impl: str = \"jax_attn\",\n    fa_version: str = \"3\",\n) -> SidRetrievalTrainer:\n    return SidRetrievalTrainer(\n        name=name,\n        precision_level=2,\n        reuse_run_id=False,\n        evals=[],\n        eval_every_n=0,","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/configs/xrecsys_sid_retrieval.py#L107-L143","documentation":"The SID-retrieval config's _make_dataset only supports a small set of dataset types tuned for SID (semantic ID) retrieval, hard-coding use_post_sid=True and sid_num_levels=NUM_SID_TOKENS. Any other dataset_type string falls through and raises this error.","triggerScenarios":"Calling _make_dataset in xrecsys_sid_retrieval with a dataset_type not handled by its match — e.g. reusing 'toy_dataset' or a ranking-family type not supported in the SID retrieval family.","commonSituations":"Porting a config from xrecsys/xrecsys_two_tower into the SID retrieval family without pruning unsupported dataset options; version drift where a dataset type was added elsewhere but not here; typos.","solutions":["Use one of the dataset types the SID-retrieval _make_dataset actually matches (inspect the match cases just above line 125)","Copy configs only from within the SID retrieval family, or start from its MODEL_CFGS templates","Register a factory in config_registry.RANKING_DATASET_FACTORIES if you need a custom dataset that sets use_post_sid=True and sid_num_levels=NUM_SID_TOKENS"],"exampleFix":"# before\ncfg = {\"dataset_type\": \"aggregated_kafka\"}  # not supported here\n\n# after\ncfg = {\"dataset_type\": \"sid_retrieval_kafka\"}  # a case handled in this _make_dataset","handlingStrategy":"validation","validationCode":"# there is no DATASET_TYPES constant for this family; enumerate the supported match cases\nSID_RETRIEVAL_DATASET_TYPES = frozenset({\"aggregated_kafka\"})  # adjust to actual match cases\n\ndef validate_sid_dataset_type(dataset_type: str) -> None:\n    if dataset_type not in SID_RETRIEVAL_DATASET_TYPES:\n        raise SystemExit(\n            f\"Invalid dataset_type {dataset_type!r} for SID retrieval; valid: {sorted(SID_RETRIEVAL_DATASET_TYPES)}\"\n        )","typeGuard":"def is_sid_retrieval_dataset_type(dataset_type: str) -> bool:\n    return dataset_type in SID_RETRIEVAL_DATASET_TYPES","tryCatchPattern":"try:\n    ds = _make_dataset(mparams, dataset_type, hash_table, config_name)\nexcept ValueError as e:\n    if \"SID retrieval family\" in str(e):\n        raise SystemExit(\"Use a dataset_type supported by xrecsys_sid_retrieval\") from e\n    raise","preventionTips":["Start SID-retrieval configs from the family's own MODEL_CFGS templates","Never port dataset_type values from other model families without checking the match cases","Add a config smoke test per model family that constructs the dataset with a tiny batch"],"tags":["config","dataset","sid","dispatch","python"],"backgroundTag":"invalid-config-value","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}