tensorflow/models · error · ConfigError

prompts must be a non-empty mapping.

Error message

prompts must be a non-empty mapping.

What it means

Error "prompts must be a non-empty mapping." thrown in tensorflow/models.

Source

Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:583

      crop_size=crop_size,
  )


def _validate_prompts(raw_prompts: Any) -> dict[str, PromptConfig]:
  """Validates the ``prompts`` mapping into typed PromptConfig objects.

  Args:
      raw_prompts: The ``prompts`` mapping read from YAML.

  Returns:
      A dict mapping prompt name to :class:`PromptConfig`.

  Raises:
      ConfigError: If the mapping is empty, malformed, or any prompt block
          fails validation.
  """
  if not isinstance(raw_prompts, dict) or not raw_prompts:
    raise ConfigError("prompts must be a non-empty mapping.")

  validated = {}
  for prompt_name, raw_block in raw_prompts.items():
    if not isinstance(prompt_name, str) or not prompt_name:
      raise ConfigError(
          f"Prompt name must be a non-empty string, got {prompt_name!r}."
      )
    if not isinstance(raw_block, dict):
      raise ConfigError(f"prompts.{prompt_name!r} must be a mapping.")
    _require_keys(
        raw_block,
        ("detection", "augmentations"),
        f"prompts.{prompt_name!r}",
    )
    validated[prompt_name] = PromptConfig(
        detection=_validate_detection(raw_block["detection"], prompt_name),
        augmentations=_validate_augmentations(
            raw_block["augmentations"], prompt_name

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:583 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/a8a04853e0349791. Report an issue: GitHub.