AutoML BinaryClassificationExperiment.Execute throws NullReferenceException in ConcatenateEntity.ToString when ColumnInformation names a column the preFeaturizer creates

Đang mở
#7,825 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
machine-learning

Hướng nghiên cứu

Start with BinaryClassificationExperiment.CreateBinaryClassificationPipeline and the SweepablePipeline construction path shown in the stack trace. Reproduce with the supplied preFeaturizer and ColumnInformation example, then inspect how the featurizer resolves columns before and after the preFeaturizer. Done means the pipeline handles a generated column or reports the missing column clearly instead of throwing NullReferenceException.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area-AutoML untriaged
System information
  • Microsoft.ML 5.0.1, Microsoft.ML.AutoML 0.23.1
  • .NET 10 (net10.0), macOS arm64
Describe the bug

BinaryClassificationExperiment.Execute(trainData, columnInformation, preFeaturizer) throws a NullReferenceException from ConcatenateEntity.ToString when ColumnInformation names a column that the preFeaturizer creates. It does not report that the column does not exist.

To reproduce
var pre = ml.Transforms.Text.TokenizeIntoCharactersAsKeys("text__chars", "text")
    .Append(ml.Transforms.Text.ProduceNgrams("text__counts", "text__chars", 4));
var info = new ColumnInformation { LabelColumnName = "label" };
info.IgnoredColumnNames.Add("text");
info.NumericColumnNames.Add("text__counts");          // created by the preFeaturizer
ml.Auto().CreateBinaryClassificationExperiment(new BinaryExperimentSettings { MaxExperimentTimeInSeconds = 10 })
  .Execute(train, info, pre);
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.ML.AutoML.ConcatenateEntity.ToString()
   at Microsoft.ML.AutoML.SweepablePipeline..ctor(...)
   at Microsoft.ML.AutoML.SweepablePipeline.AppendEntity(...)
   at Microsoft.ML.AutoML.SweepableExtension.Append(IEstimator`1 estimator, SweepablePipeline pipeline)
   at Microsoft.ML.AutoML.BinaryClassificationExperiment.CreateBinaryClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator`1 preFeaturizer)

The featurizer is built from trainData's schema before the preFeaturizer runs, so a column the preFeaturizer adds is not found. If the preFeaturizer writes its output back under an existing column name (for example NormalizeLpNorm("text", …) with "text" listed as numeric), training works.

Expected behavior

One of:

  • the pipeline is built from the preFeaturizer's output schema, so ColumnInformation can name columns the preFeaturizer produces, or
  • Execute fails with a message naming the missing column.
Ngôn ngữ chính
C#
Star
9.4k
Fork
2k
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
64

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/machinelearning

Tất cả issue của dotnet/machinelearning

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.