{"record":{"id":"d311e7d81c6007a2","repo":"xai-org/x-algorithm","slug":"unknown-dataset-name-name-in-checkpoint-datase","errorCode":null,"errorMessage":"Unknown dataset name '{name}' in checkpoint_dataset_names. Valid names: {sorted(valid_names)}","messagePattern":"Unknown dataset name '(.+?)' in checkpoint_dataset_names\\. Valid names: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/train/trainer_recsys.py","lineNumber":3340,"sourceCode":"\n    def eval(self, soft_step: int):\n        if isinstance(self.model_config, RecsysTwoTowerModelConfig):\n            return self.eval_two_tower(soft_step)\n\n        raise ValueError(\"Ranking model eval_every_n is not supported yet.\")\n\n    def maybe_build_retrieval_post_embeddings(self):\n        if not isinstance(self.model_config, RecsysTwoTowerModelConfig):\n            return\n\n        assert isinstance(self.state, RecsysTrainingState)\n        assert self.state.emb_table is not None\n\n        if self.model_config.checkpoint_dataset_names is not None:\n            valid_names = set(RetrievalDataset.__members__.keys())\n            for name in self.model_config.checkpoint_dataset_names:\n                if name not in valid_names:\n                    raise ValueError(\n                        f\"Unknown dataset name '{name}' in checkpoint_dataset_names. \"\n                        f\"Valid names: {sorted(valid_names)}\"\n                    )\n            target_datasets = [\n                RetrievalDataset[name] for name in self.model_config.checkpoint_dataset_names\n            ]\n            rank_logger.info(\n                f\"Loading configured retrieval datasets: {[ds.name for ds in target_datasets]}\"\n            )\n        else:\n            eval_target_types: set[RetrievalDataset] = set()\n            for eval_module in self.evals:\n                if isinstance(eval_module.eval_conf, RecsysTwoTowerEval):\n                    eval_target_types.add(eval_module.eval_conf.target_dataset_type)\n            target_datasets = (\n                list(eval_target_types) if eval_target_types else [RetrievalDataset.HOME]\n            )\n            rank_logger.info(","sourceCodeStart":3322,"sourceCodeEnd":3358,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/train/trainer_recsys.py#L3322-L3358","documentation":"The trainer validates model_config.checkpoint_dataset_names against the members of the RetrievalDataset enum before building post-embedding checkpoints. Any name not exactly matching an enum member (case-sensitive) raises this ValueError listing the valid names. It prevents building retrieval embeddings for a dataset the code doesn't know how to load.","triggerScenarios":"Calling save_checkpoint or eval_two_tower with model_config.checkpoint_dataset_names containing a typo'd or wrong-case name, e.g. 'ms_marco' instead of 'MS_MARCO', or a dataset name removed/renamed in a newer version of RetrievalDataset.","commonSituations":"Copying a config YAML from another repo version where dataset enum names differ; renaming an enum member without updating configs; passing a display name ('MsMarco') instead of the enum identifier.","solutions":["Fix the name in checkpoint_dataset_names to exactly match a value in the printed valid names list (they are the RetrievalDataset enum member keys)","Check the RetrievalDataset enum definition in the repo for the current canonical names","Remove the invalid entry if that dataset is no longer needed","If a new dataset is genuinely required, add it to RetrievalDataset and its loading path"],"exampleFix":"# before\ncheckpoint_dataset_names = [\"ms_marco\", \"nq\"]\n# after\ncheckpoint_dataset_names = [\"MS_MARCO\", \"NQ\"]  # exact RetrievalDataset member names","handlingStrategy":"validation","validationCode":"from phoenix.xrex.retrieval.types import RetrievalDataset  # adjust import as needed\nvalid = set(RetrievalDataset.__members__)\nassert all(n in valid for n in (model_config.checkpoint_dataset_names or [])), \\\n    f\"invalid names: {set(model_config.checkpoint_dataset_names or []) - valid}\"","typeGuard":"def valid_dataset_names(names: list[str] | None) -> bool:\n    return names is None or all(n in RetrievalDataset.__members__ for n in names)","tryCatchPattern":null,"preventionTips":["Validate checkpoint_dataset_names against the enum at config-load time","Keep configs and the RetrievalDataset enum in the same repo/lockstep","Add a unit test asserting your shipped configs reference only valid enum names"],"tags":["config-validation","enum","retrieval","checkpoint"],"backgroundTag":"invalid-enum-config-value","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}