Skip to content

Different behavior when calling Fit() on a transformer chain and on an IDataLoaderEstimator #2866

Closed
@yaeldekel

Description

@yaeldekel

The following code runs without errors:

            var loader = ml.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
            var data = loader.Load(file);

            // Pipeline.
            var pipeline = ml.BinaryClassification.Trainers.GeneralizedAdditiveModels();

            // Train.
            var model = pipeline.Fit(data);

However, the following code fails with schema mismatch exception:

            var loader = ml.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);

            // Define the same pipeline starting with the loader.
            var pipeline = loader.Append(ml.BinaryClassification.Trainers.GeneralizedAdditiveModels());

           // Train
            var model = pipeline.Fit(file);

This may also be related to issue #1969 .

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions