tensorflow/models · error · ConfigurationError

Configuration root in {yaml_path} must be a dictionary.

Error message

Configuration root in {yaml_path} must be a dictionary.

What it means

Error "Configuration root in {yaml_path} must be a dictionary." thrown in tensorflow/models.

Source

Thrown at official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py:355

    Raises:
      ConfigurationError: If the YAML file cannot be found, if the file content
        is invalid YAML, or if configuration validation fails.
    """
    try:
      with open(yaml_path, "r", encoding="utf-8") as file:
        data = yaml.safe_load(file)
    except OSError as err:
      raise ConfigurationError(
          f"Config file not found or inaccessible: {yaml_path}"
      ) from err
    except yaml.YAMLError as err:
      raise ConfigurationError(
          f"Invalid YAML syntax in {yaml_path}: {err}"
      ) from err

    if not isinstance(data, dict):
      raise ConfigurationError(
          f"Configuration root in {yaml_path} must be a dictionary."
      )

    try:
      prompt_configs = {}
      for name, cfg in data["detection"]["configs"].items():
        cfg_copy = dict(cfg)
        if "crop_size" in cfg_copy:
          cfg_copy["crop_size"] = tuple(cfg_copy["crop_size"])
        prompt_configs[name] = PromptConfig(**cfg_copy)

      classes = list(data["classes"])
      collapsed_categories = build_collapsed_categories_config(
          raw_section=data.get("collapsed_categories"),
          classes=classes,
      )

      models_data = data["models"]

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py:355 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/76507ed9e69bbdfa. Report an issue: GitHub.