{"record":{"id":"935de9c4210014e6","repo":"xai-org/x-algorithm","slug":"unknown-dataset-type-must-be-one-of-dataset-t","errorCode":null,"errorMessage":"Unknown {dataset_type=}, must be one of {DATASET_TYPES}","messagePattern":"Unknown (.+?), must be one of (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/configs/xrecsys_gen_recs.py","lineNumber":133,"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_kafka_partitions=mparams.get(\"num_kafka_partitions\", 2048),\n                output_vocab_size=mparams[\"output_vocab_size\"],\n                num_negatives_per_example=0,\n                include_candidate_post_ids=True,\n                multimodal_embedding_type=\"v5\",\n                offline_embedding_table_dir=offline_artifacts_dir,\n                filter_candidates_require_embedding=True,\n                date_range=date_range,\n                num_global_negatives_per_example=num_global_negatives,\n                candidate_negative_filter=candidate_negative_filter,\n                candidate_negative_mode=candidate_negative_mode,\n                **offline_kwargs,\n            )\n        case _:\n            raise ValueError(f\"Unknown {dataset_type=}, must be one of {DATASET_TYPES}\")\n\n\nMODEL_CFGS = {\n    \"xrecsys_gen_recs\": _make_cfg(\n        {\n            \"history_seq_len\": 1023,\n            \"candidate_seq_len\": 128,\n            \"num_layers\": 8,\n            \"emb_size\": 2560,\n            \"emb_table_width\": 1024,\n            \"query_heads\": 20,\n            \"kv_heads\": 4,\n            \"base_batch_size\": 32,\n            \"bs_per_device\": 128,\n            \"ep\": 512,\n            \"dp\": 2,\n            \"total_samples\": 1e11,\n            \"group_id\": \"gen_recs_xrecsys\",","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/configs/xrecsys_gen_recs.py#L115-L151","documentation":"The gen-recs config's _make_dataset match over dataset_type fell through every case (registry lookup included), so the requested dataset type is not supported by this model family. The error lists the valid DATASET_TYPES for reference.","triggerScenarios":"Calling _make_dataset in xrecsys_gen_recs with a dataset_type outside DATASET_TYPES / the registry — e.g. passing a ranking-family type like 'aggregated_kafka' to the generative-recs model, or a typo such as 'offline_kafka_dump'.","commonSituations":"Mixing config blocks between model families (ranking vs gen-recs) that support different dataset types; renaming of dataset types between versions; typo/case mismatch in the config string.","solutions":["Check DATASET_TYPES in xrecsys_gen_recs and use one of its exact values","If you copied a config from another model family, replace dataset_type with one valid for gen-recs (or use that family's config module)","Register a custom dataset factory in config_registry if it should be supported","Verify spelling and case — matching is exact"],"exampleFix":"# before\nmparams = {\"dataset_type\": \"ranking_kafka\"}\n\n# after\nmparams = {\"dataset_type\": \"aggregated_kafka\"}  # a DATASET_TYPES member for this family","handlingStrategy":"validation","validationCode":"from phoenix.xrex.configs import xrecsys_gen_recs\n\ndef validate_dataset_type(dataset_type: str) -> None:\n    if dataset_type not in xrecsys_gen_recs.DATASET_TYPES:\n        raise SystemExit(\n            f\"Invalid dataset_type {dataset_type!r} for gen_recs; valid: {xrecsys_gen_recs.DATASET_TYPES}\"\n        )","typeGuard":"def is_gen_recs_dataset_type(dataset_type: str) -> bool:\n    return dataset_type in DATASET_TYPES","tryCatchPattern":"try:\n    ds = _make_dataset(mparams, dataset_type, hash_table, config_name)\nexcept ValueError as e:\n    if \"dataset_type\" in str(e):\n        raise SystemExit(\"dataset_type not supported by this model family\") from e\n    raise","preventionTips":["Don't reuse config dicts across model families; keep per-family templates","Assert dataset_type against DATASET_TYPES in config-loading tests","Use typing.Literal for dataset_type to catch typos at type-check time"],"tags":["config","dataset","dispatch","typo","python"],"backgroundTag":"invalid-config-value","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}