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

Ouverte
#7,825 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
csharp

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
C#
Étoiles
9.4k
Forks
2k
Merge moyen
2 j 18 h
PR mergées (30 j)
64

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de dotnet/machinelearning

Toutes les issues de dotnet/machinelearning

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.