def _identify_search_values(
        cls,
        config: dict[str, Any],
        default_config: dict[str, PassConfigParam],
    ):
        """Conditionally, replace user provided search values with Categorical."""
        for name, param in default_config.items():
            if param.search_defaults and name in config:
                value = config[name]

                # If the user provided a non-empty list, validate if "type of
                # each elements" in the list is the same as the "param's expected type".
                # If successful, treat it as a searchable value i.e. turn it into a Categorical.
                if isinstance(value, list) and len(value) > 0:
                    dummy_values_config = {name: (list[param.type_], None)}
                    dummy_values_model = create_model(
                        f"SearchableParamConfig_{name}_values", **dummy_values_config, __base__=BaseModel
                    )

                    try:
                        validate_config({name: value}, dummy_values_model)
                        config[name] = Categorical(value)
                        continue
                    except ValidationError:
                        # Expected in certain cases and intentionally ignored!!
                        pass

                # If not, leave the value alone so that the default validation
                # would report an appropriate error.

        return config
Conditionally, replace user provided search values with Categorical.
olive/passes/olive_pass.py