Skip to content

fix: yaml.safe_load returns none for empty yaml files, propagating as none to callers expecting dict #1497

Description

Description

yaml.safe_load() returns None when given an empty YAML file (or one with only comments). load_config returns this None directly, and get_eval_group passes it through unchanged. Any caller doing config["key"] will get TypeError: 'NoneType' object is not subscriptable. This is a silent misconfiguration bug — an empty or mis-rotated config file produces no useful error message, just a cryptic downstream crash.

Severity: high
File: nemo_skills/evaluation/utils.py

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions