Skip to content

Exported Sklearn Prediction script fails when the configured ground truth column is missing from the input #8864

Closed

Description

@Yicong-Huang

What happened?

A workflow with a Sklearn Prediction operator runs fine in Texera when the "Ground Truth Attribute Name to Ignore" names a column missing from the data input. The engine silently ignores the missing name and scores the run. Exporting the same workflow as a standalone Python script and running it fails instead: the script exits with a KeyError naming the missing column and writes no predictions. I expected the exported script to behave like the engine and complete the run.

How to reproduce?

  1. Build a workflow with a Sklearn Prediction operator fed by a fitted model frame and a data frame.
  2. In the operator's properties, set "Ground Truth Attribute Name to Ignore" to a column name that does not exist in the data frame. A typo or a stale name from an earlier schema will do.
  3. Run the workflow in Texera: it completes and produces predictions.
  4. Export the workflow as a Python script and run it: the script ends with a KeyError for the missing column.

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

4f36c15, verified still present on origin/main.

Relevant log output

The exported script exits with a KeyError naming the configured ground truth column as not found in the axis, and no output predictions are produced.

Activity

  1. added theissue type on Oct 5, 2026
  2. Yicong-Huang commented on Oct 5, 2026

    @Yicong-Huang
    ContributorAuthor

    @kz930 @aglinxinyuan — you two know this area best; would you take a look? Ignore if it is outside what you are working on.

  3. kz930 commented on Oct 6, 2026

    @kz930
    Contributor

    Thanks for the report. I tested this locally. When the name is sent to the engine, compilation fails with None.get at SklearnPredictionOpDesc.scala:96, so the engine never reaches the code that ignores a missing column. The run completes in the UI only because the frontend clears a column name that is not in the input. The real bug is that the engine's error should name the missing column instead of saying None.get, and I can open a PR for that.

  4. added a commit that references this issue on Oct 8, 2026
    d994619
  5. added a commit that references this issue on Oct 24, 2026
    5a44b5b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions