File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from DashAI .back .job .base_job import BaseJob , JobError
1313from DashAI .back .models .base_model import BaseModel
1414from DashAI .back .tasks .base_task import BaseTask
15+ from DashAI .back .tasks .regression_task import RegressionTask
1516
1617if TYPE_CHECKING :
1718 from sqlalchemy .orm import sessionmaker
@@ -482,6 +483,14 @@ def run(
482483 if key in model_session .input_columns + model_session .output_columns
483484 }
484485
486+ # Regression models predict continuous values regardless of
487+ # the training target's original dtype (e.g. a target column
488+ # that happened to hold only integer-looking values), so the
489+ # output column's saved schema must reflect that instead of
490+ # inheriting the training dataset's type.
491+ if isinstance (task , RegressionTask ):
492+ filtered_schema [output_col ] = {"type" : "Float" , "dtype" : "float64" }
493+
485494 # Store num of rows, columns, and column names
486495 dataset_with_prediction .compute_base_metadata ()
487496
You can’t perform that action at this time.
0 commit comments