xai-org/x-algorithm · error · ValueError

Unknown dataset name '{name}' in checkpoint_dataset_names. V

Error message

Unknown dataset name '{name}' in checkpoint_dataset_names. Valid names: {sorted(valid_names)}

What it means

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.

Source

Thrown at phoenix/xrex/train/trainer_recsys.py:3340

    def eval(self, soft_step: int):
        if isinstance(self.model_config, RecsysTwoTowerModelConfig):
            return self.eval_two_tower(soft_step)

        raise ValueError("Ranking model eval_every_n is not supported yet.")

    def maybe_build_retrieval_post_embeddings(self):
        if not isinstance(self.model_config, RecsysTwoTowerModelConfig):
            return

        assert isinstance(self.state, RecsysTrainingState)
        assert self.state.emb_table is not None

        if self.model_config.checkpoint_dataset_names is not None:
            valid_names = set(RetrievalDataset.__members__.keys())
            for name in self.model_config.checkpoint_dataset_names:
                if name not in valid_names:
                    raise ValueError(
                        f"Unknown dataset name '{name}' in checkpoint_dataset_names. "
                        f"Valid names: {sorted(valid_names)}"
                    )
            target_datasets = [
                RetrievalDataset[name] for name in self.model_config.checkpoint_dataset_names
            ]
            rank_logger.info(
                f"Loading configured retrieval datasets: {[ds.name for ds in target_datasets]}"
            )
        else:
            eval_target_types: set[RetrievalDataset] = set()
            for eval_module in self.evals:
                if isinstance(eval_module.eval_conf, RecsysTwoTowerEval):
                    eval_target_types.add(eval_module.eval_conf.target_dataset_type)
            target_datasets = (
                list(eval_target_types) if eval_target_types else [RetrievalDataset.HOME]
            )
            rank_logger.info(

View on GitHub (pinned to 24c60942c5)

Solutions

  1. 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)
  2. Check the RetrievalDataset enum definition in the repo for the current canonical names
  3. Remove the invalid entry if that dataset is no longer needed
  4. If a new dataset is genuinely required, add it to RetrievalDataset and its loading path

Example fix

# before
checkpoint_dataset_names = ["ms_marco", "nq"]
# after
checkpoint_dataset_names = ["MS_MARCO", "NQ"]  # exact RetrievalDataset member names
Defensive patterns

Strategy: validation

Validate before calling

from phoenix.xrex.retrieval.types import RetrievalDataset  # adjust import as needed
valid = set(RetrievalDataset.__members__)
assert all(n in valid for n in (model_config.checkpoint_dataset_names or [])), \
    f"invalid names: {set(model_config.checkpoint_dataset_names or []) - valid}"

Type guard

def valid_dataset_names(names: list[str] | None) -> bool:
    return names is None or all(n in RetrievalDataset.__members__ for n in names)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28). Data as JSON: /api/errors/d311e7d81c6007a2. Report an issue: GitHub.