Skip to content

A malformed prediction entry is silently scored against the "financial" database instead of raising #42

Description

@christian-gheorghe

In evaluation_utils.package_sqls(), a prediction is split on "\t----- bird -----\t" to recover (sql, db_id). When the split fails the code does not raise — it falls back to db_name = "financial":

try:
    sql, db_name = sql_str.split("\t----- bird -----\t")
except ValueError:
    sql = sql_str.strip()
    db_name = "financial"

So a prediction file that loses its separators (a formatting bug, a bad join, a truncated write) is quietly evaluated entirely against financial, producing a low-but-plausible score. Nothing in the output says the file was invalid.

Reproduce: pass {"0": "SELECT 1 FROM frpm"} (no separator) through package_sqls — it returns normally with db_name == "financial".

Suggested fix: raise on a failed split (or at minimum count and print the number of fallbacks).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions