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

オープン
#7,825 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
C#
スター
9.4k
フォーク
2k
平均マージ
2日 18時間
マージ済み PR(30日)
64

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/machinelearning のほかの issue

dotnet/machinelearning の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。