Skip to content

Feature Vector<Type, NN> does not work as AutoML validation data #5773

Closed
@thoron

Description

@thoron

System information

  • Windows 10.0.21364.0
  • .NET SDK Version: 5.0.202

Issue

  • What did you do?
    I want to use AutoML and having the feature column as a Vector<Type, NN> and add validation data to the experiment as in the exposed method:

public ExperimentResult<TMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<TMetrics>> progressHandler = null)

Example code:

_mlContext.Auto()
    .CreateRegressionExperiment(experimentSettings)
    .Execute(_trainDataView, _testDataView, progressHandler: experimentProgress, labelColumnName: "LabelFeaturized");
  • What happened?
    The experiment fails with to following exception:
System.ArgumentException: Training data and validation data schemas do not match. Column 'Features' is of type Vector<Single, 5> in train data, and type Vector<Single, 5> in validation data. (Parameter 'validationData')
    at Microsoft.ML.AutoML.UserInputValidationUtil.ValidateValidationData(IDataView trainData, IDataView validationData)
at Microsoft.ML.AutoML.UserInputValidationUtil.ValidateExperimentExecuteArgs(IDataView trainData, ColumnInformation columnInformation, IDataView validationData, TaskKind task)
at Microsoft.ML.AutoML.ExperimentBase`2.ExecuteTrainValidate(IDataView trainData, ColumnInformation columnInfo, IDataView validationData, IEstimator`1 preFeaturizer, IProgress`1 progressHandler)
at Microsoft.ML.AutoML.ExperimentBase`2.Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator`1 preFeaturizer, IProgress`1 progressHandler)
at Microsoft.ML.AutoML.ExperimentBase`2.Execute(IDataView trainData, IDataView validationData, String labelColumnName, IEstimator`1 preFeaturizer, IProgress`1 progressHandler)
  • What did you expect?
    The validation data to be used in the experiment and the Vector typed Feature column to be an acceptable datatype.

Perhaps this line needs to account for Vector<Type,NN> ?

if (trainCol.Type != validCol.Value.Type)

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoML.NETAutomating various steps of the machine learning processP2Priority of the issue for triage purpose: Needs to be fixed at some point.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions